Ralf,
On linux, I ran "strace -f -o<filename> rpm --db-build". The program still hung when
used against our new RH9-hosted NFS
server, but earlier in the execution, judging from the output:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> rpm --db-build
rpmdb: BUILDING NEW RPM DATABASE FROM SCRATCH (/usr/psr.oit/redhat9/RPM/DB)
rpmdb: removing (possibly existing) old RPM database DB files
rpmdb: creating new RPM database (built-in RPM procedure)
rpmdb: operating on new RPM database
rpmdb: rebuilding new RPM database (built-in RPM procedure)
rpmdb: making sure RPM database contains all possible DB files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Also, the strace output was disappointing since it shows the last call being a
successful close. I don't know if you can
tell what it might have been trying to do next based on what the trace file contains,
but here's the end of it:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
2722 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("/usr/psr.oit/redhat9/lib/i586/mmx/librt.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
2722 stat64("/usr/psr.oit/redhat9/lib/i586/mmx", 0xbfffd6b0) = -1 ENOENT (No such
file or directory)
2722 open("/usr/psr.oit/redhat9/lib/i586/librt.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
2722 stat64("/usr/psr.oit/redhat9/lib/i586", 0xbfffd6b0) = -1 ENOENT (No such file or
directory)
2722 open("/usr/psr.oit/redhat9/lib/mmx/librt.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
2722 stat64("/usr/psr.oit/redhat9/lib/mmx", 0xbfffd6b0) = -1 ENOENT (No such file or
directory)
2722 open("/usr/psr.oit/redhat9/lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such file
or directory)
2722 stat64("/usr/psr.oit/redhat9/lib", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096,
...}) = 0
2722 open("/usr/psr.oit/redhat9/local/lib/i586/mmx/librt.so.1", O_RDONLY) = -1 ENOENT
(No such file or directory)
2722 stat64("/usr/psr.oit/redhat9/local/lib/i586/mmx", 0xbfffd6b0) = -1 ENOENT (No
such file or directory)
2722 open("/usr/psr.oit/redhat9/local/lib/i586/librt.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
2722 stat64("/usr/psr.oit/redhat9/local/lib/i586", 0xbfffd6b0) = -1 ENOENT (No such
file or directory)
2722 open("/usr/psr.oit/redhat9/local/lib/mmx/librt.so.1", O_RDONLY) = -1 ENOENT (No
such file or directory)
2722 stat64("/usr/psr.oit/redhat9/local/lib/mmx", 0xbfffd6b0) = -1 ENOENT (No such
file or directory)
2722 open("/usr/psr.oit/redhat9/local/lib/librt.so.1", O_RDONLY) = -1 ENOENT (No such
file or directory)
2722 stat64("/usr/psr.oit/redhat9/local/lib", {st_mode=S_IFDIR|S_ISGID|0775,
st_size=4096, ...}) = 0
2722 open("i586/mmx/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("i586/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("mmx/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("/lib/i586/mmx/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or
directory)
2722 stat64("/lib/i586/mmx", 0xbfffd6b0) = -1 ENOENT (No such file or directory)
2722 open("/lib/i586/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 stat64("/lib/i586", 0xbfffd6b0) = -1 ENOENT (No such file or directory)
2722 open("/lib/mmx/librt.so.1", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 stat64("/lib/mmx", 0xbfffd6b0) = -1 ENOENT (No such file or directory)
2722 open("/lib/librt.so.1", O_RDONLY) = 3
2722 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0D\32\0\000"..., 512) =
512
2722 fstat64(3, {st_mode=S_IFREG|0755, st_size=33112, ...}) = 0
2722 old_mmap(NULL, 69784, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40014000
2722 old_mmap(0x4001a000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x5000) = 0x4001a000
2722 old_mmap(0x4001b000, 41112, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4001b000
2722 close(3) = 0
2722 open("/usr/psr.oit/redhat9/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file
or directory)
2722 open("/usr/psr.oit/redhat9/local/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such
file or directory)
2722 open("i586/mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("i586/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("mmx/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("libc.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("/lib/libc.so.6", O_RDONLY) = 3
2722 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0hV\1\000"..., 512) = 512
2722 fstat64(3, {st_mode=S_IFREG|0755, st_size=1474056, ...}) = 0
2722 old_mmap(NULL, 1201892, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40026000
2722 old_mmap(0x40146000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x120000) = 0x40146000
2722 old_mmap(0x40149000, 9956, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40149000
2722 close(3) = 0
2722 open("/usr/psr.oit/redhat9/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
2722 open("/usr/psr.oit/redhat9/local/lib/libpthread.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
2722 open("i586/mmx/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or
directory)
2722 open("i586/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("mmx/libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("libpthread.so.0", O_RDONLY) = -1 ENOENT (No such file or directory)
2722 open("/lib/libpthread.so.0", O_RDONLY) = 3
2722 read(3, "[EMAIL PROTECTED]"..., 512) = 512
2722 fstat64(3, {st_mode=S_IFREG|0755, st_size=99228, ...}) = 0
2722 old_mmap(NULL, 331364, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4014c000
2722 old_mmap(0x4015a000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0xe000) = 0x4015a000
2722 old_mmap(0x4015d000, 261732, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4015d000
2722 close(3) = 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Once this happens, *any* reference to *any* file (even ones not associated with rpm)
on the NFS system causes the
application trying to reference the file to hang. The client system then needs to be
rebooted to restore NFS access.
Again, this was true regarding access to both the Solaris-hosted and Linux-hosted NFS
servers. The servers themselves
are fine and can be accessed by other clients. I should also mention that I am getting
this hang from two different RH9
client machines.
BTW, from a RH9 client, your new test lock program also reports success when accessing
a foo.db on the NFS server:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
> ./testlock2.org
open() -> 3, 0
fcntl() -> 0, 0
write() -> 8192, 0
mmap() -> 40015000, 0
munmap() -> 0, 0
fcntl() -> 0, 0
close() -> 0, 0
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
So I tried the following:
1) cleared out the DB directory
2) added "%__dbi_cdb create cdb mpool mp_mmapsize=16Mb mp_size=1Mb private" to
rpmmacros
3) ran: rpm --db-rebuild (ran to completion and was able to do an rpm -qa, which
reported the gpg-pubkey)
4) removed "%__dbi_cdb create cdb mpool mp_mmapsize=16Mb mp_size=1Mb private" from
rpmmacros
5) ran: rpm -qa and rpm -qi, which were happy to report the gpg-pubkey
6) ran: rpm -Uvh openpkg-20031006-20031006.ix86-linux2.4-upr.rpm, and got:
Preparing... ########################################### [100%]
package openpkg-20031006-20031006 is intended for a linux2.4 operating system
7) Tried it again with locks turned off and got the same results.
Tentative conclusion: rpm is having problems properly executing --db-rebuild and
--db-build with locks enabled, but if
the DB is built properly with locks turned off, then rpm will work correctly with
locks turned on afterward, at least on
linux, but I can't be sure until I can install something.
Question: Why is rpm telling me that I have the wrong OS? This is the same OS I used
to build the package in the first
place, though I was using openpkg-1.3.0 and later openpkg-1.3.1.
On this system, uname -a returns:
> uname -a
Linux sinux.Princeton.EDU 2.4.20-20.9 #1 Mon Aug 18 11:28:34 EDT 2003 i586 i586 i386
GNU/Linux
I will try this same sequence on a Solaris client and see if that fixes anything there.
Thanks,
Dennis
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Ralf S. Engelschall
> Sent: Friday, October 17, 2003 3:10 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Problems running openpkg-20031006-20031006 on Solaris and
> Linux
>
>
> On Thu, Oct 16, 2003, Dennis McRitchie wrote:
>
> > [...]
> > But the program hangs. "ps -ef" after several minutes reveals:
> > > ps -ef|grep rpm
> > psr 20444 12122 0 17:00 pts/3 00:00:00
> > /usr/psr.oit/redhat9/lib/openpkg/bash
> > /usr/psr.oit/redhat9/lib/openpkg/rpmdb --build
> > psr 20682 20444 0 17:00 pts/3 00:00:00
> > /usr/psr.oit/redhat9/lib/openpkg/rpmq -q --define _dbpath
> > /usr/psr.oit/redhat9/RPM/DB/ -- gpg-pubkey-63c4cb9f-3c591eda
> > [...]
> >
> > It is apparently the child process that is hung, as I can kill the parent with
> > "kill 20444". Can't kill the child
> > without using "kill -9 20682".
>
> In such a situation try to use "strace -p 20682". It is usually able to show you the
> last system call in which it is now hanging.
>
> Ralf S. Engelschall
> [EMAIL PROTECTED]
> www.engelschall.com
>
> ______________________________________________________________________
> The OpenPKG Project www.openpkg.org
> User Communication List [EMAIL PROTECTED]
>
______________________________________________________________________
The OpenPKG Project www.openpkg.org
User Communication List [EMAIL PROTECTED]