Merge lp:~spiv/bzr/import-tariff-test-subprocess-deadlock into lp:bzr
Status: | Merged |
---|---|
Merged at revision: | 5929 |
Proposed branch: | lp:~spiv/bzr/import-tariff-test-subprocess-deadlock |
Merge into: | lp:bzr |
Diff against target: |
84 lines (+19/-4) 3 files modified
bzrlib/tests/__init__.py (+5/-2) bzrlib/tests/test_import_tariff.py (+8/-2) doc/en/release-notes/bzr-2.4.txt (+6/-0) |
To merge this branch: | bzr merge lp:~spiv/bzr/import-tariff-test-subprocess-deadlock |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vincent Ladeuil | Needs Fixing | ||
bzr-core | Pending | ||
Review via email: mp+62592@code.launchpad.net |
Description of the change
In theory this branch should fix the deadlock in test_import_tariff on the Windows buildslave in babune. The theory is that the stderr pipe has a finite buffer size, and we don't read from it until the process finishes, so if there's enough output the subprocess will hang and so will our test. (stdout and stdin don't need any special attention here because they are managed by the smart server protocol code, so they should be fine because the smart protocol code always knows when it can read from stdout.)
It would be good to get confirmation from Vincent that does work before landing it; I have a hazy post-sprint memory that perhaps he already did and it failed. If it doesn't we'll need to dig deeper to find out why it's still hanging.
I will retry it but it wasn't addressing the problem on OSX (easier testing there for me).
Also note http:// pad.lv/ 625551 which shares some bad smells with this issue.
And also http:// pad.lv/ 788235 which also involves bzr_serve and hangs in a maverick chroot (easier to reproduce, several tests currently repeatedly fail (with some variants regarding which ones fail)).
I think all of them are revealing a racing condition we never encounter before but was always present.
Oh, and of course the breakin tests which have now been deleted by poolie were also probably hitting the same problem but were blacklisted on babune.
This bug had fun with us for too long, I officially call for a war against it ;)