Subject: Re: ircd-hybrid on sparc64 NetBSD 2.0 produces "Bus error"
To: None <tech-pkg@netbsd.org>
From: Ryan Cresawn <cresawn@chass.utoronto.ca>
List: tech-pkg
Date: 03/23/2005 11:14:08
Hi,

Thanks for the many suggestions.  I have tried to follow the advice
given.  Richard, I did not see any unusual messages in the output of
dmesg.

I modifed /etc/mk.conf as shown below and recompiled ircd-hybrid.

# cat /etc/mk.conf
INSTALL_UNSTRIPPED=YES
CFLAGS=-O0 -g3
CXXFLAGS=-O0 -g3


Next, I ran gdb as shown below.  After calling run I connected to port
6667 on the computer with telnet which caused ircd to generate the
Broken pipe error.

# gdb ircd
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "sparc64--netbsdelf"...
(gdb) run -nx3
Starting program: /usr/pkgsrc/chat/ircd-hybrid/work/ircd-hybrid-6.2/src/ircd -nx3
WARNING: running ircd as user irc
         and as group irc.
Value of NOFILE is 64

Program received signal SIGPIPE, Broken pipe.
0x0000000040932450 in sendto () from /usr/lib/libc.so.12
(gdb) bt
#0  0x0000000040932450 in sendto () from /usr/lib/libc.so.12
#1  0x000000000011f698 in send_auth_query (auth=0x472300) at s_auth.c:514
#2  0x0000000000121100 in read_message (delay=5, mask=255 '?') at s_bsd.c:1364
#3  0x000000000010e034 in io_loop (delay=5) at ircd.c:513
#4  0x000000000010e88c in main (argc=2, argv=0x49c580) at ircd.c:949
#5  0x00000000001021d8 in ___start ()
(gdb)

What should I do next?

Ryan


On Wed, Mar 23, 2005 at 12:19:31AM -0500, Ryan Cresawn wrote:
> Hi,
> 
> I have an Ultra1 with NetBSD 2.0 which I would like to use as an
> office IRC server.  I hope to use ircd-hybrid on this computer but
> each attempt yields the same error:
> 
> # ./ircd-hybrid -nx 3
> WARNING: running ircd as user irc
>          and as group irc.
> Value of NOFILE is 64
> Bus error
> 
> To reproduce this error on sparc64 NetBSD 2.0 compile ircd-hybrid from
> pkgsrc-2004Q4, pkgsrc-2005Q1 or pkgsrc and then run the daemon
> directly as shown above.  Finally, connect to it with any IRC client
> or telnet.  The daemon exits in less than a minute with the error
> shown above.
> 
> I ran ktruss as well to gain some more information and what I found
> reveals that after ircd-hybrid writes to the socket that there was no
> reponse from ident it then enters a loop calling poll() and
> gettimeofday().  It does this many times until it finally produces
> this message:
> 
> 20339 ircd-hybrid PSIG  SIGBUS SIG_DFL
> 
> If the ktruss output file is useful to anyone I'm happy to provide it.
> 
> Ryan