public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/13699] New: Hang in __lll_lock_wait_private after fork and realloc.
@ 2012-02-16 11:38 gf at unixsol dot org
  2012-02-16 16:10 ` [Bug libc/13699] " law at redhat dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gf at unixsol dot org @ 2012-02-16 11:38 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13699

             Bug #: 13699
           Summary: Hang in __lll_lock_wait_private after fork and
                    realloc.
           Product: glibc
           Version: 2.13
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: gf@unixsol.org
    Classification: Unclassified


I'm using glibc 2.13 from Slackware 13.37 on x86-64. One of our local programs
hangs from time to time and I have kill -9 it. Today I was able to get core
file and get the following back trace.

#0  0x00007f3118abfa8e in __lll_lock_wait_private () from /lib64/libc.so.6
#1  0x00007f3118a49c75 in _L_lock_12271 () from /lib64/libc.so.6
#2  0x00007f3118a47efd in realloc () from /lib64/libc.so.6
#3  0x00007f3118a3b633 in vasprintf () from /lib64/libc.so.6
#4  0x00007f3118a1c238 in asprintf () from /lib64/libc.so.6
#5  0x00007f31189f7863 in __assert_fail () from /lib64/libc.so.6
#6  0x00007f3118d76366 in __reclaim_stacks () from /lib64/libpthread.so.0
#7  0x00007f3118a78a36 in fork () from /lib64/libc.so.6
#8  0x000000000040672d in do_notify (in=<value optimized out>) at
lib/inotify.c:39
#9  0x00007f3118d76d6b in start_thread () from /lib64/libpthread.so.0
#10 0x00007f3118ab045d in clone () from /lib64/libc.so.6

The program uses about 4G memory on machine with 16G and and 2.6.38.7 kernel.

The notify function looks like this:
https://github.com/gfto/tsdecrypt/blob/master/notify.c#L46

I understand the problem is some kind of malloc related deadlock but I have no
idea how to avoid or work around it. There is currently glibc 2.14.1 in
slackware-current, will updating to this version fix the problem?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/13699] Hang in __lll_lock_wait_private after fork and realloc.
  2012-02-16 11:38 [Bug libc/13699] New: Hang in __lll_lock_wait_private after fork and realloc gf at unixsol dot org
@ 2012-02-16 16:10 ` law at redhat dot com
  2012-10-03 18:29 ` siddhesh at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: law at redhat dot com @ 2012-02-16 16:10 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=13699

law at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com

--- Comment #1 from law at redhat dot com 2012-02-16 16:08:39 UTC ---
This could easily be the malloc deadlock I posted about here:

http://sources.redhat.com/ml/libc-alpha/2012-02/msg00272.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/13699] Hang in __lll_lock_wait_private after fork and realloc.
  2012-02-16 11:38 [Bug libc/13699] New: Hang in __lll_lock_wait_private after fork and realloc gf at unixsol dot org
  2012-02-16 16:10 ` [Bug libc/13699] " law at redhat dot com
@ 2012-10-03 18:29 ` siddhesh at redhat dot com
  2012-10-04 15:58 ` gf at unixsol dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: siddhesh at redhat dot com @ 2012-10-03 18:29 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=13699

Siddhesh Poyarekar <siddhesh at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |siddhesh at redhat dot com

--- Comment #2 from Siddhesh Poyarekar <siddhesh at redhat dot com> 2012-10-03 18:29:13 UTC ---
This should have been fixed by:

commit 7a775e6b3d938586db5a66a76de9c14667151cf9
Author: Andreas Schwab <schwab@redhat.com>
Date:   Thu Sep 15 14:48:01 2011 +0200

    Avoid race between {,__de}allocate_stack and __reclaim_stacks during fork

which is in 2.15 and later.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/13699] Hang in __lll_lock_wait_private after fork and realloc.
  2012-02-16 11:38 [Bug libc/13699] New: Hang in __lll_lock_wait_private after fork and realloc gf at unixsol dot org
  2012-02-16 16:10 ` [Bug libc/13699] " law at redhat dot com
  2012-10-03 18:29 ` siddhesh at redhat dot com
