niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » AIX
shared objects cannot be overwritten even though the process loading it has been killed. So getting on trying to overwrite I get the error "Cannot open or remove a file containing a running program."
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
Author Message
Bas
*nix forums beginner


Joined: 07 Jul 2006
Posts: 2

PostPosted: Thu Jul 20, 2006 6:21 pm    Post subject: Re: shared objects cannot be overwritten even though the process loading it has been killed. So getting on trying to overwrite I get the error "Cannot open or remove a file containing a running program." Reply with quote

Quote:
slibclean had worked for some of the objects.

Use genld to see what process(es) loaded the remaining objects. Check the
manpage for the exact options.
Back to top
prashantarane@gmail.com
*nix forums beginner


Joined: 19 Jul 2006
Posts: 2

PostPosted: Wed Jul 19, 2006 8:23 am    Post subject: Re: shared objects cannot be overwritten even though the process loading it has been killed. So getting on trying to overwrite I get the error "Cannot open or remove a file containing a running program." Reply with quote

Thanks for your suggestion Rajbir.

slibclean had worked for some of the objects.

Regards,
Prashant

rajbir wrote:
Quote:
prashantarane@gmail.com wrote:
Hi,

Shared objects cannot be overwritten even though the process loading it
has been killed. So getting on trying to overwrite I get the error
"Cannot open or remove a file containing a running program."

Some background:
We trying to develop upgrade utilities, which involve overwriting some
files from older version of our product. For that we shut down all the
processes related to our product and then try to untar (as
root/superuser) the new binary files (executable, shared objects) on
top of the existing files (older version) of the same names.

The Problem:
While trying to do so we are getting errors like:
tar: 0511-188 Cannot create usr/nc/lib/st80UserDB.so: Cannot open or
remove a file containing a running program.
tar: 0511-188 Cannot create usr/nc/lib/herald.so: Cannot open or remove
a file containing a running program.
....and so on ....
for the shared objects.While the corresponding binary executables are
being overwritten
Before starting the untaring, we did make sure that the process loading
the shared object has been killed.

Furthermore as Root tried the following example:
Untared the new files in the directory
"/localfs/vidhut_ott2/cdrom/aix/cptar"
the relative path so created, in this directory, of this example .so is
"usr/nc/lib"
The executable binary file is st80UserDB and the shared obhect it is
trying to load

# id
uid=0(root) gid=0(system)
groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
#
# pwd
/localfs/vidhut_ott2/cdrom/aix/cptar/usr/nc/bin
# ls -ltraF st80UserDB*
-r-xr-xr-x 1 NetCmmnd NetCmmnd 827943 Jun 04 2000 st80UserDB*
lrwxrwxrwx 1 NetCmmnd NetCmmnd 25 Jul 18 16:01 st80UserDB.so@
-> /usr/nc/lib/st80UserDB.so*
# file st80UserDB*
st80UserDB: executable (RISC System/6000) or object module
st80UserDB.so: executable (RISC System/6000) or object module not
stripped
# ps -ef |grep st80UserDB
root 368682 233694 0 11:50:39 pts/5 0:00 grep st80UserDB
NetCmmnd 827392 594132 0 10:35:00 - 0:08 /usr/nc/bin/st80UserDB
/usr/nc/bin/ncimage.im

The process 827392 is running (executable binary /usr/nc/bin/st80UserDB
)

# su - NetCmmnd
pun-sms-aix11(NetCmmnd)42% stopPath -n DeskTop
pun-sms-aix11(NetCmmnd)43% ps -ef |grep st80UserDB
NetCmmnd 606236 667856 0 11:52:01 pts/5 0:00 grep st80UserDB

The process corresponding to the executable binary
/usr/nc/bin/st80UserDB is not running now

# cp ./st80UserDB /usr/nc/bin/st80UserDB
# cd ../lib
# cp ./st80UserDB.so /usr/nc/lib/st80UserDB.so
cp: /usr/nc/lib/st80UserDB.so: Cannot open or remove a file containing
a running program.

We can see that the executable binary file has been overwritten, while
the shared object is not being able to with the error message.

Please suggest what can be done to address this problem.

Thanks and regards,
Prashant

Run slibclean as root. and then try replacing the shared objects. If it
still doesn't work, I'm afraid you will have no option but to use "rm
-f" to remove the shared objects before trying to untar.

Thanks and regards,
Rajbir Bhattacharjee
Back to top
rajbir
*nix forums beginner


Joined: 11 Apr 2006
Posts: 19

PostPosted: Wed Jul 19, 2006 7:44 am    Post subject: Re: shared objects cannot be overwritten even though the process loading it has been killed. So getting on trying to overwrite I get the error "Cannot open or remove a file containing a running program." Reply with quote

prashantarane@gmail.com wrote:
Quote:
Hi,

Shared objects cannot be overwritten even though the process loading it
has been killed. So getting on trying to overwrite I get the error
"Cannot open or remove a file containing a running program."

Some background:
We trying to develop upgrade utilities, which involve overwriting some
files from older version of our product. For that we shut down all the
processes related to our product and then try to untar (as
root/superuser) the new binary files (executable, shared objects) on
top of the existing files (older version) of the same names.

The Problem:
While trying to do so we are getting errors like:
tar: 0511-188 Cannot create usr/nc/lib/st80UserDB.so: Cannot open or
remove a file containing a running program.
tar: 0511-188 Cannot create usr/nc/lib/herald.so: Cannot open or remove
a file containing a running program.
....and so on ....
for the shared objects.While the corresponding binary executables are
being overwritten
Before starting the untaring, we did make sure that the process loading
the shared object has been killed.

Furthermore as Root tried the following example:
Untared the new files in the directory
"/localfs/vidhut_ott2/cdrom/aix/cptar"
the relative path so created, in this directory, of this example .so is
"usr/nc/lib"
The executable binary file is st80UserDB and the shared obhect it is
trying to load

# id
uid=0(root) gid=0(system)
groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
#
# pwd
/localfs/vidhut_ott2/cdrom/aix/cptar/usr/nc/bin
# ls -ltraF st80UserDB*
-r-xr-xr-x 1 NetCmmnd NetCmmnd 827943 Jun 04 2000 st80UserDB*
lrwxrwxrwx 1 NetCmmnd NetCmmnd 25 Jul 18 16:01 st80UserDB.so@
-> /usr/nc/lib/st80UserDB.so*
# file st80UserDB*
st80UserDB: executable (RISC System/6000) or object module
st80UserDB.so: executable (RISC System/6000) or object module not
stripped
# ps -ef |grep st80UserDB
root 368682 233694 0 11:50:39 pts/5 0:00 grep st80UserDB
NetCmmnd 827392 594132 0 10:35:00 - 0:08 /usr/nc/bin/st80UserDB
/usr/nc/bin/ncimage.im

The process 827392 is running (executable binary /usr/nc/bin/st80UserDB
)

# su - NetCmmnd
pun-sms-aix11(NetCmmnd)42% stopPath -n DeskTop
pun-sms-aix11(NetCmmnd)43% ps -ef |grep st80UserDB
NetCmmnd 606236 667856 0 11:52:01 pts/5 0:00 grep st80UserDB

The process corresponding to the executable binary
/usr/nc/bin/st80UserDB is not running now

# cp ./st80UserDB /usr/nc/bin/st80UserDB
# cd ../lib
# cp ./st80UserDB.so /usr/nc/lib/st80UserDB.so
cp: /usr/nc/lib/st80UserDB.so: Cannot open or remove a file containing
a running program.

We can see that the executable binary file has been overwritten, while
the shared object is not being able to with the error message.

Please suggest what can be done to address this problem.

Thanks and regards,
Prashant

Run slibclean as root. and then try replacing the shared objects. If it
still doesn't work, I'm afraid you will have no option but to use "rm
-f" to remove the shared objects before trying to untar.

Thanks and regards,
Rajbir Bhattacharjee
Back to top
prashantarane@gmail.com
*nix forums beginner


Joined: 19 Jul 2006
Posts: 2

PostPosted: Wed Jul 19, 2006 6:33 am    Post subject: shared objects cannot be overwritten even though the process loading it has been killed. So getting on trying to overwrite I get the error "Cannot open or remove a file containing a running program." Reply with quote

