[Bug 252579] fork() causes process to hang in rare circumstances.
| Newsgroups | gmane.os.freebsd.devel.threading |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252579 --- Comment #4 from [email protected] --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=85d028223bc2768651f4d44881644ceb5dc2a664 commit 85d028223bc2768651f4d44881644ceb5dc2a664 Author: Konstantin Belousov <[email protected]> AuthorDate: 2021-01-12 09:02:37 +0000 Commit: Konstantin Belousov <[email protected]> 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 <[email protected]> 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. _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-threads To unsubscribe, send any mail to "[email protected]"