Ticket #14933 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

Sometimes Hang at Startup

Reported by: GenyMobile Owned by:
Component: other Version: VirtualBox 4.3.34
Keywords: hang startup Cc:
Guest type: Linux Host type: Linux

Description (last modified by frank) (diff)

Sometimes a VM just hang at startup and is stuck forever.

We tracked it down to rtSchedRunThread() into 'src/VBox/Runtime/r3/linux/sched-linux.cpp' where it loops without end.

According to the pthreads documentation:

  1. « pthreads functions do not set errno »
  2. « the function can never fail with the error EINTR »

Which means if something happen to have set errno to EINTR before these lines, there no hope of escape. Moreover, checking for EINTR is useless.

The foloowing patch fixes this problem. As this file barely changed in 5.0 it also applies cleanly on this series.


pthread_join_loop.patch Download (720 bytes) - added by GenyMobile 7 years ago.

Change History

Changed 7 years ago by GenyMobile

comment:1 Changed 7 years ago by frank

  • Description modified (diff)

comment:2 Changed 7 years ago by frank

Thank you very much for this analysis! Looks to me like a copy and paste bug. I've changed the loop to test for rc instead of errno. I saw that pthread_join() does not return EINTR according to the manpage but rather safe than sorry here. This fix will be part of the next maintenance 5.0 release.

comment:3 Changed 7 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of VBox 5.0.12.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use