Hi,

Shared objects cannot be overwritten even though the process loading it
has been killed. So getting on trying to overwrite I get the error
"Cannot open or remove a file containing a running program."

Some background:
We trying to develop upgrade utilities, which involve overwriting some
files from older version of our product. For that we shut down all the
processes related to our product and then try to untar (as
root/superuser) the new binary files (executable, shared objects) on
top of the existing files (older version) of the same names.

The Problem:
While trying to do so we are getting errors like:
tar: 0511-188 Cannot create usr/nc/lib/st80UserDB.so: Cannot open or
remove a file containing a running program.
tar: 0511-188 Cannot create usr/nc/lib/herald.so: Cannot open or remove
a file containing a running program.
.....and so on ....
for the shared objects.While the corresponding binary executables are
being overwritten
Before starting the untaring, we did make sure that the process loading
the shared object has been killed.

Furthermore as Root tried the following example:
Untared the new files in the directory
"/localfs/vidhut_ott2/cdrom/aix/cptar"
the relative path so created, in this directory, of this example .so is
"usr/nc/lib"
The executable binary file is st80UserDB and the shared obhect it is
trying to load

# id
uid=0(root) gid=0(system)
groups=2(bin),3(sys),7(security),8(cron),10(audit),11(lp)
#
# pwd
/localfs/vidhut_ott2/cdrom/aix/cptar/usr/nc/bin
# ls -ltraF st80UserDB*
-r-xr-xr-x 1 NetCmmnd NetCmmnd 827943 Jun 04 2000 st80UserDB*
lrwxrwxrwx 1 NetCmmnd NetCmmnd 25 Jul 18 16:01 st80UserDB.so@
-> /usr/nc/lib/st80UserDB.so*
# file st80UserDB*
st80UserDB: executable (RISC System/6000) or object module
st80UserDB.so: executable (RISC System/6000) or object module not
stripped
# ps -ef |grep st80UserDB
root 368682 233694 0 11:50:39 pts/5 0:00 grep st80UserDB
NetCmmnd 827392 594132 0 10:35:00 - 0:08 /usr/nc/bin/st80UserDB
/usr/nc/bin/ncimage.im

The process 827392 is running (executable binary /usr/nc/bin/st80UserDB
)

# su - NetCmmnd
pun-sms-aix11(NetCmmnd)42% stopPath -n DeskTop
pun-sms-aix11(NetCmmnd)43% ps -ef |grep st80UserDB
NetCmmnd 606236 667856 0 11:52:01 pts/5 0:00 grep st80UserDB

The process corresponding to the executable binary
/usr/nc/bin/st80UserDB is not running now

# cp ./st80UserDB /usr/nc/bin/st80UserDB
# cd ../lib
# cp ./st80UserDB.so /usr/nc/lib/st80UserDB.so
cp: /usr/nc/lib/st80UserDB.so: Cannot open or remove a file containing
a running program.

We can see that the executable binary file has been overwritten, while
the shared object is not being able to with the error message.

Please suggest what can be done to address this problem.

Thanks and regards,
Prashant
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [4 Posts] View previous topic :: View next topic
The time now is Fri Nov 21, 2008 8:06 pm | All times are GMT
navigation Forum index » *nix » AIX
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Postfix + MySQL error: very strange variable %s iWarior Postfix 0 Mon Aug 25, 2008 2:01 pm
No new posts ** Postfix error on console every minute or so ** ?? drywash Postfix 0 Fri Jul 04, 2008 8:49 pm
No new posts Artica-postfix a full Open Source postfix management console dtouzeau Postfix 0 Mon Jun 16, 2008 9:46 pm
No new posts Postfix error bounce diwash Postfix 0 Fri Mar 28, 2008 3:37 am
No new posts I am getting following error in Aix 5.3 rockcharles1 AIX 0 Tue Aug 28, 2007 11:06 pm

McDonalds | Mortgage | Free Advertising | MPAA | Apply for Credit Card
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3149s ][ Queries: 20 (0.2177s) ][ GZIP on - Debug on ]