VirtualBox

Ticket #14933 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Sometimes Hang at Startup

Reported by: GenyMobile Owned by:
Priority: major 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.

Attachments

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

Change History

Changed 2 years ago by GenyMobile

comment:1 Changed 2 years ago by frank

  • Description modified (diff)

comment:2 Changed 2 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 2 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.

www.oracle.com
ContactPrivacy policyTerms of Use