This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug nptl/15843] New: core dump when pthread_cancel() while thread is inside pthread_cond_timedwait()


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

            Bug ID: 15843
           Summary: core dump when pthread_cancel() while thread is inside
                    pthread_cond_timedwait()
           Product: glibc
           Version: 2.18
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
          Assignee: unassigned at sourceware dot org
          Reporter: olivier.pis.langlois at transport dot alstom.com
                CC: drepper.fsp at gmail dot com

Created attachment 7145
  --> http://sourceware.org/bugzilla/attachment.cgi?id=7145&action=edit
modified unittest to highlight problem

Description:

I have modified the tst-cond25.c test to compile with glibc test driver as the
driver forbibs the test to create core dumps. See attachement.

I have investigated the core dump a bit and it seems to come from cancelling
pthread_cond_timedwait call:

(gdb) where
#0 0xb77762c1 in ?? () from /usr/lib/libgcc_s.so.1
#1 0xb7776a3a in ?? () from /usr/lib/libgcc_s.so.1
#2 0xb7776e40 in _Unwind_Resume () from /usr/lib/libgcc_s.so.1
#3 0xb77517a2 in _Unwind_Resume () from /usr/lib/libpthread.so.0
#4 0xb774d2d7 in __condvar_tw_cleanup () from /usr/lib/libpthread.so.0
#5 0x00000001 in ?? ()

The problem seem to be introduced by commit

http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=4f682b2ae941b9bacde6015799b7ae77301a6d87

If I roll back that commit, the core dump goes away.

Additional info:
* 2.18
* i686

lano1106@hpmini /usr/src/linux-3.10.6-2-ck/include $ gcc --version
gcc (GCC) 4.8.1 20130725 (prerelease)
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

lano1106@hpmini /usr/src/linux-3.10.6-2-ck/include $ uname -a
Linux hpmini 3.10.6-2-ck #1 SMP PREEMPT Tue Aug 13 23:16:33 EDT 2013 i686
GNU/Linux

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]