Hi,<br>If we have got fix to deadlock in paramio issue ,<br>Are we planning any release with this fix ?<br>When can it be expected ?<br><br><br><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 18 Apr 2008 14:15:36 -0600<br>
From: Dwayne Litzenberger <<a href="mailto:dwayne@oscl.ca">dwayne@oscl.ca</a>><br>
Subject: [paramiko] [MERGE] Fix obscure deadlock that can occur during<br>
re-keying<br>
To: <a href="mailto:paramiko@lag.net">paramiko@lag.net</a><br>
Message-ID: <<a href="mailto:200804181415.40332.dwayne@oscl.ca">200804181415.40332.dwayne@oscl.ca</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Robey,<br>
<br>
I've attached a patch does the following:<br>
<br>
- Fix deadlock: Paramiko sometimes deadlocks if the user tries to send data<br>
immediately after paramiko has initiated a key exchange (re-keying), but<br>
before the remote MSG_KEXINIT has been received. The deadlock occurs when<br>
certain messages are received (e.g. MSG_CHANNEL_WINDOW_ADJUST) that were<br>
in-transit when the initial MSG_KEXINIT was sent.<br>
<br>
- Add a test case for the deadlock<br>
<br>
- Fix __dump_packets support for SFTPServer and SFTPClient. (Needed to make<br>
test.py work when Packetizer.__dump_packets = True.<br>
<br>
<shameless-plug><br>
This patch took about 38 hours to produce, and was funded entirely by my<br>
employer, Open Systems Canada Limited. They also paid for a lot of my work<br>
on the PRNG bugfixes (especially the as-yet unmerged rng*.py implementation).<br>
Basically, everything that came from my <a href="http://oscl.ca" target="_blank">oscl.ca</a> email address has been paid<br>
for by them. It would be nice if they got some credit somewhere... They're<br>
a small, FOSS-friendly IT services firm that could use the brand exposure.<br>
</shameless-plug><br>
<br>
Cheers,<br>
- Dwayne<br>
<br>
On April 15, 2008 04:58:05 pm Dwayne Litzenberger wrote:<br>
> On April 15, 2008 01:03:00 pm Dwayne Litzenberger wrote:<br>
> > In the main thread:<br>
> ><br>
> > Channel.send acquires Channel.lock, calls Channel._wait_for_send_window,<br>
> > then calls Transport._send_user_message with a MSG_CHANNEL_DATA message.<br>
> > Transport._send_user_message then waits for Transport.clear_to_send to be<br>
> > set, but it's not set for some reason. Note that Channel.lock is still<br>
> > held by the main thread.<br>
> ><br>
> > Meanwhile, the Transport thread tries to process a MSG_WINDOW_ADJUST<br>
> > message. It calls Channel._window_adjust, but that can't proceed until<br>
> > Channel.lock is released.<br>
><br>
> clear_to_send is unset (correctly) because we've just sent MSG_KEXINIT.<br>
> The problem seems to be that Channel.send() is holding Channel.lock, thus<br>
> preventing still-in-transit messages like MSG_WINDOW_ADJUST from being<br>
> processed by the Transport thread, even though we haven't received the<br>
> remote side's MSG_KEXINIT yet.<br>
<br>
--<br>
Dwayne Litzenberger, <a href="http://B.A.Sc" target="_blank">B.A.Sc</a>.<br>
Information Technology Analyst<br>
<br>
Open Systems Canada Limited<br>
#210 - 2332 11th Ave<br>
Regina, SK S4P0K1<br>
Office: (306) 359-OSCL (6725)<br>
<a href="http://www.oscl.ca/" target="_blank">http://www.oscl.ca/</a><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: paramiko-deadlock-bugfix-and-testcase.bundle<br>
Type: text/x-diff<br>
Size: 16007 bytes<br>
Desc: not available<br>
Url : <a href="http://www.lag.net/pipermail/paramiko/attachments/20080418/005dc7f2/attachment-0001.diff" target="_blank">http://www.lag.net/pipermail/paramiko/attachments/20080418/005dc7f2/attachment-0001.diff</a><br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 189 bytes<br>
Desc: This is a digitally signed message part.<br>
Url : <a href="http://www.lag.net/pipermail/paramiko/attachments/20080418/005dc7f2/attachment-0001.pgp" target="_blank">http://www.lag.net/pipermail/paramiko/attachments/20080418/005dc7f2/attachment-0001.pgp</a><br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
paramiko mailing list<br>
<a href="mailto:paramiko@lag.net">paramiko@lag.net</a><br>
<a href="http://www.lag.net/cgi-bin/mailman/listinfo/paramiko" target="_blank">http://www.lag.net/cgi-bin/mailman/listinfo/paramiko</a><br>
<br>
End of paramiko Digest, Vol 40, Issue 11<br>
****************************************<br>
</blockquote></div><br><br clear="all"><br>-- <br>Thanx & Regards,<br>Deepak Rokade<br><br>Do what u Enjoy &<br> Enjoy what u Do...........