Bug 101062

Summary: rpm hangs in futex(0x405bd790, FUTEX_WAIT, 0, NULL...
Product: [Retired] Red Hat Linux Reporter: Scott Leerssen <scott>
Component: rpmAssignee: Jeff Johnson <jbj>
Status: CLOSED NOTABUG QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: herrold, kragen
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-07-29 12:55:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott Leerssen 2003-07-28 21:02:27 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
I just updated to 2.4.20-19 and can not use rpm; it hangs every single time I
run it.  I don't know for sure if this is the dreaded NPTL issue or not, but
here are the relevent versions of software, including the rpm release mentioned
above:

[root@mws root]# cat /proc/version
Linux version 2.4.20-19.9 (bhcompile.redhat.com) (gcc version
3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 Tue Jul 15 17:18:13 EDT 2003

[root@mws root]# rpm -q glibc
glibc-2.3.2-27.9

[root@mws root]# rpm -q rpm
rpm-4.2-0.69

If I set LD_ASSUME_KERNEL=2.4.1 before running the command, the hang does not
occur, so it appears the NPTL may still buggy in the lastest kernel and glibc.

Version-Release number of selected component (if applicable):
rpm-4.2-0.69

How reproducible:
Always

Steps to Reproduce:
1.rpm -<insert favorit options here>

    

Actual Results:  rpm hangs and can not be killed with a CTRL-C; it must be
killed with kill -9

Expected Results:  anything but a hang.

Additional info:

Comment 1 Jeff Johnson 2003-07-29 12:53:13 UTC
If you are doing "kill -9" then you must clean up
stale locks afterwards by doing
    rm -f /var/lib/rpm/__db*

And, try "rpm -qa | less", exit early, watch stale lock left behind.

Then upgrade to rpm-4.2-1 from ftp://ftp.rpm.org/pub

Comment 2 Jeff Johnson 2003-07-29 12:55:29 UTC
That should have been ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.2.x

Comment 3 Scott Leerssen 2003-07-29 13:36:19 UTC
Why would setting LD_ASSUME_KERNEL=1 cause rpm to run without hanging if stale
locfiles were the cause?

Comment 4 Scott Leerssen 2003-07-29 13:39:16 UTC
I meant LD_ASSUME_KERNEL=2.4.1


Comment 5 Jeff Johnson 2003-07-29 13:49:41 UTC
Because LD_ASSUME_KERNEL=2.4.1 uses the old libpthread implementation,
not NPTL. This changes the posix mutex implementation that is used by
Berkeley DB in rpm.

Comment 6 Scott Leerssen 2003-07-29 14:30:09 UTC
Excellent, thanks for the detail.  That makes some sense, then.

Comment 7 Kragen Sitaker 2003-11-19 17:45:29 UTC
Maybe we should add a GNOME dialog box to kill -9: "Warning: Killing
processes can cause system instability.  Are you sure you want to do
this?"  Also when you close a filehandle, since that can cause a SIGPIPE.

Or maybe we should stop putting futexes in files that exist on the
filesystem.