Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169130 - net-irc/psybnc keeps segfaulting after connecting on AMD64 (EMT64)
Summary: net-irc/psybnc keeps segfaulting after connecting on AMD64 (EMT64)
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Bjarke Istrup Pedersen (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-03 14:38 UTC by Olliver Schinagl
Modified: 2010-08-14 09:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
psybnc /etc/psybnc/psybnc.conf backtrace (backtrace.log,672 bytes, text/plain)
2007-03-03 15:15 UTC, Olliver Schinagl
Details
psybnc /etc/psybnc/psybnc.conf backtrace (backtrace.log,674 bytes, text/plain)
2007-03-03 16:21 UTC, Olliver Schinagl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olliver Schinagl 2007-03-03 14:38:46 UTC
I used psybnc for quite a while on x86. I recently migrated to an Intel EMT64 xeon based system and psybnc keeps crashing on it. It's not a hardened issue I belive as I can't read any pax details in dmeg.

Here's the psybnc.log output

nexus log # tail psybnc.log 
Sat Mar  3 15:33:41 :Listener created :0.0.0.0 port 23889 (SSL)
Sat Mar  3 15:33:41 :psyBNC2.3.2-7-cBtITLdDMSNpE started (PID :15594)
Sat Mar  3 15:33:41 :SSL initialized
Sat Mar  3 15:33:41 :Loading all Users..
Sat Mar  3 15:33:41 :No Users found.
Sat Mar  3 15:33:52 :connect from 158-13-ftth.onsnetstudenten.nl
Sat Mar  3 15:33:52 :Accepted SSL-Connection from 158-13-ftth.onsnetstudenten.nl
Sat Mar  3 15:33:57 :New User:oliver (oliver) added by oliver
Sat Mar  3 15:33:57 :Program Context : src/p_blowfish.c/InitializeBlowfish Line 423
Sat Mar  3 15:33:57 :SEGMENT VIOLATION - Crashing

nexus log # emerge --info
Portage 2.1.2-r9 (hardened/amd64, gcc-3.4.6, glibc-2.3.6-r5, 2.6.18-hardened x86_64)
=================================================================
System uname: 2.6.18-hardened x86_64 Intel(R) Xeon(TM) CPU 3.00GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 01 Mar 2007 18:30:01 +0000
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-Os -march=nocona -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-Os -march=nocona -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://vlaai.snt.utwente.nl/pub/os/linux/gentoo/ http://vlaai.snt.utwente.nl/pub/os/linux/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo"
LINGUAS="en nl"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 7zip aac acpi aim amd64 apache2 apm audiofile avi bcmath berkdb bindist boundschecking bzip2 bzlib calendar cdr cli cross crypt ctype curl curlwrappers dba dedicated dio dvb dvd dvdr encode enscript exif fam fastcgi ffmpeg fftw flac flash foomatic ftp gd gif gnutls graphviz hardened icq idn imagemagick imap ipv6 jabber jpeg justify kerberos lesstif libwww lirc logrotate maildir mcal memlimit mhash midi mikmod mime mmap mng motif mozilla msn ncurses netpbm nls nocd nptl nptlonly ogg openal oscar pam pcre php pic png posix postgres ppds python quicktime readline samba sasl scanner sdl session shared sharedmem simplexml slang slp snmp sockets speex spell sqlite sse ssl svg sysfs szip tcpd theora tidy tiff tokenizer truetype unicode unzip usb vda vhosts videos vorbis x264 xinetd xml xmlrpc xorg xvid yahoo zip zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en nl" USERLAND="GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Reproducible: Always

Steps to Reproduce:
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-03 14:42:07 UTC
Attach a backtrace here and reopen then, thanks.

http://www.gentoo.org/proj/en/qa/backtraces.xml
Comment 2 Olliver Schinagl 2007-03-03 15:15:23 UTC
Created attachment 111934 [details]
psybnc /etc/psybnc/psybnc.conf backtrace

I used gdb -> attach to get the backtrace, as psybnc forks into the background.
I emerged with:
FEATURES="nostrip splitdebug" CFLAGS="-O2 -march=nocona -ggdb" emerge psybnc
but to me it looks like i'm still missing the important debug symbols?

I don't get any pax errors so it shouldn't be due to hardened profile.
Comment 3 Olliver Schinagl 2007-03-03 15:15:51 UTC
I know i probably need a better backtrace, but need some help on obtaining that.
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-03-03 15:21:29 UTC
(In reply to comment #3)
> I know i probably need a better backtrace, but need some help on obtaining
> that.

Eh, indeed... :) You should recompile openssl w/ debugging info as well, it seems to be crashing there anyway. Can you try it?

Comment 5 Olliver Schinagl 2007-03-03 16:21:36 UTC
Created attachment 111941 [details]
psybnc /etc/psybnc/psybnc.conf backtrace

FEATURES="nostrip splitdebug" CFLAGS="-O2 -march=nocona -ggdb" emerge -av openssl
USE="-ssl -ipv6" FEATURES="nostrip splitdebug" CFLAGS="-O2 -march=nocona -ggdb" emerge -av psybnc

are the compile lines used to create this trace. Looks like the same to me.

I disabled ssl, since i can use psybnc without it just fine and it removes the dependancy.

I did as mentioned recompile openssl with gdb info, to no avail.
Comment 6 Jakub Moc (RETIRED) gentoo-dev 2007-03-03 16:26:23 UTC
So, it doesn't segfault with USE="-ssl"?
Comment 7 Olliver Schinagl 2007-03-03 16:36:37 UTC
It always segfaults, I'm sorry, I should have mentioned that. It stays up and is listening up until I have to enter the password in X-chat for example. After that it segfaults.

I'll try one of the older ebuilds, see what happens there (the bins should be identical since it hasn't been updated since 2005 i belive).
Comment 8 Olliver Schinagl 2007-03-06 16:02:56 UTC
Nearly identical issue on x86 too. Though here i can actually connect, it crashes not too long after (initiated by the user, e.g. trying to join a channel etc)