@ 2012-10-04 15:58 ` gf at unixsol dot org
  2014-06-26 15:22 ` fweimer at redhat dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: gf at unixsol dot org @ 2012-10-04 15:58 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=13699

Georgi Chorbadzhiyski <gf at unixsol dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Georgi Chorbadzhiyski <gf at unixsol dot org> 2012-10-04 15:57:42 UTC ---
I'm now using 2.15 and the problem is gone (as expected). Thanks.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/13699] Hang in __lll_lock_wait_private after fork and realloc.
  2012-02-16 11:38 [Bug libc/13699] New: Hang in __lll_lock_wait_private after fork and realloc gf at unixsol dot org
                   ` (2 preceding siblings ...)
  2012-10-04 15:58 ` gf at unixsol dot org
@ 2014-06-26 15:22 ` fweimer at redhat dot com
  2014-07-17 10:19 ` ionut.ceausu at gmail dot com
  2014-07-17 10:21 ` ionut.ceausu at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: fweimer at redhat dot com @ 2014-06-26 15:22 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13699

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/13699] Hang in __lll_lock_wait_private after fork and realloc.
  2012-02-16 11:38 [Bug libc/13699] New: Hang in __lll_lock_wait_private after fork and realloc gf at unixsol dot org
                   ` (3 preceding siblings ...)
  2014-06-26 15:22 ` fweimer at redhat dot com
@ 2014-07-17 10:19 ` ionut.ceausu at gmail dot com
  2014-07-17 10:21 ` ionut.ceausu at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: ionut.ceausu at gmail dot com @ 2014-07-17 10:19 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13699

Ionut Ceausu <ionut.ceausu at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ionut.ceausu at gmail dot com

--- Comment #4 from Ionut Ceausu <ionut.ceausu at gmail dot com> ---
Created attachment 7714
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7714&action=edit
Source code to reproduce the problem

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug libc/13699] Hang in __lll_lock_wait_private after fork and realloc.
  2012-02-16 11:38 [Bug libc/13699] New: Hang in __lll_lock_wait_private after fork and realloc gf at unixsol dot org
                   ` (4 preceding siblings ...)
  2014-07-17 10:19 ` ionut.ceausu at gmail dot com
@ 2014-07-17 10:21 ` ionut.ceausu at gmail dot com
  5 siblings, 0 replies; 7+ messages in thread
From: ionut.ceausu at gmail dot com @ 2014-07-17 10:21 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=13699

Ionut Ceausu <ionut.ceausu at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #5 from Ionut Ceausu <ionut.ceausu at gmail dot com> ---
Problem is still reproducible on GLIBC2.17/ubunt 13.04. Attached is the source
code to reproduce the problem.
Stack is the following one
__lll_lock_wait_private() at lowlevellock.S:95 0x7ffff73e3d7b    
_L_lock_697() at 0x7ffff73d0af4    
__GI___vsyslog_chk() at syslog.c:258 0x7ffff73d0524    
__syslog() at syslog.c:117 0x7ffff73d099f    
forkSyslogHang::forkSyslogHang() at forkSyslogHang.cpp:33 0x4036e1    
threadPool::threadExecute() at threadPool.cpp:36 0x403ae0    
start_thread() at pthread_create.c:311 0x7ffff7bc4f8e    
clone() at clone.S:113 0x7ffff73d5a0d

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-07-17 10:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-16 11:38 [Bug libc/13699] New: Hang in __lll_lock_wait_private after fork and realloc gf at unixsol dot org
2012-02-16 16:10 ` [Bug libc/13699] " law at redhat dot com
2012-10-03 18:29 ` siddhesh at redhat dot com
2012-10-04 15:58 ` gf at unixsol dot org
2014-06-26 15:22 ` fweimer at redhat dot com
2014-07-17 10:19 ` ionut.ceausu at gmail dot com
2014-07-17 10:21 ` ionut.ceausu at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).