Subject: inetd / tftpd regression
To: None <current-users@netbsd.org>
From: Jukka Salmi <j+nbsd@2005.salmi.ch>
List: current-users
Date: 04/06/2005 21:12:13
Hello,

I just tried to netboot a diskless machine (Soekris net4511) using PXE
and failed. This worked with current last time I tried (some months ago),
and it still works with netbsd-2 systems.

This is _not_ PR 25174 (which is still valid for HEAD and netbsd-2).
The pxeboot_ia32_com0.bin file I'm using works with a netbsd-2 system.

I traced inetd on both working (netbsd-2) and non-working (current)
systems. Traces look similar until a forked tftpd child exits; the current
system then just hangs, and the client times out:

12158 tftpd    GIO   fd 3 wrote 96 bytes
      "<30>Apr  6 20:21:17 tftpd[12158]: 212.254.26.72: read request for pxeb\
       oot_ia32_com0.bin: success"
12158 tftpd    RET   sendto 96/0x60
12158 tftpd    CALL  __sigaction_sigtramp(0xe,0xbfbfe9a0,0xbfbfe980,0xbdb834a4,1)
12158 tftpd    RET   __sigaction_sigtramp 0
12158 tftpd    CALL  __sigprocmask14(0,0,0x805cdb8)
12158 tftpd    RET   __sigprocmask14 0
12158 tftpd    CALL  sendto(0,0x804cbc0,0xe,0,0,0)
12158 tftpd    GIO   fd 0 wrote 14 bytes
      "\0\^Ftsize\00041720\0"
12158 tftpd    RET   sendto 14/0xe
12158 tftpd    CALL  setitimer(0,0xbfbfe9c0,0xbfbfe9b0)
12158 tftpd    RET   setitimer 0
12158 tftpd    CALL  recvfrom(0,0x804c9a0,0x200,0,0,0)
12158 tftpd    GIO   fd 0 read 17 bytes
      "\0\^E\0\0TFTP Aborted\0"
12158 tftpd    RET   recvfrom 17/0x11
12158 tftpd    CALL  setitimer(0,0xbfbfe9c0,0xbfbfe9b0)
12158 tftpd    RET   setitimer 0
12158 tftpd    CALL  close(1)
12158 tftpd    RET   close 0
12158 tftpd    CALL  exit(0)


The current system now hangs, but the netbsd-2 system continues:

19982 inetd    RET   kevent 1
19982 inetd    CALL  fork
19982 inetd    RET   fork 10816/0x2a40
19982 inetd    CALL  kevent(3,0x804eec0,1,0xbfbff2f0,0x40,0)
10816 inetd    EMUL  "netbsd"
10816 inetd    RET   fork 0
[...and eventually executes another tftpd]
10816 inetd    CALL  execve(0x80500c0,0x8054440,0xbfbffa74)
10816 inetd    NAMI  "/usr/libexec/tftpd"
10816 inetd    NAMI  "/usr/libexec/ld.elf_so"
10816 tftpd    EMUL  "netbsd"
[...]


Hmm, any hints?

TIA, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~