Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jan 2025 05:49:56 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Yuri <yuri@freebsd.org>
Cc:        Freebsd hackers list <freebsd-hackers@freebsd.org>
Subject:   Re: pthread_mutex_trylock crashes because _get_curthread() returns null
Message-ID:  <Z4SNZC-aSm_Y0JfP@kib.kiev.ua>
In-Reply-To: <ceabbb86-cbab-4f82-9a9b-b8e7068cd6b7@freebsd.org>
References:  <cf547d6a-fcee-4629-87d4-41e0da63dd79@FreeBSD.org> <Z4On_KSHfMRpi4RU@kib.kiev.ua> <ceabbb86-cbab-4f82-9a9b-b8e7068cd6b7@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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