[haiku-bugs] [Haiku] #15015: Race condition in BFS initialization leads to KDL when volume is not mountable.

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Tue, 16 Apr 2019 19:57:01 -0000

#15015: Race condition in BFS initialization leads to KDL when volume is not
mountable.
------------------------------+------------------------------
 Reporter:  pulkomandy        |        Owner:  axeld
     Type:  bug               |       Status:  new
 Priority:  normal            |    Milestone:  Unscheduled
Component:  File Systems/BFS  |      Version:  R1/Development
 Keywords:                    |   Blocked By:
 Blocking:                    |  Has a Patch:  0
 Platform:  All               |
------------------------------+------------------------------
 I had a partition with a corrupt root node, making it unmountable. This
 lead to a panic in BlockAllocator::_Initialize, as the thread was scheduld
 after the BlockAllocator object had already been cleared (panic shows the
 pointer to it to be 0xcccccccc).

 There is a lock between the thread and the destructor, but I'm not sure
 about the semantics of recursive_lock which is used with ownership
 transfer here. It looks like if the thread is not started yet, the locking
 isn't effective?

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/15015>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: