[Bug 252579] fork() causes process to hang in rare circumstances.

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Jan 12 10:46:49 UTC 2021


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252579

--- Comment #4 from commit-hook at FreeBSD.org ---
A commit in branch main references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=85d028223bc2768651f4d44881644ceb5dc2a664

commit 85d028223bc2768651f4d44881644ceb5dc2a664
Author:     Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-01-12 09:02:37 +0000
Commit:     Konstantin Belousov <kib at FreeBSD.org>
CommitDate: 2021-01-12 10:45:44 +0000

    libthr malloc: support recursion on thr_malloc_umtx.

    One possible way the recursion can happen is during fork: suppose
    that fork is called from early code that did not triggered
    jemalloc(3) initialization yet. Then we lock thr_malloc lock, and
    call malloc_prefork() that might require initialization of jemalloc
    pthread_mutexes, calling into libthr malloc. It is safe to allow
    recursion for this occurence.

    PR:     252579
    Reported by:    Vasily Postnicov <shamaz.mazum at gmail.com>
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation

 lib/libthr/thread/thr_malloc.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-threads mailing list