Request 254 was acted upon. _________________________________________________________________________
URL: https://rt.openpkg.org/id/254 Ticket: [OpenPKG #254] Subject: [bootstrap] file locking problems Requestors: [EMAIL PROTECTED] Queue: openpkg Owner: Nobody Status: open Transaction: Correspondence added by rse Time: Sun Sep 14 09:34:09 2003 ________________________________________________________________________ On Sun, Sep 14, 2003, [EMAIL PROTECTED] via RT wrote: > [...] > I have noticed some occasional fatal errors in the 'rpm' program since > the upgrade to RPM 4.2.1. > > Specifically, when 'rpm' is executed as root in a Sparc/Solaris9 > environment (not to imply that this doesn't happen elsewhere), some file > locking performed by the Berkeley libraries seems to fail. > > The trace listed below demonstrates one typical scenario. The package I > attempted to install does not have any pre- or post-triggers, and its > files all have the permissions and ownership specified by > '%{l_files_std}'. That is to say, I don't think that this particular > package causes the failure. > > At least once the state of the system resulting from the error trace > below has included a corrupted RPM database. I did some system call > tracing in that environment, and found the DB library code to be waiting > infinitely on a mutex call of some sort. > > --matt > > > rpm -Uvh apt-0.5.5cnc6-20030908.sparc64-solaris9-cw.rpm > > Preparing... #################################### > [100%] > > 1:apt ls > /cw/etc/apt/ ( 1%) > > ########################################### [100%] > > rpmdb: Locker does not exist > > error: db4 error(22) from db->cursor: Invalid argument > > rpmdb: Write attempted on read-only cursor > > error: db4 error(1) from dbcursor->c_put: Not owner > > rpmdb: Closing already-closed cursor > > error: db4 error(22) from dbcursor->c_close: Invalid argument > > error: error(1) allocating new package instance > > error: db4 error(22) from db->close: Invalid argument > > error: db4 error(22) from db->close: Invalid argument > > error: db4 error(22) from db->close: Invalid argument I'm investigating. At least the trailing three db->close() calls are an error in RPM AFAIK (it closes already closed fds). The other things could be related to permissions (see the "read-only cursor"). What are the owner and permissions on your <prefix>/RPM/DB dir and its files? And under which user have you performed the above operation? Can you especially show us the "truss" output in this situation? There usually one can see access(2) calls which determine this "read-only" situation. Finally, look into <prefix>/lib/openpkg/macros and there especially for %__dbi_cdb. Try adding "private" to the end of its definition or try to decrease the memory sizes, etc. Perhaps some fiddling with the values allows you to workaround the problem, because on the RPM mailing list ([EMAIL PROTECTED]) other people also experience problems under Solaris 9 and try to solve it by fiddling with these Berkeley-DB config values. Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ The OpenPKG Project www.openpkg.org Developer Communication List [EMAIL PROTECTED]