[IRCServices] Segfault on Opteron (64-bit) Linux

Liverbugg liverbugg at rinux.org
Tue Oct 5 18:50:24 PDT 2004


I'm trying to run ircservices on a dual opteron server and I'm getting 
segfaults.  I've tried 5.0.31, 5.0.38, and 5.0.41 over the last few 
months and just had enough time recently to try to debug.  The computer 
is a dual Opteron 242 running Gentoo Linux.  The server I'm trying to 
link to is Unrealircd-3.2 running on the same machine.  Ircservices runs 
fine with the same config linking to the same server if I run it on a 
32bit x86 machine.

The compile has lots of warnings that I don't see on a 32bit machine like:

modules/statserv/main.c:127: warning: cast from pointer to integer of 
different size
modules/statserv/main.c:127: warning: cast to pointer from integer of 
different size

This is what I see in the the log when running ircservices -debug:

[Oct 04 20:36:13.560828 2004] IRC Services 5.0.41 starting up (options: 
debug)
[Oct 04 20:36:13.560991 2004] debug: Loading language 0 from file 
`languages/en_us'
.....unimportant stuff cut.....
[Oct 04 20:36:13.578803 2004] debug: Sent: NICK HelpServ 1 1096936573 
services lanchelms.com services.lanchelms 0 +Sqd lanchelms.com :Help Server
[Oct 04 20:36:13.578835 2004] debug: Received: :squall.local NOTICE AUTH 
:*** Looking up your hostname...
[Oct 04 20:36:32.983294 2004]

If I run it with ircservices -debug -nofork all I see in the log is this 
(this is from 2 tries):

[Oct 04 19:59:43 2004] [Oct 04 20:04:50 2004]

If I run it with no parameters the server sees services come on line but 
die right away:

-squall.local- *** Notice -- (link) Link squall.local -> 
services.lanchelms[@127.0.0.1.6677] established
-squall.local- Lost connection to 
services.lanchelms[127.0.0.1]:Connection reset by peer

but if I run it with -nofork the server never sees the connection

There is no core generated, even when I compiled with ./configure 
-dumpcore -cflags -g -defaults, but here is what gdb shows when running 
ircservices in it with -nofork -debug:

Squall bin # gdb ./ircservices
GNU gdb 6.2
Copyright 2004 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 "x86_64-pc-linux-gnu"...Using host 
libthread_db library "/lib/libthread_db.so.1".

Starting program: /opt/ircservices/bin/ircservices -nofork -debug
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

Program received signal SIGSEGV, Segmentation fault.
0x0000002a956d63d0 in strlen () from /lib/libc.so.6
(gdb) bt
#0  0x0000002a956d63d0 in strlen () from /lib/libc.so.6
#1  0x0000002a956aca46 in vfprintf () from /lib/libc.so.6
#2  0x0000002a956ae4f9 in vfprintf () from /lib/libc.so.6
#3  0x0000002a956aa34a in vfprintf () from /lib/libc.so.6
#4  0x000000000040bf28 in vlogprintf (fmt=0x47e2dd "%s", args=0x7fbffff070)
    at log.c:123
#5  0x000000000040bff7 in logprintf (fmt=0x47e2dd "%s") at log.c:131
#6  0x000000000040c018 in logputs (
    str=0x7fbffff1a0 "[Oct 05 19:56:41.285530 2004] ") at log.c:137
#7  0x000000000040c163 in write_time () at log.c:167
#8  0x000000000040c46a in log (
    fmt=0x47d8f0 "IRC Services %s starting up (options:%s%s%s)") at 
log.c:287
#9  0x00000000004097c7 in init (ac=3, av=0x7fbffff568) at init.c:756
#10 0x000000000040cf78 in main (ac=3, av=0x7fbffff568, envp=0x7fbffff588)
    at main.c:225
(gdb)

Let me know if theres any other info you need or if you want access to 
the machine to debug.

Thanks,

 - Matt