[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] fix SMB-related lockup on some systems

From: Jörg Walter
Subject: [Qemu-devel] [PATCH] fix SMB-related lockup on some systems
Date: Mon, 27 Aug 2007 10:40:47 +0200
User-agent: KMail/1.9.7


I have found a bug where qemu would sit in an endless loop whenever "-smb" was 
enabled and accessed. It is probably the same problem some people in the user 
forums talk about, and here's my analysis and fix:

On glibc systems with NPTL, fork() is not atomic with regard to signals, while 
on non-NPTL-systems, it is. This behaviour is considered to be correct by the 
libc developers, as no relevant spec forbids this behaviour.

See this thread for details:

In qemu, accessing the SMB ip-address causes the slirp code to issue a fork in 
slirp/misc.c, which hangs, as we are in mid-emulation and SIGALARM signals 
come in at a high rate, probably triggering the above mentioned behaviour.

This patch solves the problem by temporarily blocking all signals until the 
fork is over. It doesn't unblock signals in the child, as I assume that 
executing the server program will care for that anyways. It works for me, 
finally I can access "-smb"-folders again.


Attachment: qemu.diff
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]