Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: scp exits often with -1 Date: Fri, 19 Nov 2004 09:55:58 +0100 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: From: =?iso-8859-1?Q?J=F6rg_Schaible?= To: X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id iAJ8ufcc019410 Hi Pierre, Pierre A. Humblet wrote on Friday, November 19, 2004 6:14 AM: > I had a second look at this. It's easy to correlate the trace > with the -v outputs you provided in > http://cygwin.com/ml/cygwin/2004-11/msg00637.html > The debug outputs correspond to lines such as "N = write (2, > xxx)", where N is the length of the debug line. > > For example > 36 676149 [main] ssh 4392 writev: writev (2, 0x22A400, 1) > 34 676183 [main] ssh 4392 fhandler_base::write: binary write > 45 676228 [main] ssh 4392 fhandler_base::write: 40 = > write (0x22A830, 40) > 34 676262 [main] ssh 4392 writev: 40 = write (2, 0x22A400, 1), > errno 119 debug2: channel 0: read<=0 rfd 4 len 0 <= THIS IS THE > DEBUG OUTPUT 36 676298 [main] ssh 4392 __cygwin_lock_lock: > threadcount > 1. not locking > > Once you know that, it's easier to follow what's going on. It > would be interesting to compare traces of successful and > failed runs, in the area where their debug outputs differ. I've been lucky today and my fist attempt from standard command line failed, so I have a new trace (http://www.schaible.info/cygwin/scpbad.txt) and the correlating output. The good version is below. ========== START: Bad scp-v -v output ================ $ cmd /c "scpwin.bat -v -v project.xml jos AT es3 DOT elsag DOT de:/devel/maven/home/public_html/repo/essencio-perActa/poms/idxmgr-1.0.4-SNAPSHOT.pom" Executing: program /usr/bin/ssh host es3.elsag.de, user jos, command scp -v -t /devel/maven/home/public_html/repo/essencio-perActa/poms/idxmgr-1.0.4-SNAPSHOT.pom OpenSSH_3.9p1, OpenSSL 0.9.7d 17 Mar 2004 debug2: ssh_connect: needpriv 0 debug1: Connecting to es3.elsag.de [192.168.2.73] port 22. debug1: Connection established. debug1: identity file /home/jos/.ssh/identity type -1 debug1: identity file /home/jos/.ssh/id_rsa type -1 debug2: key_type_from_name: unknown key type '-----BEGIN' debug2: key_type_from_name: unknown key type 'Proc-Type:' debug2: key_type_from_name: unknown key type 'DEK-Info:' debug2: key_type_from_name: unknown key type '-----END' debug1: identity file /home/jos/.ssh/id_dsa type 2 debug1: Remote protocol version 1.99, remote software version OpenSSH_2.3.0p1 debug1: match: OpenSSH_2.3.0p1 pat OpenSSH_2.3.0* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_3.9p1 debug2: fd 3 setting O_NONBLOCK debug2: Original cipher proposal: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc AT lysator DOT liu DOT se,aes128-ctr,aes192-ctr,aes256-ctr debug2: Compat cipher proposal: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,rijndael-cbc AT lysator DOT liu DOT se debug2: Original cipher proposal: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc AT lysator DOT liu DOT se,aes128-ctr,aes192-ctr,aes256-ctr debug2: Compat cipher proposal: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,rijndael-cbc AT lysator DOT liu DOT se debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,rijndael-cbc AT lysator DOT liu DOT se debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,rijndael-cbc AT lysator DOT liu DOT se debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160 AT openssh DOT com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160 AT openssh DOT com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib debug2: kex_parse_kexinit: none,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-dss debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc AT lysator DOT liu DOT se debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc AT lysator DOT liu DOT se debug2: kex_parse_kexinit: hmac-sha1,hmac-md5,hmac-ripemd160 AT openssh DOT com debug2: kex_parse_kexinit: hmac-sha1,hmac-md5,hmac-ripemd160 AT openssh DOT com debug2: kex_parse_kexinit: none,zlib debug2: kex_parse_kexinit: none,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_init: found hmac-md5 debug1: kex: server->client 3des-cbc hmac-md5 none debug2: mac_init: found hmac-md5 debug1: kex: client->server 3des-cbc hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD(2048) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug2: dh_gen_key: priv key bits set: 194/384 debug2: bits set: 510/1024 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'es3.elsag.de' is known and matches the DSA host key. debug1: Found key in /home/jos/.ssh/known_hosts:10 debug2: bits set: 510/1024 debug1: ssh_dss_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/jos/.ssh/id_dsa (0x100ed3a0) debug2: key: /home/jos/.ssh/id_codehaus (0x100eec70) debug2: key: /home/jos/.ssh/id_sf (0x100f22f8) debug2: key: /home/jos/.ssh/identity (0x0) debug2: key: /home/jos/.ssh/id_rsa (0x0) debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: /home/jos/.ssh/id_dsa debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: pkalg ssh-dss blen 435 debug2: input_userauth_pk_ok: fp 8e:5f:57:a8:60:80:50:ec:0f:65:2e:0a:77:ae:56:56 debug1: Authentication succeeded (publickey). debug2: fd 4 setting O_NONBLOCK debug2: fd 5 setting O_NONBLOCK debug2: fd 6 setting O_NONBLOCK debug1: channel 0: new [client-session] debug2: channel 0: send open debug1: Entering interactive session. debug2: callback start debug2: client_session2_setup: id 0 debug1: Sending command: scp -v -t /devel/maven/home/public_html/repo/essencio-perActa/poms/idxmgr-1.0.4-SNAPSHOT.pom debug2: channel 0: request exec confirm 0 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 16384 debug2: channel 0: rcvd adjust 32768 Sending file modes: C0755 5432 project.xml debug2: channel 0: read<=0 rfd 4 len 0 debug2: channel 0: read failed debug2: channel 0: close_read debug2: channel 0: input open -> drain debug2: channel 0: ibuf empty debug2: channel 0: send eof debug2: channel 0: input drain -> closed debug2: channel 0: rcvd eof debug2: channel 0: output open -> drain debug2: channel 0: obuf empty debug2: channel 0: close_write debug2: channel 0: output drain -> closed debug2: channel 0: rcvd close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.4 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0 debug1: Exit status -1 ========== END: Bad scp-v -v output ================ Good version, trace available here: http://www.schaible.info/cygwin/scpgood.txt ========== START: Good scp-v -v output ================ $ cmd /c "scpwin.bat -v -v project.xml jos AT es3 DOT elsag DOT de:/devel/maven/home/public_html/repo/essencio-perActa/poms/idxmgr-1.0.4-SNAPSHOT.pom" Executing: program /usr/bin/ssh host es3.elsag.de, user jos, command scp -v -t /devel/maven/home/public_html/repo/essencio-perActa/poms/idxmgr-1.0.4-SNAPSHOT.pom OpenSSH_3.9p1, OpenSSL 0.9.7d 17 Mar 2004 debug2: ssh_connect: needpriv 0 debug1: Connecting to es3.elsag.de [192.168.2.73] port 22. debug1: Connection established. debug1: identity file /home/jos/.ssh/identity type -1 debug1: identity file /home/jos/.ssh/id_rsa type -1 debug2: key_type_from_name: unknown key type '-----BEGIN' debug2: key_type_from_name: unknown key type 'Proc-Type:' debug2: key_type_from_name: unknown key type 'DEK-Info:' debug2: key_type_from_name: unknown key type '-----END' debug1: identity file /home/jos/.ssh/id_dsa type 2 debug1: Remote protocol version 1.99, remote software version OpenSSH_2.3.0p1 debug1: match: OpenSSH_2.3.0p1 pat OpenSSH_2.3.0* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_3.9p1 debug2: fd 3 setting O_NONBLOCK debug2: Original cipher proposal: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc AT lysator DOT liu DOT se,aes128-ctr,aes192-ctr,aes256-ctr debug2: Compat cipher proposal: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,rijndael-cbc AT lysator DOT liu DOT se debug2: Original cipher proposal: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc AT lysator DOT liu DOT se,aes128-ctr,aes192-ctr,aes256-ctr debug2: Compat cipher proposal: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,rijndael-cbc AT lysator DOT liu DOT se debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ssh-dss debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,rijndael-cbc AT lysator DOT liu DOT se debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,rijndael-cbc AT lysator DOT liu DOT se debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160 AT openssh DOT com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160 AT openssh DOT com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib debug2: kex_parse_kexinit: none,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-dss debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc AT lysator DOT liu DOT se debug2: kex_parse_kexinit: 3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,rijndael128-cbc,rijndael192-cbc,rijndael256-cbc,rijndael-cbc AT lysator DOT liu DOT se debug2: kex_parse_kexinit: hmac-sha1,hmac-md5,hmac-ripemd160 AT openssh DOT com debug2: kex_parse_kexinit: hmac-sha1,hmac-md5,hmac-ripemd160 AT openssh DOT com debug2: kex_parse_kexinit: none,zlib debug2: kex_parse_kexinit: none,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_init: found hmac-md5 debug1: kex: server->client 3des-cbc hmac-md5 none debug2: mac_init: found hmac-md5 debug1: kex: client->server 3des-cbc hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD(2048) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug2: dh_gen_key: priv key bits set: 198/384 debug2: bits set: 500/1024 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'es3.elsag.de' is known and matches the DSA host key. debug1: Found key in /home/jos/.ssh/known_hosts:10 debug2: bits set: 537/1024 debug1: ssh_dss_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/jos/.ssh/id_dsa (0x100ed3a0) debug2: key: /home/jos/.ssh/id_codehaus (0x100eec70) debug2: key: /home/jos/.ssh/id_sf (0x100f22f8) debug2: key: /home/jos/.ssh/identity (0x0) debug2: key: /home/jos/.ssh/id_rsa (0x0) debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: /home/jos/.ssh/id_dsa debug2: we sent a publickey packet, wait for reply debug1: Server accepts key: pkalg ssh-dss blen 435 debug2: input_userauth_pk_ok: fp 8e:5f:57:a8:60:80:50:ec:0f:65:2e:0a:77:ae:56:56 debug1: Authentication succeeded (publickey). debug2: fd 4 setting O_NONBLOCK debug2: fd 5 setting O_NONBLOCK debug2: fd 6 setting O_NONBLOCK debug1: channel 0: new [client-session] debug2: channel 0: send open debug1: Entering interactive session. debug2: callback start debug2: client_session2_setup: id 0 debug1: Sending command: scp -v -t /devel/maven/home/public_html/repo/essencio-perActa/poms/idxmgr-1.0.4-SNAPSHOT.pom debug2: channel 0: request exec confirm 0 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 16384 debug2: channel 0: rcvd adjust 32768 Sending file modes: C0755 5432 project.xml debug2: channel 0: read<=0 rfd 4 len 0 debug2: channel 0: read failed debug2: channel 0: close_read debug2: channel 0: input open -> drain debug2: channel 0: ibuf empty debug2: channel 0: send eof debug2: channel 0: input drain -> closed debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug2: channel 0: rcvd eof debug2: channel 0: output open -> drain debug2: channel 0: obuf empty debug2: channel 0: close_write debug2: channel 0: output drain -> closed debug2: channel 0: rcvd close debug2: channel 0: almost dead debug2: channel 0: gc: notify user debug2: channel 0: gc: user detached debug2: channel 0: send close debug2: channel 0: is dead debug2: channel 0: garbage collecting debug1: channel 0: free: client-session, nchannels 1 debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0 debug1: Exit status 0 ========== END: Good scp-v -v output ================ Regards, Jörg -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/