Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#9296 closed bug (fixed)

Acquire all_tasks_mutex in forkProcess

Reported by: edsko Owned by:
Priority: normal Milestone: 7.8.4
Component: Compiler Version: 7.8.2
Keywords: Cc: snoyberg, AndreasVoellmy
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D60
Wiki Page:

Description

In forkProcess we acquire a bunch of mutexes so make sure that when we fork the child doesn't see an inconsistent state of any global data structures. However, we do not acquire the all_tasks_mutex, which means that the child might have an inconsistent view of the all_tasks list.

https://phabricator.haskell.org/D60

Sadly, I do not have a test case illustrating that this is in fact a problem. Found this while working tracking down a deadlock in forkProcess (https://ghc.haskell.org/trac/ghc/ticket/9295).

Change History (6)

comment:1 Changed 5 years ago by snoyberg

Cc: snoyberg added

comment:2 Changed 5 years ago by AndreasVoellmy

Cc: AndreasVoellmy added

comment:3 Changed 5 years ago by MikolajKonarski

Milestone: 7.8.3
Resolution: fixed
Status: newclosed

comment:5 Changed 5 years ago by thoughtpolice

Differential Rev(s): Phab:D60

comment:6 Changed 5 years ago by thoughtpolice

Milestone: 7.8.37.8.4
Note: See TracTickets for help on using tickets.