Bug 989 - openssh-3.9p1 on Solaris 8 - multiplex.sh NOK
Summary: openssh-3.9p1 on Solaris 8 - multiplex.sh NOK
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Build system (show other bugs)
Version: 3.9p1
Hardware: UltraSPARC Solaris
: P5 normal
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords: help-wanted, patch
Depends on:
Blocks: 1047
  Show dependency treegraph
 
Reported: 2005-03-02 00:01 AEDT by eric vanborren
Modified: 2006-10-07 11:38 AEST (History)
0 users

See Also:


Attachments
on multiplex.sh add set -x before line "for s in 0 1 4 5 44; do" (5.60 KB, text/plain)
2005-03-03 00:56 AEDT, eric vanborren
no flags Details
make scp error in multiplex test more verbose (890 bytes, patch)
2005-03-03 15:54 AEDT, Darren Tucker
no flags Details | Diff
set -x before scp DONE ! (1.20 KB, text/plain)
2005-03-04 00:11 AEDT, eric vanborren
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description eric vanborren 2005-03-02 00:01:51 AEDT
Hi bugzilla.mindrot.org,

Thanks Darren Tucker  for your advice.

Need debug on Solaris 8 - openssh-3.9p1
see below

root@qvgdisy3 # make tests
...
run test multiplex.sh ...
test connection multiplexing: envpass
test connection multiplexing: transfer
Connecting to otherhost...
sftp> Fetching /bin/ls to /opt/SSH/openssh-3.9p1/regress/ls.copy
/bin/ls                                                                        
                 100%   18KB  18.4KB/s   00:00    
sftp> 
sh: scp: not found
scp: failed copy /bin/ls
cmp: cannot open /opt/SSH/openssh-3.9p1/regress/ls.copy
scp: corrupted copy of /bin/ls
test connection multiplexing: status 0
test connection multiplexing: status 1
test connection multiplexing: status 4
test connection multiplexing: status 5
test connection multiplexing: status 44
failed connection multiplexing
*** Error code 1
make: Fatal error: Command failed for target `t-exec'
Current working directory /opt/SSH/openssh-3.9p1/regress
*** Error code 1
make: Fatal error: Command failed for target `tests'
root@qvgdisy3 # 
-----------------------------------------------------------------------------
root@qvgdisy3 # ls -l multi*
-rw-r--r--   1 1000     1000        2330 Mar  1 11:09 multiplex.sh
root@qvgdisy3 # PATH=`pwd`/..:$PATH:. TEST_SHELL=/bin/sh TEST_SSH_TRACE=yes \
> TEST_SSH_SSHD_CONFOPTS=LogLevel=DEBUG3 sh -x test-exec.sh `pwd` \
multiplex.sh
> + [ ! -z  ] 
PORT=4242
+ [ -x /usr/ucb/whoami ] 
+ /usr/ucb/whoami 
USER=root
OBJ=/opt/SSH/openssh-3.9p1/regress
+ [ x/opt/SSH/openssh-3.9p1/regress = x ] 
+ [ ! -d /opt/SSH/openssh-3.9p1/regress ] 
SCRIPT=multiplex.sh
+ [ xmultiplex.sh = x ] 
+ [ ! -f multiplex.sh ] 
+ /bin/sh -n multiplex.sh 
+ true 
+ unset SSH_AUTH_SOCK 
SSH=ssh
SSHD=sshd
SSHAGENT=ssh-agent
SSHADD=ssh-add
SSHKEYGEN=ssh-keygen
SSHKEYSCAN=ssh-keyscan
SFTP=sftp
SFTPSERVER=/usr/libexec/openssh/sftp-server
SCP=scp
+ [ x != x ] 
+ [ x != x ] 
+ [ x != x ] 
+ [ x != x ] 
+ [ x != x ] 
+ [ x != x ] 
+ [ x != x ] 
+ [ x != x ] 
+ [ x != x ] 
+ which sshd 
SSHD=/opt/SSH/openssh-3.9p1/regress/../sshd
+ export SSH SSHD SSHAGENT SSHADD SSHKEYGEN SSHKEYSCAN SFTP SFTPSERVER SCP 
RESULT=0
PIDFILE=/opt/SSH/openssh-3.9p1/regress/pidfile
+ trap fatal 3 2 
+ cat 
        StrictModes             no
        Port                    4242
        ListenAddress           127.0.0.1
        #ListenAddress          ::1
        PidFile                 /opt/SSH/openssh-3.9p1/regress/pidfile
        AuthorizedKeysFile      /opt/SSH/openssh-3.9p1/regress/authorized_keys_%u
        LogLevel                QUIET
        AcceptEnv               _XXX_TEST_*
        AcceptEnv               _XXX_TEST
        Subsystem       sftp    /usr/libexec/openssh/sftp-server
