X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <4CDE1C0B.8010805@cwilson.fastmail.fm> References: <4CDE1C0B DOT 8010805 AT cwilson DOT fastmail DOT fm> Date: Mon, 15 Nov 2010 10:00:29 +1300 Message-ID: Subject: Re: Python: subprocess running rsync causes broken socket in telnetlib From: David Antliff To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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: [snip] > > Try capturing stderr, and see what's there. =A0I suspect you may be > getting an error message like this: > > =A052967 [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 !=3D 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=3Dsubprocess.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 earlier. 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: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple