[libvirt] two nasty races

Eric Blake eblake at redhat.com
Sat May 18 04:10:29 UTC 2013


On 05/17/2013 10:05 PM, Eric Blake wrote:
> I found root cause on two nasty races today, but ran out of time to
> write the patches until next week.
> 

> 
> 2. We have a (rare) deadlock due to the use of a non-async-signal-safe
> getpwuid_r in between fork and exec.

I was also surprised to learn today that getgid() is required to be
async-signal-safe, but the more powerful getregid() is not.  And guess
which one we use :(  But I think it is a bug in POSIX, so I filed this:
http://austingroupbugs.net/view.php?id=699

Also, some good news - we have previously remarked on this list that
strlen() and friends are surprisingly not required to be
async-signal-safe, but we went ahead and used them anyways.  Thankfully,
sanity has prevailed, and the next version of POSIX will require them to
be async-signal-safe:
http://austingroupbugs.net/view.php?id=692

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130517/2ec1bfc1/attachment-0001.sig>


More information about the libvir-list mailing list