Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2017 04:15:10 +0000 (UTC)
From:      Jin Guojun <jguojun@sbcglobal.net>
To:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   alloc/free abort/kill in 12 snapshot
Message-ID:  <131319340.1954512.1490328910894@mail.yahoo.com>
References:  <131319340.1954512.1490328910894.ref@mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
A X11 based program works fine on 11 and all previous FreeBSD release and L=
inux.When build on FreeBSD-12.0-CURRENT-amd64-20170316-r315413, it gets wei=
rd crashes on either alloc and free.Both cases seem related to _pthread_mut=
ex_init_calloc_cb ().Is this a known issue?=20
Is possible to determine why _pthread_mutex_init_calloc_cb () not happy?
-Jin
 1) calloc#0=C2=A0 0x000000080134322a in thr_kill () from /lib/libc.so.7
#1=C2=A0 0x00000008013431f4 in raise () from /lib/libc.so.7
#2=C2=A0 0x0000000801343169 in abort () from /lib/libc.so.7
#3=C2=A0 0x000000080133ae1f in _pthread_mutex_init_calloc_cb () from /lib/l=
ibc.so.7
#4=C2=A0 0x0000000801333b99 in _pthread_mutex_init_calloc_cb () from /lib/l=
ibc.so.7
#5=C2=A0 0x0000000801333851 in _pthread_mutex_init_calloc_cb () from /lib/l=
ibc.so.7
#6=C2=A0 0x0000000801315e0d in _malloc_thread_cleanup () from /lib/libc.so.=
7
#7=C2=A0 0x000000080133e35a in malloc () from /lib/libc.so.7
#8=C2=A0 0x000000080133e8b1 in calloc () from /lib/libc.so.7
#9=C2=A0 0x0000000800b9ad41 in _XkbReadGetMapReply ()
=C2=A0=C2=A0 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=3D0, movie_frams_sec=3D0,=20
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 case KeyPress:=C2=A0 {
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 char=C2=A0=C2=A0=C2=A0 string[25=
6];
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 KeySym=C2=A0 keysym;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 XComposeStatus=C2=A0 stat;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 x_bool=C2=A0 shifted_key;
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 int=C2=A0=C2=A0=C2=A0=C2=A0 hand=
led_key =3D keysym,
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 length =3D XLookupString(&event, string, sizeof(string) - 1=
, &keysym, &stat);
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ...=C2=A0=C2=A0=C2=A0 =C2=A0=C2=
=A0=C2=A0=C2=A0}This happens when some key pressed (likely a CTRL key). Thi=
s function is doing input, so issue should not be in the caller.

2) freeWhen exit the application, it crah on free:#0=C2=A0 0x00000008013432=
2a in thr_kill () from /lib/libc.so.7
#1=C2=A0 0x00000008013431f4 in raise () from /lib/libc.so.7
#2=C2=A0 0x0000000801343169 in abort () from /lib/libc.so.7
#3=C2=A0 0x0000000801333198 in _pthread_mutex_init_calloc_cb () from /lib/l=
ibc.so.7
#4=C2=A0 0x00000008013321ab in _pthread_mutex_init_calloc_cb () from /lib/l=
ibc.so.7
#5=C2=A0 0x00000008013316fd in _pthread_mutex_init_calloc_cb () from /lib/l=
ibc.so.7
#6=C2=A0 0x000000080132350d in _pthread_mutex_init_calloc_cb () from /lib/l=
ibc.so.7
#7=C2=A0 0x000000080133ee10 in free () from /lib/libc.so.7
#8=C2=A0 0x000000000045d67b in ccs_free (p=3D0x803200000) at zalloc.c:294




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?131319340.1954512.1490328910894>