Bug 228103

Summary: Crash at __lll_mutex_timedlock_wait+148 caused by uninitialized %rdi register
Product: Red Hat Enterprise Linux 4 Reporter: knut st. osmundsen <bird-bugzilla.redhat.com>
Component: glibcAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.2CC: fweimer, tao
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0807 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-15 16:36:52 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 knut st. osmundsen 2007-02-09 23:29:55 UTC
Description of problem:

Crashing at __lll_mutex_timedlock_wait+148 (/lib64/tls/libpthread.so.0):
lock cmpxchg %edx,(%rdi)

Because the syscall wasn't made and %rdi hasn't been loaded with %r12 yet.

Version-Release number of selected component (if applicable):
glibc-3.4.0

How to fix:

Move the mov %r12,%rdi instruction up somewhere before the je 8f.

How to reproduce:

This isn't easy to reproduce and I'm not going to write a testcase for it since
it's a very obvious bug in the code. But, my from the situation I get it in is
that it requires a 2nd thread to signal the condition variable / mutex (I'm not
quite sure which it is) while the crashing thread is engaging a sleep.

Comment 1 Jakub Jelinek 2007-02-10 08:47:19 UTC
Fixed in CVS, thanks:
http://sources.redhat.com/ml/glibc-cvs/2007-q1/msg00227.html
Will be backported for RHEL4.6.

Comment 2 Jakub Jelinek 2007-02-12 08:45:15 UTC
Fixed in rawhide glibc-2.5.90-17 so far.

Comment 4 RHEL Program Management 2007-05-09 07:48:16 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.

Comment 13 errata-xmlrpc 2007-11-15 16:36:52 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2007-0807.html