[Buildd-tools-devel] Bug#489116: Bug#489116: Bug#489116: schroot: possible race condition during chroot setup?

Lucas Nussbaum lucas at lucas-nussbaum.net
Fri Jul 11 15:40:44 UTC 2008


On 11/07/08 at 15:18 +0100, Roger Leigh wrote:
> On Fri, Jul 11, 2008 at 03:15:34PM +0200, Lucas Nussbaum wrote:
> > On 04/07/08 at 00:07 +0200, Lucas Nussbaum wrote:
> > > I'm using file chroots.
> > 
> > It seems that this is caused by mount failing to lock /etc/mtab (because
> > another build process is already mounting an FS). mount
> > returns 16 in that case according to mount(8). I think that it would
> > make sense to retry mounting once or twice in that case.
> > 
> > This occured 6 times during my full archive rebuild today.
> 
> That's annoying!  Ideally, mount(8) should wait on the lock for a bit
> rather than failing immediately.

It retries once, but then exit. That's apparently not enough when 8
hungry schroot processes are running :-)

> We can certainly implement this in schroot-mount using itimers, and do
> some sort of loop in do_mount in the 10mount script.

I'll try to come up with a patch and test it.
-- 
| Lucas Nussbaum
| lucas at lucas-nussbaum.net   http://www.lucas-nussbaum.net/ |
| jabber: lucas at nussbaum.fr             GPG: 1024D/023B3F4F |





More information about the Buildd-tools-devel mailing list