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 )
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:
- « pthreads functions do not set errno »
- « 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)
Change History (4)
by , 9 years ago
Attachment: | pthread_join_loop.patch added |
---|
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Note:
See TracTickets
for help on using tickets.
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.