+ [ ! -z LogLevel=DEBUG3 ] 
+ trace adding sshd_config option LogLevel=DEBUG3 
+ [ Xyes = Xyes ] 
+ echo adding sshd_config option LogLevel=DEBUG3 
adding sshd_config option LogLevel=DEBUG3
+ echo LogLevel=DEBUG3 
+ cp /opt/SSH/openssh-3.9p1/regress/sshd_config
/opt/SSH/openssh-3.9p1/regress/sshd_proxy 
+ echo StrictModes no 
+ cat 
Host *
        Hostname                127.0.0.1
        HostKeyAlias            localhost-with-alias
        Port                    4242
        User                    root
        GlobalKnownHostsFile    /opt/SSH/openssh-3.9p1/regress/known_hosts
        UserKnownHostsFile      /opt/SSH/openssh-3.9p1/regress/known_hosts
        RSAAuthentication       yes
        PubkeyAuthentication    yes
        ChallengeResponseAuthentication no
        HostbasedAuthentication no
        PasswordAuthentication  no
        RhostsRSAAuthentication no
        BatchMode               yes
        StrictHostKeyChecking   yes
+ [ ! -z  ] 
+ rm -f /opt/SSH/openssh-3.9p1/regress/known_hosts
/opt/SSH/openssh-3.9p1/regress/authorized_keys_root 
+ trace generate keys 
+ [ Xyes = Xyes ] 
+ echo generate keys 
generate keys
+ rm -f /opt/SSH/openssh-3.9p1/regress/rsa 
+ ssh-keygen -q -N  -t rsa -f /opt/SSH/openssh-3.9p1/regress/rsa 
+ echon localhost-with-alias,127.0.0.1,::1  
+ echo -n 
+ [ x-n = x ] 
+ echo \c 
+ [ x = x ] 
+ echo localhost-with-alias,127.0.0.1,::1 \c 
+ cat /opt/SSH/openssh-3.9p1/regress/rsa.pub 
+ cat /opt/SSH/openssh-3.9p1/regress/rsa.pub 
+ echo IdentityFile /opt/SSH/openssh-3.9p1/regress/rsa 
+ cp /opt/SSH/openssh-3.9p1/regress/rsa /opt/SSH/openssh-3.9p1/regress/host.rsa 
+ echo HostKey /opt/SSH/openssh-3.9p1/regress/host.rsa 
+ echo HostKey /opt/SSH/openssh-3.9p1/regress/rsa 
+ rm -f /opt/SSH/openssh-3.9p1/regress/rsa1 
+ ssh-keygen -q -N  -t rsa1 -f /opt/SSH/openssh-3.9p1/regress/rsa1 
+ echon localhost-with-alias,127.0.0.1,::1  
+ echo -n 
+ [ x-n = x ] 
+ echo \c 
+ [ x = x ] 
+ echo localhost-with-alias,127.0.0.1,::1 \c 
+ cat /opt/SSH/openssh-3.9p1/regress/rsa1.pub 
+ cat /opt/SSH/openssh-3.9p1/regress/rsa1.pub 
+ echo IdentityFile /opt/SSH/openssh-3.9p1/regress/rsa1 
+ cp /opt/SSH/openssh-3.9p1/regress/rsa1 /opt/SSH/openssh-3.9p1/regress/host.rsa1 
+ echo HostKey /opt/SSH/openssh-3.9p1/regress/host.rsa1 
+ echo HostKey /opt/SSH/openssh-3.9p1/regress/rsa1 
+ chmod 644 /opt/SSH/openssh-3.9p1/regress/authorized_keys_root 
+ cat /opt/SSH/openssh-3.9p1/regress/ssh_config 
+ echo proxycommand /opt/SSH/openssh-3.9p1/regress/../sshd -i -f
/opt/SSH/openssh-3.9p1/regress/sshd_proxy 
+ /opt/SSH/openssh-3.9p1/regress/../sshd -t -f
/opt/SSH/openssh-3.9p1/regress/sshd_proxy 
+ . multiplex.sh 
CTL=/opt/SSH/openssh-3.9p1/regress/ctl-sock
tid=connection multiplexing
DATA=/bin/ls
COPY=/opt/SSH/openssh-3.9p1/regress/ls.copy
+ start_sshd 
+ /opt/SSH/openssh-3.9p1/regress/../sshd -f
/opt/SSH/openssh-3.9p1/regress/sshd_config -t 
+ /opt/SSH/openssh-3.9p1/regress/../sshd -f
/opt/SSH/openssh-3.9p1/regress/sshd_config 
+ trace wait for sshd 
+ [ Xyes = Xyes ] 
+ echo wait for sshd 
wait for sshd
i=0
+ [ ! -f /opt/SSH/openssh-3.9p1/regress/pidfile -a 0 -lt 10 ] 
+ expr 0 + 1 
i=1
+ sleep 1 
+ [ ! -f /opt/SSH/openssh-3.9p1/regress/pidfile -a 1 -lt 10 ] 
+ test -f /opt/SSH/openssh-3.9p1/regress/pidfile 
+ trace start master, fork to background 
+ [ Xyes = Xyes ] 
+ echo start master, fork to background 
start master, fork to background
+ ssh -2 -MS/opt/SSH/openssh-3.9p1/regress/ctl-sock -F
/opt/SSH/openssh-3.9p1/regress/ssh_config -oSendEnv=_XXX_TEST -f somehost sleep 120 
+ verbose test connection multiplexing: envpass 
+ [ X != Xyes ] 
+ echo test connection multiplexing: envpass 
test connection multiplexing: envpass
+ trace env passing over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo env passing over multiplexed connection 
env passing over multiplexed connection
+ ssh -oSendEnv=_XXX_TEST -S/opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost sh 
_XXX_TEST=blah
+ [ 0 -ne 0 ] 
+ verbose test connection multiplexing: transfer 
+ [ X != Xyes ] 
+ echo test connection multiplexing: transfer 
test connection multiplexing: transfer
+ rm -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ trace ssh transfer over multiplexed connection and check result 
+ [ Xyes = Xyes ] 
+ echo ssh transfer over multiplexed connection and check result 
ssh transfer over multiplexed connection and check result
+ ssh -S/opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost cat /bin/ls 
+ test -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ cmp /bin/ls /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ rm -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ trace ssh transfer over multiplexed connection and check result 
+ [ Xyes = Xyes ] 
+ echo ssh transfer over multiplexed connection and check result 
ssh transfer over multiplexed connection and check result
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost cat /bin/ls 
+ test -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ cmp /bin/ls /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ rm -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ trace sftp transfer over multiplexed connection and check result 
+ [ Xyes = Xyes ] 
+ echo sftp transfer over multiplexed connection and check result 
sftp transfer over multiplexed connection and check result
+ sftp + -S ssh -oControlPath=/opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost 
echo get /bin/ls /opt/SSH/openssh-3.9p1/regress/ls.copy 
Connecting to otherhost...
Request failed on channel 1
Connection closed
+ test -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ fail sftp: failed copy /bin/ls 
RESULT=1
+ echo sftp: failed copy /bin/ls 
sftp: failed copy /bin/ls
+ cmp /bin/ls /opt/SSH/openssh-3.9p1/regress/ls.copy 
cmp: cannot open /opt/SSH/openssh-3.9p1/regress/ls.copy
+ fail sftp: corrupted copy of /bin/ls 
RESULT=1
+ echo sftp: corrupted copy of /bin/ls 
sftp: corrupted copy of /bin/ls
+ rm -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ trace scp transfer over multiplexed connection and check result 
+ [ Xyes = Xyes ] 
+ echo scp transfer over multiplexed connection and check result 
scp transfer over multiplexed connection and check result
+ scp -S ssh -oControlPath=/opt/SSH/openssh-3.9p1/regress/ctl-sock
otherhost:/bin/ls /opt/SSH/openssh-3.9p1/regress/ls.copy 
sh: scp: not found
+ test -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ fail scp: failed copy /bin/ls 
RESULT=1
+ echo scp: failed copy /bin/ls 
scp: failed copy /bin/ls
+ cmp /bin/ls /opt/SSH/openssh-3.9p1/regress/ls.copy 
cmp: cannot open /opt/SSH/openssh-3.9p1/regress/ls.copy
+ fail scp: corrupted copy of /bin/ls 
RESULT=1
+ echo scp: corrupted copy of /bin/ls 
scp: corrupted copy of /bin/ls
+ rm -f /opt/SSH/openssh-3.9p1/regress/ls.copy 
+ trace exit status 0 over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 0 over multiplexed connection 
exit status 0 over multiplexed connection
+ verbose test connection multiplexing: status 0 
+ [ X != Xyes ] 
+ echo test connection multiplexing: status 0 
test connection multiplexing: status 0
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost exit 0 
r=0
+ [ 0 -ne 0 ] 
+ trace exit status 0 with early close over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 0 with early close over multiplexed connection 
exit status 0 with early close over multiplexed connection
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock -n otherhost exec sh -c 'sleep
2; exec > /dev/null 2>&1; sleep 3; exit 0' 
r=0
+ [ 0 -ne 0 ] 
+ trace exit status 1 over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 1 over multiplexed connection 
exit status 1 over multiplexed connection
+ verbose test connection multiplexing: status 1 
+ [ X != Xyes ] 
+ echo test connection multiplexing: status 1 
test connection multiplexing: status 1
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost exit 1 
r=1
+ [ 1 -ne 1 ] 
+ trace exit status 1 with early close over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 1 with early close over multiplexed connection 
exit status 1 with early close over multiplexed connection
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock -n otherhost exec sh -c 'sleep
2; exec > /dev/null 2>&1; sleep 3; exit 1' 
r=1
+ [ 1 -ne 1 ] 
+ trace exit status 4 over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 4 over multiplexed connection 
exit status 4 over multiplexed connection
+ verbose test connection multiplexing: status 4 
+ [ X != Xyes ] 
+ echo test connection multiplexing: status 4 
test connection multiplexing: status 4
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost exit 4 
r=4
+ [ 4 -ne 4 ] 
+ trace exit status 4 with early close over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 4 with early close over multiplexed connection 
exit status 4 with early close over multiplexed connection
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock -n otherhost exec sh -c 'sleep
2; exec > /dev/null 2>&1; sleep 3; exit 4' 
r=4
+ [ 4 -ne 4 ] 
+ trace exit status 5 over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 5 over multiplexed connection 
exit status 5 over multiplexed connection
+ verbose test connection multiplexing: status 5 
+ [ X != Xyes ] 
+ echo test connection multiplexing: status 5 
test connection multiplexing: status 5
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost exit 5 
r=5
+ [ 5 -ne 5 ] 
+ trace exit status 5 with early close over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 5 with early close over multiplexed connection 
exit status 5 with early close over multiplexed connection
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock -n otherhost exec sh -c 'sleep
2; exec > /dev/null 2>&1; sleep 3; exit 5' 
r=5
+ [ 5 -ne 5 ] 
+ trace exit status 44 over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 44 over multiplexed connection 
exit status 44 over multiplexed connection
+ verbose test connection multiplexing: status 44 
+ [ X != Xyes ] 
+ echo test connection multiplexing: status 44 
test connection multiplexing: status 44
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock otherhost exit 44 
r=44
+ [ 44 -ne 44 ] 
+ trace exit status 44 with early close over multiplexed connection 
+ [ Xyes = Xyes ] 
+ echo exit status 44 with early close over multiplexed connection 
exit status 44 with early close over multiplexed connection
+ ssh -S /opt/SSH/openssh-3.9p1/regress/ctl-sock -n otherhost exec sh -c 'sleep
2; exec > /dev/null 2>&1; sleep 3; exit 44' 
r=44
+ [ 44 -ne 44 ] 
+ cat /opt/SSH/openssh-3.9p1/regress/pidfile 
+ kill 14894 
+ rm -f /opt/SSH/openssh-3.9p1/regress/ctl-sock 
+ cleanup 
+ [ -f /opt/SSH/openssh-3.9p1/regress/pidfile ] 
+ [ 1 -eq 0 ] 
+ echo failed connection multiplexing 
failed connection multiplexing
+ exit 1 
root@qvgdisy3 # 

