VirtualBox

Ticket #13802 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

Taking snapshot deadlock

Reported by: a.urakov Owned by:
Component: other Version: VirtualBox 4.3.20
Keywords: snapshot, XPCOM, IPC, deadlock, IProgress Cc:
Guest type: all Host type: Linux

Description

There is possible deadlock when taking snapshot of one machine. Deadlock occurs due to wrong XPCOM IPC service queue processing.

When calling IConsole::takeSnapshot() then IProgress object is returned and client calls IProgress::waitForCompletion(). But there are many calls of Progress::SetNextOperation() and when one of these calls comes a bit later than IProgress::waitForCompletion() then described situation may occur.

Let's there is one worker thread of XPCOM IPC service. So when IProgress::waitForCompletion() request comes to ipcDConnectService::OnMessageAvailable() it appends it to request queue and yields the CPU. If worker's thread has not received a time slice then it will not get a request and next check will say that there is already one waiting worker and no need for one more. Second request of Progress::SetNextOperation() comes shortly after that and situation repeats. So we have two requests and one worker thread. If worker gets IProgress::waitForCompletion() request first then it indefinitely waits because this progress object can't complete (Progress::SetNextOperation() can't be processed). So deadlock occurs.

In attached log you can find that request 17537 (IProgress::waitForCompletion()) is executed but 17539 (Progress::SetNextOperation()) is never executed.

Thank you in advance!

Attachments

2015-01-29-11-57-34.056-VBoxHeadless-9286.log.bz2 Download (67.4 KB) - added by a.urakov 8 years ago.
VBoxHeadless log

Change History

Changed 8 years ago by a.urakov

VBoxHeadless log

comment:1 Changed 8 years ago by frank

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

Fix is part of VBox 4.3.22.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use