Bug 188425 - Frequent segfault with multithreaded fork
Summary: Frequent segfault with multithreaded fork
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-10 16:10 UTC by Alex Crichton
Modified: 2017-12-31 22:27 UTC (History)
0 users

See Also:


Attachments
file.txt (1.07 KB, text/plain)
2014-04-10 16:10 UTC, Alex Crichton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Crichton 2014-04-10 16:10:01 UTC
Recently we've found that FreeBSD is segfaulting or hanging frequently when dealing with what we suspect is a multithreaded forking situation. I've written a small program (attached) which exhibits the bug. This program will segfault or trip an assertion in libthr frequently, but not always.

Fix: Patch attached with submission follows:
How-To-Repeat: 1. Download attached bug.c
2. clang -o bug bug.c -lthr
3. Run the program repeatedly until it segfaults, normally requiring less than 500 runs.

When running the program, I've been using this script:

  for i in {1..1000}; do; echo $i; ./bug || break; done
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:49 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped