[paramiko] paramiko stops responding after huge data is transferred !

Dwayne Litzenberger dwayne at oscl.ca
Tue Apr 15 15:58:05 PDT 2008


On April 15, 2008 01:03:00 pm Dwayne Litzenberger wrote:
> In the main thread:
>
> Channel.send acquires Channel.lock, calls Channel._wait_for_send_window,
> then calls Transport._send_user_message with a MSG_CHANNEL_DATA message.
> Transport._send_user_message then waits for Transport.clear_to_send to be
> set, but it's not set for some reason.  Note that Channel.lock is still
> held by the main thread.
>
> Meanwhile, the Transport thread tries to process a MSG_WINDOW_ADJUST
> message. It calls Channel._window_adjust, but that can't proceed until
> Channel.lock is released.

clear_to_send is unset (correctly) because we've just sent MSG_KEXINIT.  The 
problem seems to be that Channel.send() is holding Channel.lock, thus 
preventing still-in-transit messages like MSG_WINDOW_ADJUST from being 
processed by the Transport thread, even though we haven't received the remote 
side's MSG_KEXINIT yet.

What resources is Channel.lock intended to protect?

-- 
Dwayne Litzenberger, B.A.Sc.
Information Technology Analyst

Open Systems Canada Limited
#210 - 2332 11th Ave
Regina, SK S4P0K1
Office: (306) 359-OSCL (6725)
http://www.oscl.ca/



More information about the paramiko mailing list