I don't see what is making an error !

Best Regards,
Eric
	May The OpenSource be with you !


Pour :	ervanborren-ext@airfrance.fr
cc :	secureshell@securityfocus.com 

Objet :	Re: R?f. : openssh-3.9p1 on Solaris 8


>ervanborren-ext@airfrance.fr wrote:
>> What's the matter with openssh3.9p1 during make tests !
>>       I confirm, it is not a problem with X509.
>
>You're using the x.509 patch, but the test fails with a vanilla 3.9p1
>distribution too?
>
>>       It's OK for 3.7.1p1 but not 3.9p1.
>
>The multiplex capability is new and wasn't in 3.7x.
>
>> root@qvgdisy3 # make tests
>> ...
>> run test multiplex.sh ...
>> test connection multiplexing: envpass
>> test connection multiplexing: transfer
>> scp: failed copy /bin/ls
>
>It's probably not this but make sure /bin/ls is world readable.
>
root@qvgdisy3 # ls -l /bin/ls
-r-xr-xr-x   1 root     bin        18844 Jan  6  2000 /bin/ls
root@qvgdisy3 # /bin/ls -l
total 216
-rw-r--r--   1 1000     1000        2280 Jun 25  2004 Makefile
-rw-r--r--   1 1000     1000        3710 Aug 17  2004 README.regress
-rw-r--r--   1 1000     1000         839 Sep  4  2003 agent-getpeereid.sh
-rw-r--r--   1 1000     1000        1076 Nov 15  2003 agent-ptrace.sh
-rw-r--r--   1 1000     1000         921 Sep 13  2003 agent-timeout.sh
-rw-r--r--   1 1000     1000        1975 Sep  4  2003 agent.sh

