Summary: | kdesvn-build aborts with: "IPC failure during Subversion update: Invalid argument" | ||
---|---|---|---|
Product: | [Developer tools] kdesrc-build | Reporter: | Michael Olbrich <michael.olbrich> |
Component: | general | Assignee: | Michael Pyne <mpyne> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | apaku |
Priority: | NOR | ||
Version: | Git | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | New async handling algorithm |
Description
Michael Olbrich
2007-11-07 10:08:04 UTC
I've also experienced this bug, as have Andreas Pakulat. Oddly enough, it was kdepim for myself and for Andreas as well. I suspect this is related. Hopefully just a stupid debugging statement I left in... I believe the shared message queue is being freed somehow but I can't find out what's doing it. I think since I can't reproduce the bug I'm simply going to convert it to use something else. Probably anonymous pipes at this point. Stay tuned. Created attachment 22042 [details]
New async handling algorithm
This is a patch that uses a different algorithm to handle the asynchronous
update and build. The final committed version will be at least a little
different (I'm going to change all those sendToMonitor() receiveFromMonitor()
calls back since that breaks NullIPC) but this version does work (except for
NullIPC :).
At least it should work. It works for me, please let me know if it works for
you.
The way it works if you're so inclined: I use anonymous pipes in order to
handle the communications between the update and build processes. pipes are
simpler so you may wonder why I didn't use them in the first place.
Well, that was to avoid the situation where the svn update process would be
caught waiting on the build process just to notify about successful or failed
updates. In addition the pipe would go away as soon as the update process did,
causing lost information for the build process.
The solution is to introduce yet another process, a monitoring process which
will outlive the update process. The monitoring process waits for both the
build and update processes (using select(2)). Whenever the update process has
something to report the monitor saves it for when the build process is ready.
It doesn't exit until it has given all the messages to the build process.
The build process is still the main (i.e. longest-lived) process.
This Works For Me(TM), but I would be interested to know if it works on other
UNIX variants.
SVN commit 735914 by mpyne: Fix bug 151971 (kdesvn-build SVN aborts with IPC failure). I was never able to pin down what was causing the bug, or to reliably reproduce it. So I went and completely ditched the old IPC code instead. :( It has been rewritten using anonymous pipes and adding an extra process so that the update and build processes can both proceed unfettered. Also added is a command line option (--no-async) to disable the IPC stuff. You can set it as a config file option as well (just called async), it defaults to enabled. In addition the async mode is turned off unless performing both the update and build processes. In theory async mode should always work but I see no reason to test the issue unnecessarily. BUG:151971 M +393 -124 kdesvn-build WebSVN link: http://websvn.kde.org/?view=rev&revision=735914 |