Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 121478 - bash-3.1_p5 segfaults in a find/read loop
Summary: bash-3.1_p5 segfaults in a find/read loop
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-03 14:46 UTC by David Watzke
Modified: 2006-02-04 13:31 UTC (History)
0 users

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 David Watzke 2006-02-03 14:46:35 UTC
Hi. I just search myself in changelogs :-) for fun, so I ran this:

# find /portage/ -name ChangeLog | while read F; do grep Watzke $F; done

and output was:

 Version bump #116490 by David Watzke.
 Version bump #115206 by David Watzke.
Neopr
Comment 1 David Watzke 2006-02-03 14:46:35 UTC
Hi. I just search myself in changelogs :-) for fun, so I ran this:

# find /portage/ -name ChangeLog | while read F; do grep Watzke $F; done

and output was:

 Version bump #116490 by David Watzke.
 Version bump #115206 by David Watzke.
Neoprávněný přístup do paměti (SIGSEGV)

So I wanna know on which file it segfaults, so:

# find /portage/ -name ChangeLog | while read F; do echo $F; grep Watzke $F; done

and see...

...
/portage/media-libs/openvrml/ChangeLog
/portage/media-libs/libmpeg2/ChangeLog
/portage/media-libs/freetype/ChangeLog
/portage/media-libs/adplug/ChangeLog
/portage/media-libs/mlt/ChangeLog
Neoprávněný přístup do paměti (SIGSEGV)

but: grep Watzke /portage/media-libs/mlt/ChangeLog is okay

always it segfault on this file and I dunno why.. and then I had an idea - dunno why, but I ran:

find /portage/ -name ChangeLog | while read F; do echo $F; LANG=C grep Watzke $F; done

and it segfaults on other file...

/portage/app-misc/smtm/ChangeLog
Neoprávněný přístup do paměti (SIGSEGV)

Looks like AMD64 specific problem, because my friend w/ x86 (some Intel Pentium 4, 1,6 GHz) can't reproduce it, but everything is possible.

# emerge info
Portage 2.1_pre4-r1 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.6-r2, 2.6.15-gentoo-r2 x86_64)
=================================================================
System uname: 2.6.15-gentoo-r2 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre15
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=athlon64 -mtune=athlon64 -fomit-frame-pointer -pipe -mmmx -msse3 -m3dnow"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon64 -mtune=athlon64 -fomit-frame-pointer -pipe -mmmx -msse3 -m3dnow"
DISTDIR="/portage/distfiles"
FEATURES="autoconfig distlocks noman sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.linux.cz/pub/linux/gentoo http://mirror.gentoo.sk/pub http://distfiles.gentoo.org/"
LANG="cs_CZ.UTF-8"
LC_ALL="cs_CZ.UTF-8"
LINGUAS="cs"
MAKEOPTS="-j3"
PKGDIR="/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/portage"
PORTDIR_OVERLAY="/overlay"
SYNC="rsync://mirror.gentoo.sk/gentoo-portage"
USE="amd64 X acpi adns alsa apache2 apm audiofile avi bash-completion bitmap-fonts bzip2 caps cdparanoia cdr css cups curl curlwrappers dbus dga dio directfb divx4linux dts dvd dvdr dvdread emboss encode fbcon ffmpeg flac flash foomaticdb fortran ftp gdbm gif gpm gstreamer gtk gtk2 hal i8x0 icq id3 id3v2 imagemagick imlib innodb ipv6 jabber javascript jpeg kde kdeenablefinal lame lcms lzw lzw-tiff mad matroska mbox mikmod mime mp3 mpeg mplayer mysql mysqli ncurses nls nowebdav nptl nptlonly nvidia ogg oggvorbis openal opengl osc oscar pcntl pcre pdflib perl php pic png posix ppds python qt quicktime readline sdl session sftplogging skey slp sockets speex sqlite ssl subversion svg symlink theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales utf8 vcd vorbis wmf xine xml xml2 xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_cs userland_GNU video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LDFLAGS
Comment 2 SpanKY gentoo-dev 2006-02-03 18:49:21 UTC
hmm, i am able to reproduce this on my amd64 and x86 box ... but cant seem to get it to work such that i can debug it ...
Comment 3 SpanKY gentoo-dev 2006-02-03 20:06:28 UTC
actually, it looks like bash is segfaulting, not grep ... what does your `dmesg` have ?  mine has this:
bash[25624]: segfault at 000000676f4c6567 rip 0000000000432664 rsp 000071608995bee0 error 4

also, what version of bash do you have ?
Comment 4 David Watzke 2006-02-04 02:04:23 UTC
Okay, changing HW to All...

bash[29462]: segfault at 0000000000007075 rip 0000000000432e74 rsp 00007fffffc9fb20 error 4

[ebuild   R   ] app-shells/bash-3.1_p5-r2  USE="nls unicode -bashlogger -build" 0 kB
[ebuild   R   ] sys-apps/grep-2.5.1-r9  USE="nls -build -static" 0 kB
Comment 5 SpanKY gentoo-dev 2006-02-04 12:32:33 UTC
can you try bash-3.1_p7 please ?  once i upgraded to that, i cant make bash segfault anymore
Comment 6 David Watzke 2006-02-04 13:31:30 UTC
Seems to be fixed :)

# find /portage/ -name ChangeLog | while read F; do grep Watzke $F; done
  Version bump #116490 by David Watzke.
  Version bump #115206 by David Watzke.
  version bump and DEPEND fix thanks to David Watzke <david@klenot.cz> in bug
  Version bump #115206 by David Watzke.
  Version bump #115206 by David Watzke.

But I should be better :P