[Twisted-Python] (no subject)

Dmitriy dmitriy at fogcreek.com
Thu May 3 15:27:51 MDT 2012


 > > If anyone had a similar issue before, I'd appreciate any pointers on
 > > resolving or avoiding it.
 > >
 > Actually, one thing does occur to me - are you using the IOCP reactor?
 > If so, try the select() reactor, the IOCP reactor unfortunately has a
 > bunch of serious bugs. I'm vaguely considering working on those as my
 > next Twisted work, since they're embarrassing and IOCP is so much better
 > than select() on Windows.

Hi Itamar,

The subject was supposed to be "SSH with Twisted: PuTTY Fatal Error
"Incoming packet was garbled on decryption".
(Shame on me, I've missed it while fighting multiple gmail accounts.)

To add more details, unfortunately, I'm already running SelectReactor with
pretty recent packages:
Twisted==12.0.0
pyasn1==0.1.2
pycrypto==2.5

After some heavy experimenting, I really think that plink is the weakest 
link:
the error happens at a random point when my server is accessed from the same
windows 7 box. There are no issues when running the client on an Ubuntu
virtual box* though; Twisted doesn't seem to be the one to blame by itself.

So, I was hoping that someone with plink+twisted experience had stumbled
on this before.

I've tried hg command line and hg's client TortoiseHG, in both cases with
either tortoiseplink.exe (based on putty 0.61) or original PuTTY's
plink 0.62; with and without compression. All combinations failing 
reliably,
though some have a slim random chance to succeed once in a while.
Success rate seems to be dependent on server load - more chances for success
when server is more busy - feels completely crazy. I'm investigating 
this route now.

"Garbled packet" error is pretty random and likely to occur on larg-ish
repositories starting with 5-10 Mb. Brief check of plink's source 
suggests that
this can happen if it receives an incomplete packet, but that's pretty 
much it
for isolating the issue so far.

----
That (*) above was Ubuntu client still getting the same error if 
SSHChannel.write()
would split data in multiple sendData calls when running out of space in
remoteWindowLeft. But if it is patched it to ignore remote window, it 
shows no
issues, so I'm not that much concerned with it for now.

- Dmitriy.




More information about the Twisted-Python mailing list