alloc/free abort/kill in 12 snapshot

From: Jin Guojun <jguojun_at_sbcglobal.net>
Date: Fri, 24 Mar 2017 04:15:10 +0000 (UTC)
A X11 based program works fine on 11 and all previous FreeBSD release and Linux.When build on FreeBSD-12.0-CURRENT-amd64-20170316-r315413, it gets weird crashes on either alloc and free.Both cases seem related to _pthread_mutex_init_calloc_cb ().Is this a known issue? 
Is possible to determine why _pthread_mutex_init_calloc_cb () not happy?
-Jin
 1) calloc#0  0x000000080134322a in thr_kill () from /lib/libc.so.7
#1  0x00000008013431f4 in raise () from /lib/libc.so.7
#2  0x0000000801343169 in abort () from /lib/libc.so.7
#3  0x000000080133ae1f in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#4  0x0000000801333b99 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#5  0x0000000801333851 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#6  0x0000000801315e0d in _malloc_thread_cleanup () from /lib/libc.so.7
#7  0x000000080133e35a in malloc () from /lib/libc.so.7
#8  0x000000080133e8b1 in calloc () from /lib/libc.so.7
#9  0x0000000800b9ad41 in _XkbReadGetMapReply ()
   from /usr/local/lib/libX11.so.6
#10 0x0000000800b9ba1a in XkbGetUpdatedMap () from /usr/local/lib/libX11.so.6
#11 0x0000000800b9babb in XkbGetMap () from /usr/local/lib/libX11.so.6
#12 0x0000000800b9837b in XkbKeycodeToKeysym () from /usr/local/lib/libX11.so.6
#13 0x0000000800b98ac3 in XkbLookupKeySym () from /usr/local/lib/libX11.so.6
#14 0x0000000800b994d4 in XLookupString () from /usr/local/lib/libX11.so.6
#15 0x0000000000406a12 in update_pic (movie=0, movie_frams_sec=0, 
        case KeyPress:  {
        char    string[256];
        KeySym  keysym;
        XComposeStatus  stat;
        x_bool  shifted_key;
        int     handled_key = keysym,
                length = XLookupString(&event, string, sizeof(string) - 1, &keysym, &stat);
        ...        }This happens when some key pressed (likely a CTRL key). This function is doing input, so issue should not be in the caller.

2) freeWhen exit the application, it crah on free:#0  0x000000080134322a in thr_kill () from /lib/libc.so.7
#1  0x00000008013431f4 in raise () from /lib/libc.so.7
#2  0x0000000801343169 in abort () from /lib/libc.so.7
#3  0x0000000801333198 in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#4  0x00000008013321ab in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#5  0x00000008013316fd in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#6  0x000000080132350d in _pthread_mutex_init_calloc_cb () from /lib/libc.so.7
#7  0x000000080133ee10 in free () from /lib/libc.so.7
#8  0x000000000045d67b in ccs_free (p=0x803200000) at zalloc.c:294
Received on Fri Mar 24 2017 - 03:20:17 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:10 UTC