Python: subprocess running rsync causes broken socket in telnetlib

David Antliff
Sun Nov 14 21:00:00 GMT 2010

On Sat, Nov 13, 2010 at 18:03, Charles Wilson wrote:
> On 11/11/2010 10:19 PM, David Antliff wrote:
>> On Cygwin 1.7.7, this does something nasty to the completely unrelated
>> yet existing telnetlib socket so that any further attempts to read or
>> write from this socket raise an exception:
> Try capturing stderr, and see what's there.  I suspect you may be
> getting an error message like this:
>  52967 [main] python 9340 C:\cygwin-1.7\bin\python.exe: *** fatal error
> - unable to remap \\?\C:\cygwin-1.7\lib\python2.6\lib-dynload\time.dll
> to same address as parent: 0x360000 != 0x3A0000
> Perhaps running rebaseall (or some analog to perlrebase for python?)

Hi Chuck, thank you for your reply.

I captured stderr when running 'rsync' (by adding
stderr=subprocess.STDOUT to the subprocess call), but I see nothing
extra on stderr at all. Bear in mind that rsync does actually run - I
originally found this as part of a larger script that copies some
files to a remote host via rsync, and it would copy them fine on
Cygwin or Linux, but on Cygwin a (much) later operation on the telnet
socket would break. I reduced the problem down to the script I posted

I tried a rebaseall and that didn't seem to change the situation. I'm
not aware of a python-specific equivalent (anyone?) but I can try that
if it exists.

For now I have worked around the problem in my script by rebuilding
all Telnet connections after running rsync. It's messy but it does
allow the script to run on Cygwin.

I've also reproduced this on several Cygwin 1.7.5 installations
(entirely different machines).

Can anyone else see the fault if they run the script I posted?

-- David.

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list