VirtualBox

Opened 9 years ago

Closed 9 years ago

#14933 closed defect (fixed)

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 Mehnert)

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 (1)

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

Download all attachments as: .zip

Change History (4)

by GenyMobile, 9 years ago

Attachment: pthread_join_loop.patch added

comment:1 by Frank Mehnert, 9 years ago

Description: modified (diff)

comment:2 by Frank Mehnert, 9 years ago

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 by Frank Mehnert, 9 years ago

Resolution: fixed
Status: newclosed

Fix is part of VBox 5.0.12.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette