This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [libvirt] [PATCH] LXC: make sure fuse thread start to run before we do clone
- From: "Daniel P. Berrange" <berrange at redhat dot com>
- To: Gao feng <gaofeng at cn dot fujitsu dot com>
- Cc: libvir-list at redhat dot com, libc-alpha at sourceware dot org
- Date: Fri, 8 Nov 2013 13:30:09 +0800
- Subject: Re: [libvirt] [PATCH] LXC: make sure fuse thread start to run before we do clone
- Authentication-results: sourceware.org; auth=none
- References: <1383830143-26049-1-git-send-email-gaofeng at cn dot fujitsu dot com>
- Reply-to: "Daniel P. Berrange" <berrange at redhat dot com>
On Thu, Nov 07, 2013 at 09:15:43PM +0800, Gao feng wrote:
> I met a problem that container blocked by seteuid/setegid
> which is call in lxcContainerSetID on UP system and libvirt
> compiled with --with-fuse=yes.
>
> I looked into the glibc's codes, and found setxid in glibc
> calls futex() to wait for other threads to change their
> setxid_futex to 0(see setxid_mark_thread in glibc).
>
> since the process created by clone system call will not
> share the memory with the other threads and the context
> of memory doesn't changed until we call execl.(COW)
>
> So if the process which created by clone is called before
> fuse thread being stated, the new setxid_futex of fuse
> thread will not be saw in this process, it will be blocked
> forever.
>
> Maybe this problem should be fixed in glibc, but I send
> this patch as a quick fix.
Can you show a stack trace of the threads/processes deadlocking
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|