glibc 2.19 deadlock in asprintf

Siddhesh Poyarekar siddhesh.poyarekar@gmail.com
Thu May 22 10:34:00 GMT 2014


That's a backtrace of just one thread - please get a backtrace of all
threads in play using 'thread apply all backtrace'.  There isn't
enough information to conclude that this is a bug, but I am going to
guess that it is not, and that there may have been either some kind of
memory corruption or a malloc call from a signal handler causing a
deadlock.

Siddhesh

On 22 May 2014 15:47, Arkadiusz Miśkiewicz <arekm@maven.pl> wrote:
> Hello.
>
> Using glibc 2.19 on x86_64 and my apache hits such deadlock (below) sometimes.
> I assume it's some glibc bug, right? Where there any post 2.19 fixes related
> to this that I could backport and test?
>
> strace:
> Process 12168 attached
> futex(0x7f04be900620, FUTEX_WAIT_PRIVATE, 2, NULL
>
> gdb:
> __lll_lock_wait_private () at
> ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
> 95      2:      movl    %edx, %eax
> (gdb) bt
> #0  __lll_lock_wait_private () at
> ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
> #1  0x00007f04be5d7c6b in _L_lock_11319 () at malloc.c:5201
> #2  0x00007f04be5d5d78 in __GI___libc_realloc (oldmem=0x7f04be900620
> <main_arena>, bytes=bytes@entry=52) at malloc.c:3022
> #3  0x00007f04be6525e1 in __GI___vasprintf_chk (result_ptr=0x7fff6c79ac08,
> flags=1, format=0x7f04bd235ce1 "changehat %016lx^%s",
>     args=args@entry=0x7fff6c79ab28) at vasprintf_chk.c:88
> #4  0x00007f04be6524e2 in __asprintf_chk
> (result_ptr=result_ptr@entry=0x7fff6c79ac08, flags=flags@entry=1,
>     format=format@entry=0x7f04bd235ce1 "changehat %016lx^%s") at
> asprintf_chk.c:32
> #5  0x00007f04bd232d23 in asprintf (__fmt=0x7f04bd235ce1 "changehat
> %016lx^%s", __ptr=0x7fff6c79ac08) at /usr/include/bits/stdio2.h:178
> #6  aa_change_hat (subprofile=0x7f04bd4414fa "HANDLING_UNTRUSTED_INPUT",
> token=<optimized out>) at kernel_interface.c:350
> #7  0x00007f04bd4411cd in ?? () from /etc/httpd/modules/mod_apparmor.so
> #8  0x000000000042ce15 in ap_run_log_transaction ()
> #9  0x0000000000446b23 in ap_process_request ()
> #10 0x00000000004440a8 in ?? ()
> #11 0x0000000000440095 in ap_run_process_connection ()
> #12 0x000000000044b8cc in ?? ()
> #13 0x000000000044bd82 in ?? ()
> #14 0x000000000044cb97 in ap_mpm_run ()
> #15 0x000000000042559e in main ()
>
> --
> Arkadiusz Miśkiewicz, arekm / maven.pl



-- 
http://siddhesh.in



More information about the Libc-help mailing list