>The regress tests normally work fine, but when they don't it can be tricky
>to figure out why.
>
>Start by running the test on its own.  From the regress dir, run something
> like this (this is from README.regress with a few extra options):
>
$ PATH=`pwd`/..:$PATH:. TEST_SHELL=/bin/sh TEST_SSH_TRACE=yes \
TEST_SSH_SSHD_CONFOPTS=LogLevel=DEBUG3 sh -x test-exec.sh `pwd` \
multiplex.sh

DONE, see output above.
>
>You may also want to remove the ">/dev/null 2>&1" from the command lines
>in multiplex.sh.

DONE
>
>You can also change the "LogLevel QUIET" in test-exec.sh to "LogLevel
>DEBUG3" and check your syslog.
>
>If it's not apparent what's failing then please open a bug at
>bugzilla.mindrot.org so it can be tracked.

--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
Comment 1 Darren Tucker 2005-03-02 13:30:44 AEDT
One simple thing it might be: does the system under test have scp installed in
the path?  The other scp tests use wrapper scripts but that won't work for
multiplex tests as the path is set by the system's shell.

Try copying scp into your path somewhere (eg /usr/local/bin) and rerunning the test.

(BTW, please create large log files as attachments rather than pasting into the
text fields, otherwise the bugs become unreadable rapidly.)
Comment 2 eric vanborren 2005-03-03 00:56:43 AEDT
Created attachment 839 [details]
on multiplex.sh add set -x before line "for s in 0 1 4 5 44; do"

