Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66041 - fortune-1.99.1 randomly segfaults on amd64
Summary: fortune-1.99.1 randomly segfaults on amd64
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: AMD64 Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-01 09:40 UTC by Daniel Solano Gómez
Modified: 2005-01-01 08:49 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Solano Gómez 2004-10-01 09:40:13 UTC
Occasionally, when running fortune-1.99.1, part of the way through displaying a fortune, the program will end prematurely with the message "Segmentation fault"

For example: 
~> fortune
Old Tom Bombadil is a merry fellow,
Segmentation fault
~>

I haven't able to discern any pattern as to why/when it fails.  The follosing line is added to my syslog each time:
[kernel] fortune[26169]: segfault at 0000000000000018 rip 0000002a95983ecb rsp 0000007fbfff70e0 error 6

Usually it's the same error, though I have seen this once:
[kernel] fortune[26131]: segfault at 0000000000000022 rip 0000002a9598436f rsp 0000007fbfff71a0 error 4


Portage 2.0.50-r11 (default-amd64-2004.2, gcc-3.3.4, glibc-2.3.4.20040808-r0, 2.6.8-gentoo-r4)
=================================================================
System uname: 2.6.8-gentoo-r4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.4.16
ccache version 2.3 [enabled]
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb:/usr/share/texmf/tex/generic/config/ /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/gconf:/etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://mirror.nutsmaas.nl/gentoo/ http://gentoo.tiscali.nl/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi aim alsa amd64 apache2 apm avi berkdb bidi bitmap-fonts bonobo canna cdr cjk crypt cups divx4linux doc dvd dvdr encode esd flac foomaticdb freewnn gdbm gif gnome gpm gtk gtk2 gtkhtml guile icq imlib ipv6 java jpeg lcms ldap libg++ libwww mikmod motif mpeg msn ncurses nls nogcj offensive oggvorbis opengl oss pam pdflib perl png postgres python qt quicktime readline samba sdl slang spell ssl tcpd tetex tidy truetype unicode videos xine xml2 xmms xpm xprint xv zlib"
Comment 1 Danny van Dyk (RETIRED) gentoo-dev 2004-11-20 04:11:47 UTC
dvandyk@phi fortune $ fortune -m "^Old Tom Bombadil is a merry" songs-poems
(/usr/share/fortune/songs-poems)
%
Old Tom Bombadil is a merry fellow,
Bright blue his jacket is, and his boots are yellow.
None has ever caught him yet, for Tom, he is the master:
His songs are stronger songs, and his feet are faster.
                -- J. R. R. Tolkien
%

Sorry, can't recreate this segfault :-/
Comment 2 tklauser 2004-11-23 10:18:10 UTC
Could post an output of "strace fortune"? You may have to emerge strace if you haven't done so already.
Comment 3 James Stockton 2004-12-30 16:22:20 UTC
for ((i = 1; i <= 1000000; i++)); do fortune -m "^Old Tom Bombadil is a merry" songs-poems; done

(/usr/share/fortune/songs-poems)
%
Old Tom Bombadil is a merry fellow,
Bright blue his jacket is, and his boots are yellow.
None has ever caught him yet, for Tom, he is the master:
His songs are stronger songs, and his feet are faster.
                -- J. R. R. Tolkien
%


Working fine for me.

with -O2 -march=k8 -pipe
and  -O3 -march=k8 -pipe
Comment 4 Danny van Dyk (RETIRED) gentoo-dev 2004-12-30 16:33:12 UTC
Resolving as WORKSFORME.
Comment 5 Jeff Ames 2005-01-01 08:49:26 UTC
This seems like it's probably due to bug 68263.