From owner-freebsd-hackers Tue Jul 23 23:21:08 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id XAA20504 for hackers-outgoing; Tue, 23 Jul 1996 23:21:08 -0700 (PDT) Received: from clipper.cs.kiev.ua (root@cs-demon-64k.cs.kiev.ua [193.124.48.251]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id XAA20474 for ; Tue, 23 Jul 1996 23:20:45 -0700 (PDT) Received: from dog by clipper.cs.kiev.ua with uucp id m0uix5Z-00050sC; Wed, 24 Jul 96 09:06 WET DST Received: (from dk@localhost) by dog.farm.org (8.7.5/dk#3) id BAA00994; Wed, 24 Jul 1996 01:43:33 -0400 (EDT) From: Dmitry Kohmanyuk Message-Id: <199607240543.BAA00994@dog.farm.org> Subject: Re: lp booting: first cut To: phk@critter.tfs.com (Poul-Henning Kamp) Date: Wed, 24 Jul 1996 01:43:33 -0400 (EDT) Cc: dk+@ua.net, freebsd-hackers@freebsd.org In-Reply-To: <406.838160103@critter.tfs.com> from Poul-Henning Kamp at "Jul 24, 96 00:15:03 am" Reply-To: dk+@ua.net X-Class: Fast X-OS-Of-Choice: FreeBSD 2.2-960501-SNAP X-NIC-Handle: DK379 X-Pager-Email: dk@interpage.net X-Mailer: ELM [version 2.4ME+ PL13 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Quoting Poul-Henning Kamp: > >Now if somebody would explain me how to trace this mysterious hang by DDB. > >I try to boot -s, and still get a hang. ctrl-alt-esc just throws me into > >debugger with stack trace down to idleloop() or something. `ps' in ddb > >doesn't show anything but a basic crowd (swapper init pagedaemon vmdaemon > >update). I would try to boot -d now. > > Try to run tcpdump on the server and see what comes your way. as I said, the tcpdump in 2.2-960501-SNAP doesn't work with lp0. I have carefully looked at BPF stuff in lpt.c and cannot understand why. I would be grateful for a patch. also, it appears that portmapper is broken at least twice in this snap: first, it cannot get list of all addresses (including aliases) - I have resorted to hack on from_local.c:from_local() to return TRUE always ;-( second, mountd doesn't work if hostname is bound to alias or to nearest end of slip interface, e.g.: working configuration: !ifconfig -au lp0: flags=8851 mtu 1500 inet 193.124.48.195 --> 193.124.48.198 netmask 0xffffff00 ^^my hostname^^ ^^^diskless^^^ tun0: flags=8051 mtu 1500 inet 10.0.2.15 --> 10.0.2.2 netmask 0xff000000 lo0: flags=8009 mtu 16384 inet 127.0.0.1 netmask 0xff000000 inet 193.124.48.200 netmask 0xffffff00 inet 193.124.48.201 netmask 0xffffff00 inet 193.124.48.202 netmask 0xffffff00 if dog.farm.org (193.124.48.195) is bound as alias to lo0 instead (and I use other address for closer end of lp0), or if I bound it to closer end of sl0, mountd and nfsd cannot register with portmapper: not-working configuration: changed lp0: lp0: flags=8851 mtu 1500 inet 193.124.48.197 --> 193.124.48.198 netmask 0xffffff00 added sl0: sl1: flags=c010 mtu 552 inet 193.124.48.195 --> 0.0.0.1 netmask 0xffffff00 I understand that binding addresses to separate slip interface is a kludge, but it is somewhat more reliable kludge than using interface alias. (and I have used to do it on SCO(tm) Unix(tm) 3.2.4.2 , which doesn't have aliases.) Also, after a couple of hours spent with DDB (btw, why a manual page mentions x/m which doesn't work??), I figured that the hang is inside infinite loop in nfs/nfs_socket.c:nfs_reply(). I have then changed the place where I put my hostname (e.g., changed from non-working to working configuration ;-)), and it started to work! So it seems that this is a multi-homed setup I have which causes this trouble. (probably nfs client sends packets to .195, and expects answers coming back from this address, but they arrive with .197. ) Now I managed to get it single-user (flags s in bootp config file) until `Enter pathname of shell or RETURN for sh:' and `Erase is...' line after that. Then, it hangs. (the only tool I have on the remote side is netstat -I lp0 4, which is pretty enough to see when the interface dies; I cannot ping anymore, I cannot even break to DDB on the client.) At this point, I start to think that my DTR-1 (Cyrix 486SLC, running at 8MHz since running it at 25MHz causes reboot just after loading kernel) is somewhat fundamentally broken and non-compatible with PLIP. I have already tweaked LPMAXSPIN[12]. Please somebody test my patches on more standard machine and report whether they work or not. I am 99% sure that they would be absolutely OK. Dmitry.