From owner-freebsd-stable@FreeBSD.ORG Thu May 10 12:36:14 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EC50216A400 for ; Thu, 10 May 2007 12:36:14 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from alnrmhc11.comcast.net (alnrmhc11.comcast.net [204.127.225.91]) by mx1.freebsd.org (Postfix) with ESMTP id C52FB13C43E for ; Thu, 10 May 2007 12:36:14 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from icarus.home.lan (c-71-198-0-135.hsd1.ca.comcast.net[71.198.0.135]) by comcast.net (alnrmhc11) with ESMTP id <20070510123613b1100kbogme>; Thu, 10 May 2007 12:36:13 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 2B1BD1FA01D; Thu, 10 May 2007 05:36:13 -0700 (PDT) Date: Thu, 10 May 2007 05:36:13 -0700 From: Jeremy Chadwick To: Jeremie Le Hen Message-ID: <20070510123613.GA8180@icarus.home.lan> Mail-Followup-To: Jeremie Le Hen , freebsd-stable@FreeBSD.org References: <20070509221927.GB3986@obiwan.tataz.chchile.org> <20070509230619.GA96092@icarus.home.lan> <20070510073455.GD3986@obiwan.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070510073455.GD3986@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-stable@FreeBSD.org Subject: Re: "cu: Got hangup signal" on sio0 probe X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 12:36:15 -0000 On Thu, May 10, 2007 at 09:34:55AM +0200, Jeremie Le Hen wrote: > On Wed, May 09, 2007 at 04:06:19PM -0700, Jeremy Chadwick wrote: > > On Thu, May 10, 2007 at 12:19:27AM +0200, Jeremie Le Hen wrote: > > > % obiwan:root# cat /boot.config > > > % -D > > > % obiwan:root# grep ttyd0 /etc/ttys > > > % ttyd0 "/usr/libexec/getty std.9600" dialup on secure > > > > > > This works correctly but on startup, when the kernel probes sio0, > > > I get "Got hangup signal". Is it expected? > > > > I wonder if that's some sort of reference to carrier detect being > > wired wrong on whatever device or adapter you have connected to > > your serial port. > > > > However, I can't find this string referenced anywhere in the kernel > > source code for RELENG_6. An (admittedly bad) egrep shows: > > > > $ egrep -r "Got .+ signal" /usr/src > > /usr/src/contrib/amd/amd/nfs_start.c: /* Got a signal */ > > /usr/src/usr.bin/make/job.c: * Got a signal. Set global variables and hope that someone will > > /usr/src/usr.sbin/bluetooth/bthidd/bthidd.c: syslog(LOG_NOTICE, "Got signal %d, total number of signals %d", > > /usr/src/usr.sbin/bluetooth/hcsecd/hcsecd.c: syslog(LOG_DEBUG, "Got signal %d, total number of signals %d", > > /usr/src/usr.sbin/bluetooth/sdpd/main.c: log_notice("Got signal %d. Total number of signals received %d", > > > > What version of FreeBSD are you referring to? > > cu(1) was running on RELENG_4 :-). But I expected to problem to be on > the remote side, a RELENG_6 box. I'm sure you know RELENG_4 has been decomissioned/is no longer supported. :-) RELENG_4 has a couple references to the string, but only in userland utilities -- I see no evidence of this message coming from the kernel when sio0 is probed (I read "probed" as "when sio0 is detected and configured by the kernel during boot-time"). The most likely culprits are these: /usr/src/gnu/libexec/uucp/common_sources/log.c: ulog (LOG_ERROR, "Got %s signal", azSignal_names[isig]); /usr/src/sbin/startslip/startslip.c: syslog(LOG_INFO, "%s: got hangup signal", username); As pointed out, I don't find any evidence of these strings in RELENG_6. The entry for uucp/common_sources/log.c will output "Got hangup signal" if SIGHUP (kill -HUP) is sent to the program. The actual string ("hangup") that gets sent is defined in uucp/common_sources/uudefs.h. The logging is done via syslog(), level LOG_ERROR, which means the output could end up a console (read: serial console) since the default syslog.conf on FreeBSD says *.err --> /dev/console. sbin/startslip/startslip.c will output "got hangup signal" on a SIGHUP (kill -HUP) when someone is logged in. It gets logged via syslog(), level LOG_INFO. Again, same rules apply to the syslog.conf. Other than these two examples, I don't see how you're getting the message you're seeing. My guess is that you're using uucp. > > Consider using uart(4) as a possible alternative, but depending upon > > the answer to the above question, this might not be applicable. > > > > I wrote some directions on how to get uart(4) to work, and one caveat I > > found when attempting to use it. Those docs are here: > > > > http://jdc.parodius.com/freebsd_uart.txt > > Do you mean on the client or server side? The directions apply to whatever machine you want to use uart(4) on as a replacement for sio(4). But this doesn't matter because you're using a RELENG_4 box and not RELENG_6 (uart(4) isn't available in 4.x). -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |