Functions which have FileOut parameters can cause "internal error: reply callback called twice" The reason is that the socket read handler reads two or more messages in a single buffer read, and calls the upper reply callback twice in succession. In the normal case, the reply callback is switched after the first callback to the special callback for reading files. However if the socket read handler calls the first reply callback twice in quick succession this doesn't happen (the main loop isn't exited between callbacks). This only happens very rarely, and the fix is fairly ugly.
Moving upstream, since it happens very rarely
Created attachment 349531 [details] Potential fix - switch to reading single messages only in the socket read callback Matt, could you test this patch please. I have checked that it still passes the tests, but since I can't reproduce the original bug I'm not certain that it's a fix.
Comment on attachment 349531 [details] Potential fix - switch to reading single messages only in the socket read callback This patch causes a segfault for some large messages - please ignore it.
We think the following patch should fix this error comprehensively: http://git.et.redhat.com/?p=libguestfs.git;a=commitdiff;h=0a0d743ba80e33e676084f2a254c63d4188857b0
libguestfs-1.0.70-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/libguestfs-1.0.70-1.fc11
libguestfs-1.0.70-1.el5 has been submitted as an update for Fedora EPEL 5. http://admin.fedoraproject.org/updates/libguestfs-1.0.70-1.el5
libguestfs-1.0.70-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
As noted in comment 4, the main loop was completely rewritten, fixing this problem.