> The bug was easily reproduced using:
> 
> rm /var/cache/approx/debian/pool/main/i/ia32-libs/ia32-libs_2.5_amd64.deb
> for i in $(seq 1 5); do wget -O /dev/null
> http://localhost:9999/debian/pool/main/i/ia32-libs/ia32-libs_2.5_amd64.deb & 
> done
> 
> Looks like a nice race condition...

Thanks for narrowing this down so conveniently for me!

I've fixed the race condition, but there is one downside: under
concurrent situations like the one above, the remote
file might be downloaded multiple times.

All my ideas for avoiding the race while guaranteeing only one
download were complicated, and seemed to open up other possible races
or deadlocks.

So I've traded away some performance (in the form of wasted bandwidth)
for simplicity and correctness.

After a little more testing, I'll upload a version that you can test
with your buildd, if you like.

Cheers,
Eric

-- 
Eric Cooper             e c c @ c m u . e d u



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to