When copying my old config over though, (and not connecting with an IRC client to it) it seems to connect to all configured networks and stay up. (Both on AMD64 as X86)

Also here, it's a hardened system, but no pax errors in dmesg.

7of9 psybnc # emerge --info
Portage 2.1.2-r9 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r5, 2.6.18-hardened i686)
=================================================================
System uname: 2.6.18-hardened i686 AMD Duron(TM)Processor
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 06 Mar 2007 14:20:01 +0000
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data /usr/share/X11/xkb /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ ftp://mirror.scarlet-internet.nl/pub/gentoo ftp://mirror.nutsmaas.nl/gentoo/ http://gentoo.mirror.intouch.nl/gentoo/"
LINGUAS="nl en de"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac acpi aim alsa amr apache2 apm audiofile avi bcmath berkdb bindist bitmap-fonts browserplugin bzip2 bzlib cairo calendar cdr cli cross crypt ctype cups curl curlwrappers dba dbus dedicated dga dio dri dvb dvd dvdr encode exif exo fam fastcgi ffmpeg fftw flac flash foomatic ftp gd ggi gif gnutls gphoto2 gstreamer gtk gtk2 hal hardened icq imagemagick imap imlib imlib2 ipv6 jabber jpeg kerberos ldap lesstif libwww lirc lm_sensors logrotate lzo mad maildir mcal memlimit mhash midi mikmod mime mmap mmx mng mozbranding mozilla mp3 mp4 mp4live mpeg msn ncurses netpbm nls nocd nodrm ogg oggvorbis openal opengl oscar pam panel-plugin pcre php pic png posix postgres ppds quicktime readline sasl scanner sdl session shared sharedmem simplexml slang slp snmp sockets speex spell sse ssl startup-notification svg szip tcpd theora thumbnail thunar-vfs tidy tiff tokenizer truetype truetype-fonts type1-fonts unicode usb v4l v4l2 vda vhosts videos vorbis wma wmf x86 xcomposite xinerama xml xml2 xmlrpc xorg xpm xv xvid yahoo zip zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nl en de" LIRC_DEVICES="uirt2_raw" USERLAND="GNU" VIDEO_CARDS="radeon ati fglrx v4l"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 9 Olliver Schinagl 2007-03-07 13:44:10 UTC
The x86 issue may be unrelated. It stays up for a few hours, whether someone's using it or not, and segfaults.
A little bit more usefull crashinfo there gives:

Wed Mar  7 02:59:17 :Listener created :0.0.0.0 port 23998
<snip>
Wed Mar  7 04:23:09 :Program Context : src/p_log.c/oldfile Line 315
Wed Mar  7 04:23:09 :SEGMENT VIOLATION - Crashing

drwxr-xr-x  2 psybnc psybnc 592 Mar  7 02:59 log/

and there is a psybnc.log.old with data, so that shouldn't be it either.
Comment 10 PaX Team 2007-04-24 09:42:57 UTC
when you attach in gdb and it caches the segv, can you issue these commands as well:

  i r
  x/8i $pc
  x/8x $sp

also try to run pysbnc under valgrind, if there's some memory corruption earlier, not in the code where the actual segfault occurs, then valgrind will have a better chance to catch it.
Comment 11 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2010-04-03 12:44:39 UTC
Is this still a problem with the newest version in portage?
Comment 12 Olliver Schinagl 2010-04-03 17:10:46 UTC
tbh I haven't checked any of the new versions. I'll try it again and see what happens sometime next week or so.
Comment 13 Bjarke Istrup Pedersen (RETIRED) gentoo-dev 2010-08-14 09:48:52 UTC
No new info for several months, and I'm not able to reproduce it on my machine.

I'm closing this, reopen if needed.