Hi, when trying to open a second channel from an SSH client onto an OpenSSH server, the sshd signals 10022 (EINVAL) errors around the select() statement used for the second channel. It does not mind if this 2nd channel was opened for a port forwarding or by an sftp request, both operations from the client's side show the same effect. Using the first channel opened by the client is no problem for sshd.
Here's the part of the strace on sshd which repeats until sshd is killed by control-C:strace -m select /usr/sbin/sshd -d -D -e -f /usr/local/etc/sshd_config > sshd-trace.log 2>&1
--2227 46541177 [main] sshd 2008 cygwin_select: 12, 0x10012EF0, 0x10012EA0, 0x0, 0x0
301 46541478 [main] sshd 2008 cygwin_select: to NULL, ms FFFFFFFF 27 46541505 [main] sshd 2008 cygwin_select: sel.always_ready 0 135 46541640 [main] sshd 2008 start_thread_socket: Handle 0x704 25 46541665 [main] sshd 2008 start_thread_socket: Added to readfds 26 46541691 [main] sshd 2008 start_thread_socket: Added to writefds 25 46541716 [main] sshd 2008 start_thread_socket: Added to exceptfds 26 46541742 [main] sshd 2008 start_thread_socket: exitsock 0x67C 26 46541768 [main] sshd 2008 start_thread_socket: stuff_start 0x22E5E4196 46541964 [main] sshd 2008 select_stuff::wait: woke up. wait_ret 1. verifying
36 46542000 [main] sshd 2008 set_bits: me 0x1001B878, testing fd 11 () 38 46542038 [main] sshd 2008 set_bits: ready 0 25 46542063 [main] sshd 2008 set_bits: me 0x1001B848, testing fd 10 () 26 46542089 [main] sshd 2008 set_bits: ready 124 46542113 [main] sshd 2008 set_bits: me 0x10013610, testing fd 7 (/dev/ptmx)
26 46542139 [main] sshd 2008 set_bits: ready 0 25 46542164 [main] sshd 2008 set_bits: me 0x100135E0, testing fd 4 () 30 46542194 [main] sshd 2008 set_bits: ready 0 25 46542219 [main] sshd 2008 select_stuff::wait: gotone 1 25 46542244 [main] sshd 2008 select_stuff::wait: returning 026 46542270 [main] sshd 2008 select_stuff::cleanup: calling cleanup routines 72 46542342 [main] sshd 2008 socket_cleanup: si 0x10014378 si->thread 0x610FFC8C 118 46542460 [main] sshd 2008 socket_cleanup: sent a byte to exitsock 0x67C, res 1 45 46542505 [select_socket] sshd 2008 thread_socket: stuff_start 0x1001738C 67 46542572 [select_socket] sshd 2008 thread_socket: Win32 select returned 3 34 46542606 [select_socket] sshd 2008 thread_socket: s 0x10012EB0, testing fd 3 ()
31 46542637 [select_socket] sshd 2008 thread_socket: read_ready 30 46542667 [select_socket] sshd 2008 thread_socket: write_ready 29 46542696 [select_socket] sshd 2008 thread_socket: saw exitsock read56 46542752 [main] sshd 2008 socket_cleanup: reading a byte from exitsock 0x67C
58 46542810 [main] sshd 2008 socket_cleanup: recv returned 1 59 46542869 [main] sshd 2008 socket_cleanup: returning 39 46542908 [main] sshd 2008 peek_pipe: , already ready for write 32 46542940 [main] sshd 2008 set_bits: me 0x1001B848, testing fd 10 () 28 46542968 [main] sshd 2008 set_bits: ready 1 60 46543028 [main] sshd 2008 peek_socket: considering handle 0x704 32 46543060 [main] sshd 2008 peek_socket: adding except fd_set , fd 3 31 46543091 [main] sshd 2008 peek_socket: WINSOCK_SELECT returned -1 31 46543122 [main] sshd 2008 peek_socket: error 10022 59 46543181 [main] sshd 2008 select_stuff::poll: returning 129 46543210 [main] sshd 2008 select_stuff::cleanup: calling cleanup routines 31 46543241 [main] sshd 2008 select_stuff::~select_stuff: deleting select records 5625 21232304 [main] sftp-server 2576 cygwin_select: 5, 0xFEE0008, 0xFEE21A0, 0x0, 0x0
96 21232400 [main] sftp-server 2576 cygwin_select: to NULL, ms FFFFFFFF 25 21232425 [main] sftp-server 2576 cygwin_select: sel.always_ready 0172 21232597 [select_pipe] sftp-server 2576 peek_pipe: , ready for read: avail 28672 40 21232637 [main] sftp-server 2576 select_stuff::wait: woke up. wait_ret 1. verifying 29 21232666 [main] sftp-server 2576 set_bits: me 0xFEE2640, testing fd 3 ()
28 21232694 [main] sftp-server 2576 set_bits: ready 1 26 21232720 [main] sftp-server 2576 select_stuff::wait: gotone 1 25 21232745 [main] sftp-server 2576 select_stuff::wait: returning 040 21232785 [main] sftp-server 2576 select_stuff::cleanup: calling cleanup routines
73 21232858 [main] sftp-server 2576 peek_pipe: , already ready for read25 21232883 [main] sftp-server 2576 set_bits: me 0xFEE2640, testing fd 3 ()
27 21232910 [main] sftp-server 2576 set_bits: ready 1 26 21232936 [main] sftp-server 2576 select_stuff::poll: returning 126 21232962 [main] sftp-server 2576 select_stuff::cleanup: calling cleanup routines 27 21232989 [main] sftp-server 2576 select_stuff::~select_stuff: deleting select records
-- These messages are raised from src/winsup/cygwin/select.cc. Unfortunately, I have no idea on how to get a more precise error description besides the pure number 10022 from Windows/Cygwin. In the attachment, find the complete strace log. I' using OpenSSH 4.0p1. The cygwin1.dll has version 1.5.17. OS is Windwos XP Build 2600.xpsp_sp2_gdr.050301-1519: Service Pack 2 It is *not* the reason of a maybe installed VPN client, I have no VPN client installed on my machine. Questions: - Are there other people suffering from this behavior? Is this problem already known? I've found nothing appropiate in the mailing list archives. - Is there a possibility to trace the error cause mor accurate? And the most important question: - Is there a bug fix? Viele Grüße, Heiko
sshd-trace.log.bz2
Description: Binary data
-- 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/