Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 2021 10:46:40 +0000
From:      bugzilla-noreply@freebsd.org
To:        threads@FreeBSD.org
Subject:   [Bug 252579] fork() causes process to hang in rare circumstances.
Message-ID:  <bug-252579-13406-Eb5Nh6pjDQ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-252579-13406@https.bugs.freebsd.org/bugzilla/>
References:  <bug-252579-13406@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D252579

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

URL:
https://cgit.FreeBSD.org/src/commit/?id=3D85d028223bc2768651f4d44881644ceb5=
dc2a664

commit 85d028223bc2768651f4d44881644ceb5dc2a664
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2021-01-12 09:02:37 +0000
Commit:     Konstantin Belousov <kib@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@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(-)

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



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