Hi M. marckus

is there an option like :
--without-multiplex
--disable-multiplex
     (Where can I found it ?)

But it is not a problem of PATH, as would like as simple M. dtucker :
> One simple thing it might be: does the system under test have scp installed 
in the path? see new file attachment.

So sorry to disturb you for so simple Things ! :)
Sure, I eat multiplex at breakfast every day !
Hum this server as been armoring Solaris (5/10 CIS); by this society
ISO-8859-1.

Best Regards,
Eric
      May The OpenSource be with you !
Comment 3 Darren Tucker 2005-03-03 15:52:54 AEDT
(In reply to comment #2)
> on multiplex.sh add set -x before line "for s in 0 1 4 5 44; do"

You actually enabled set -x just after the source of the error, so unfortunately
that's not going to help.  I will attach a patch that also removes the error
redirection, please apply it to a clean tree and do "make tests LTESTS=multiplex".

BTW we will be making it (a bit) easier to debug these things with some changes
in the 4.0 release.
Comment 4 Darren Tucker 2005-03-03 15:54:25 AEDT
Created attachment 841 [details]
make scp error in multiplex test more verbose
Comment 5 eric vanborren 2005-03-04 00:11:58 AEDT
Created attachment 842 [details]
set -x before scp     DONE !

which path for scp, is that it ?
Comment 6 Darren Tucker 2005-03-15 23:05:44 AEDT
(In reply to comment #5)
> which path for scp, is that it ?

Probably.  It'll use whatever the default path is for your login shell.  Is it
possible that you get different paths between interactive and noninteractive logins?

If you do "ssh yourserver which scp" what path is reported?  You could also try
temporarily adding a symlink to the scp binary to one of the default system
paths (eg "ln -s /usr/local/bin/scp /usr/bin/scp") and see if that helps.
Comment 7 Darren Tucker 2005-10-03 20:16:50 AEST
Thanks for the report.  I have added a note to README.regress documenting this
as a limitation.
Comment 8 Darren Tucker 2006-10-07 11:38:51 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.