[haiku-bugs] Re: [Haiku] #13081: Can only run any program a limited number of times before hanging

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Wed, 26 Dec 2018 21:29:43 -0000

#13081: Can only run any program a limited number of times before hanging
----------------------+--------------------------------------
   Reporter:  AGMS    |      Owner:  nobody
       Type:  bug     |     Status:  new
   Priority:  normal  |  Milestone:  Unscheduled
  Component:  System  |    Version:  R1/Development
 Resolution:          |   Keywords:  relocate_image, system()
 Blocked By:          |   Blocking:
Has a Patch:  0       |   Platform:  x86
----------------------+--------------------------------------

Comment (by mmlr):

 This looks like a normal race condition between the evaluation of the done
 flag and the thread suspend. There is nothing to prevent the done flag
 from flipping after the evaluation but just before the thread suspends
 itself.

 That theory could be verified by checking that the done flag is in fact
 true already while the waiting thread is suspended.

 The proper solution would be to use a condition variable which deals with
 such cases.

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/13081#comment:12>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: