Hello. At my system: CYGWIN_NT-5.1 1.3.13(0.62/3/2) 2002-10-13 23:15 sshd fails in fork: ------------------------- sshd -------------------------------- /usr/sbin>./sshd.exe -d debug1: sshd version OpenSSH_3.4p1 debug1: private host key: #0 type 0 RSA1 debug1: read PEM private key done: type RSA debug1: private host key: #1 type 1 RSA debug1: read PEM private key done: type DSA debug1: private host key: #2 type 2 DSA debug1: Bind to port 22 on 0.0.0.0. Server listening on 0.0.0.0 port 22. Generating 768 bit RSA key. RSA key generation complete. debug1: Server will not fork when running in debugging mode. Connection from 127.0.0.1 port 2598 debug1: Client protocol version 1.5; client software version OpenSSH_3.4p1 debug1: match: OpenSSH_3.4p1 pat OpenSSH* debug1: Local version string SSH-1.99-OpenSSH_3.4p1 debug1: Sent 768 bit server key and 1024 bit host key. debug1: Encryption type: 3des debug1: cipher_init: set keylen (16 -> 32) debug1: cipher_init: set keylen (16 -> 32) debug1: Received session key; encryption turned on. debug1: Installing crc compensation attack detector. debug1: Attempting authentication for kim. debug1: temporarily_use_uid: 500/544 (e=500) debug1: trying public RSA key file /home/kim/.ssh/authorized_keys debug1: restore_uid Failed rsa for kim from 127.0.0.1 port 2598 debug1: rcvd SSH_CMSG_AUTH_TIS Failed challenge-response for kim from 127.0.0.1 port 2598 Accepted password for kim from 127.0.0.1 port 2598 debug1: session_new: init debug1: session_new: session 0 debug1: Allocating pty. debug1: session_pty_req: session 0 alloc /dev/tty2 9 [main] sshd 1872 sync_with_child: child 228(0x610) died before initialization with status code 0x80 8434 [main] sshd 1872 sync_with_child: *** child state waiting for longjmp Disconnecting: fork failed: Resource temporarily unavailable debug1: Calling cleanup 0x416ca0(0x44d4e0) debug1: session_pty_cleanup: session 0 release /dev/tty2 debug1: Calling cleanup 0x41e360(0x0)
------------------------------- ssh ---------------------------------- ~>ssh -vv localhost OpenSSH_3.4p1, SSH protocols 1.5/2.0, OpenSSL 0x0090607f debug1: Reading configuration data /home/kim/.ssh/config debug1: Reading configuration data /etc/ssh_config debug1: Rhosts Authentication disabled, originating port will not be trusted. debug1: ssh_connect: needpriv 0 debug1: Connecting to localhost [127.0.0.1] port 22. debug1: Connection established. debug1: identity file /home/kim/.ssh/identity type 0 debug1: Remote protocol version 1.99, remote software version OpenSSH_3.4p1 debug1: match: OpenSSH_3.4p1 pat OpenSSH* debug1: Local version string SSH-1.5-OpenSSH_3.4p1 debug1: Waiting for server public key. debug1: Received server public key (768 bits) and host key (1024 bits). debug1: Host 'localhost' is known and matches the RSA1 host key. debug1: Found key in /home/kim/.ssh/known_hosts:7 debug1: Encryption type: 3des debug1: Sent encrypted session key. debug1: cipher_init: set keylen (16 -> 32) debug1: cipher_init: set keylen (16 -> 32) debug1: Installing crc compensation attack detector. debug1: Received encrypted confirmation. debug1: Trying RSA authentication with key '/home/kim/.ssh/identity' debug1: Server refused our key. debug1: Doing challenge response authentication. debug1: No challenge. debug1: Doing password authentication. kim@localhost's password: debug1: Requesting pty. debug1: fd 3 setting TCP_NODELAY debug1: Requesting shell. debug1: Entering interactive session. Received disconnect from 127.0.0.1: fork failed: Resource temporarily unavailable debug1: Calling cleanup 0x40c2d8(0x0) debug1: Calling cleanup 0x419440(0x0) --------------------------- strace output ---------------------- 106 2418684 [main] sshd 240 fork: entering 226 2418910 [main] sshd 240 subproc_init: started wait_subproc thread 0x668 178 2419088 [main] sshd 240 stack_base: bottom 0x230000, top 0x30000, stack 0x22EF48, size 4280, reserve 2097152 63 2419151 [main] sshd 240 fork_parent: CreateProcess (C:\cygwin\usr\sbin\sshd.exe, C:\cygwin\usr\sbin\sshd.exe, 0, 0, 1, 24, 0, 0, 0x22F3D8, 0x22F428) 848 2419999 [proc] sshd 240 wait_subproc: starting 4261 2424260 [main] sshd 240 dtable::fixup_before_fork: fd 0 (/dev/piper) 1687 2425947 [main] sshd 240 dtable::fixup_before_fork: fd 1 (/dev/pipew) 168 2426115 [main] sshd 240 dtable::fixup_before_fork: fd 2 (/dev/pipew) 55 2426170 [main] sshd 240 dtable::fixup_before_fork: fd 3 (/dev/streamsocket) 305 2426475 [main] sshd 240 fhandler_socket::fixup_before_fork_exec: WSADuplicateSocket went fine, sock 0x678, win_proc_id 836, prot_info_ptr 0x61680764 121 2426596 [main] sshd 240 dtable::fixup_before_fork: fd 4 (/dev/tcp) 86 2426682 [main] sshd 240 fhandler_socket::fixup_before_fork_exec: WSADuplicateSocket went fine, sock 0x694, win_proc_id 836, prot_info_ptr 0x61680A44 60 2426742 [main] sshd 240 dtable::fixup_before_fork: fd 5 (/dev/piper) 53 2426795 [main] sshd 240 dtable::fixup_before_fork: fd 6 (/dev/pipew) 53 2426848 [main] sshd 240 dtable::fixup_before_fork: fd 7 (/dev/streamsocket) 81 2426929 [main] sshd 240 fhandler_socket::fixup_before_fork_exec: WSADuplicateSocket went fine, sock 0x684, win_proc_id 836, prot_info_ptr 0x61680F1C 1267 2428196 [main] sshd 240 proc_subproc: args: 1, 2289608 166 2428362 [main] sshd 240 proc_subproc: added pid 836 to wait list, slot 0, winpid 0x344, handle 0x644 60 2428422 [main] sshd 240 proc_subproc: returning 1 59 2428481 [main] sshd 240 sync_with_child: waiting for child. reason: waiting for longjmp, hang_child 1 248 2428729 [proc] sshd 240 wait_subproc: looping 6228 2434957 [proc] sshd 240 proc_subproc: args: 2, 0 184 2435141 [proc] sshd 240 proc_subproc: pid 836[0] terminated, handle 0x644, nchildren 1, nzombies 0 57 2435198 [proc] sshd 240 proc_subproc: zombifying [0], pid 836, handle 0x644, nchildren 1 56 2435254 [proc] sshd 240 proc_subproc: returning 1 55 2435309 [proc] sshd 240 sig_send: pid 240, signal 20, its_me 1 58 2435367 [proc] sshd 240 sig_send: Not waiting for sigcomplete. its_me 1 signal 20 5526 2440893 [proc] sshd 240 sig_send: returning 0 from sending signal 20 127 2441020 [proc] sshd 240 wait_subproc: looping 273 2441293 [sig] sshd 240 wait_sig: awake 77 2441370 [sig] sshd 240 wait_sig: processing signal 20 54 2441424 [sig] sshd 240 wait_sig: Got signal 20 53 2441477 [sig] sshd 240 sig_handle: signal 20 79 2441556 [sig] sshd 240 sig_handle: default signal 20 ignored 56 2441612 [sig] sshd 240 sig_handle: returning 0 55 2441667 [sig] sshd 240 proc_subproc: args: 3, 0 55 2441722 [sig] sshd 240 proc_subproc: looking for processes to reap 53 2441775 [sig] sshd 240 proc_subproc: finished processing terminated/stopped child 53 2441828 [sig] sshd 240 proc_subproc: returning 1 52 2441880 [sig] sshd 240 wait_sig: looping -634 2441246 [main] sshd 240 sync_with_child: child 836(0x644) died before initialization with status code 0x80 3114 2444360 [main] sshd 240 sync_with_child: *** child state waiting for longjmp 2009 2446369 [main] sshd 240 sync_with_child: Child died before subproc_ready signalled 81 2446450 [main] sshd 240 fork: -1 = fork() ---------------------------------------------------------------------------- --- But simple fork application: int main() { fork(); printf( "Hello\n"); return 0; } works fine. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/