fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] Dropped output messages?


From: Jeff Forcier
Subject: Re: [Fab-user] Dropped output messages?
Date: Tue, 26 May 2009 16:19:06 -0400

We've gone back and forth on that particular race condition a number
of times at this point, unfortunately, so I'm not convinced that this
change won't introduce other problems. If you dig through the history
of Fabric from 0.1.1 backwards, looking at
fabric.py::_start_outputter(), you'll see what I'm talking about. (I
don't _think_ I changed that part of the code when I created
magic-removal/0.9; certainly it is by and large untouched.)

I'd be happy if it was this simple but as I said, we've been burned a
number of times when tweaking this particular chunk of code, so I am
loathe to just slap another patch on.

-Jeff

On Tue, May 26, 2009 at 4:10 PM, Evan Jones <address@hidden> wrote:
> Jeff Forcier wrote:
>>
>> In the meantime, though, as I said -- if you could try switching your
>> host list around, or simply running this a number of times in a row
>> and see if any obvious patterns appear, that might help. Feel free to
>> throw debug statements into fabric.network.output_thread() to see what
>> might be going on, too, as that's inevitably how I'll be debugging on
>> my end if I need to :)
>
> channel.recv_exit_status() can return before output gets written. In fact,
> tracing Paramiko, the message saying "exit status = x" *always* arrives
> before the message saying "output = y". The main thread then calls
> channel.close(), which discards any future output. So this is basically a
> classic thread race condition. The attached patch fixes this.
>
> Evan
>
> --
> Evan Jones
> http://evanjones.ca/
>
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]