Re: pthread_mutex_trylock crashes because _get_curthread() returns null
- In reply to: Yuri : "Re: pthread_mutex_trylock crashes because _get_curthread() returns null"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 13 Jan 2025 03:49:56 UTC
On Sun, Jan 12, 2025 at 06:27:52PM -0800, Yuri wrote: > With this patch the original crash is gone, but now it crashes in calloc > with this stack: > > > #0 0x0000000003b2b1cc in calloc () > #1 0x000000002fda34e7 in _thr_alloc (curthread=curthread@entry=0x0) at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_list.c:154 > #2 0x000000002fda2522 in _libpthread_init (curthread=curthread@entry=0x0) > at /disk-samsung/freebsd-src/lib/libthr/thread/thr_init.c:336 > #3 0x000000002fda5265 in _thr_check_init () at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_private.h:927 > #4 __Tthr_mutex_trylock (mutex=0x415e440 <_rjem_je_arenas_lock+64>) at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_mutex.c:622 > #5 0x0000000003b29674 in _rjem_je_arena_choose_hard () > #6 0x0000000003b335da in arena_choose () > #7 0x0000000003b2b5b3 in calloc () > #8 0x000000002fda34e7 in _thr_alloc (curthread=curthread@entry=0x0) at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_list.c:154 > #9 0x000000002fda2522 in _libpthread_init (curthread=curthread@entry=0x0) > at /disk-samsung/freebsd-src/lib/libthr/thread/thr_init.c:336 > #10 0x000000002fda5265 in _thr_check_init () at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_private.h:927 > #11 __Tthr_mutex_trylock (mutex=0x415e440 <_rjem_je_arenas_lock+64>) at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_mutex.c:622 > #12 0x0000000003b29674 in _rjem_je_arena_choose_hard () > #13 0x0000000003b335da in arena_choose () > #14 0x0000000003b2b5b3 in calloc () > #15 0x000000002fda34e7 in _thr_alloc (curthread=curthread@entry=0x0) at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_list.c:154 > #16 0x000000002fda2522 in _libpthread_init (curthread=curthread@entry=0x0) > at /disk-samsung/freebsd-src/lib/libthr/thread/thr_init.c:336 > #17 0x000000002fda5265 in _thr_check_init () at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_private.h:927 > #18 __Tthr_mutex_trylock (mutex=0x415e440 <_rjem_je_arenas_lock+64>) at > /disk-samsung/freebsd-src/lib/libthr/thread/thr_mutex.c:622 There must be more frames after #18.