|
|
|
|
|
|
| Author |
Message |
prashantarane@gmail.com *nix forums beginner
Joined: 19 Jul 2006
Posts: 2
|
Posted: 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."
|
|
|
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 |
|
 |
rajbir *nix forums beginner
Joined: 11 Apr 2006
Posts: 19
|
Posted: 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."
|
|
|
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
|
Posted: 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."
|
|
|
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 |
|
 |
Bas *nix forums beginner
Joined: 07 Jul 2006
Posts: 2
|
Posted: 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."
|
|
|
| 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 |
|
 |
Google
|
|
| Back to top |
|
 |
|
|
The time now is Mon Dec 01, 2008 7:30 pm | All times are GMT
|
|
Loans | Loans | Loans | Credit Cards | Online Advertising
|
|
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
|
|