Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131566 - [4.1/ICE] net-fs/samba-3.0.22-r2 makes gcc-4.1.0 segfault due to -ftree-vectorize -O2
Summary: [4.1/ICE] net-fs/samba-3.0.22-r2 makes gcc-4.1.0 segfault due to -ftree-vecto...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 132132 132307 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-28 06:11 UTC by Jakub Moc (RETIRED)
Modified: 2006-12-04 07:03 UTC (History)
4 users (show)

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


Attachments
preprocessed source (cc6w3HgG.out,888.42 KB, text/plain)
2006-04-28 06:13 UTC, Jakub Moc (RETIRED)
Details
gcc-4.1-samba-ICE.c (gcc-4.1-samba-ICE.c,759 bytes, text/plain)
2006-04-28 17:01 UTC, SpanKY
Details
preprocessed output from failure with CFLAGS="-march=athlon-xp -O2 -pipe" (as requested) (ccfJAkkh.out.tbz2,140.52 KB, application/x-tbz)
2006-05-04 06:05 UTC, Tiago Freire
Details
Preprocessed source of ipc.c from samba-3.0.22-r2 (bzipped) (ccym3NUP.out.bz2,133.56 KB, application/octet-stream)
2006-05-19 16:37 UTC, Neil Cathey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Moc (RETIRED) gentoo-dev 2006-04-28 06:11:00 UTC
smbd/ipc.c: In function 
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-04-28 06:11:00 UTC
smbd/ipc.c: In function reply_trans:
smbd/ipc.c:364: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /var/tmp/portage/samba-3.0.22-r2/temp/cc6w3HgG.out file, please attach this to your bugreport.
make: *** [smbd/ipc.o] Error 1
make: *** Waiting for unfinished jobs....

Always segfaults in the same place. Previous versions compiled fine.

# emerge -pv samba

[ebuild     U ] net-fs/samba-3.0.22-r2 [3.0.21c] USE="acl async automount cups -doc -examples -kerberos -ldap -ldapsam libclamav msdfs% -mysql oav pam -postgres python quotas readline swat syslog winbind xml xml2" 0 kB 

# emerge --info

Portage 2.1_pre9-r4 (default-linux/x86/2006.0, gcc-4.1.0, glibc-2.3.6-r3, 2.6.16-gentoo-r4 i686)
=================================================================
System uname: 2.6.16-gentoo-r4 i686 AMD Athlon(tm) XP 1800+
Gentoo Base System version 1.12.0_pre18
ccache version 2.4 [enabled]
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-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr -ftree-vectorize"
CHOST="i686-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/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer -fforce-addr -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig ccache collision-protect confcache distlocks metadata-transfer parallel-fetch sandbox sfperms splitdebug strict userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo ftp://ftp.fi.muni.cz/pub/linux/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
LINGUAS="cs en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext 7zip X X509 a52 aac acl acpi alsa apm asf audiofile bash-completion berkdb bluetooth bzip2 caps cddb cdparanoia cdr chroot cli crypt cscope css cups curl curlwrappers dbx dga dlloader dri dts dv dvd dvdr dvdread encode ethereal exif fam fbcon ffmpeg fftw firefox flac flash flatfile foomaticdb gdbm gif glibc-omitfp glut gmp gpm gstreamer iconv icq idn imagemagick imap imlib inifile ipv6 irda jack javascript joystick jpeg jpeg2k lcms libcaca libg++ libwww lirc lm_sensors logrotate mad maildir matroska mikmod mime mmap mmx mng mp3 mpeg musepack musicbrainz ncurses nls nodrm nptl nptlonly nsplugin nvidia offensive ogg openal opengl pam pcre pdf perl png ppds python qt quicktime readline real reflection samba sdl session sftplogging skey sndfile speex spell spl sse ssl svg symlink tcpd theora threads tiff truetype udev unicode urandom usb userlocales v4l v4l2 vcd vorbis win32codecs wmf x264 xine xinerama xinetd xml xml2 xmlrpc xorg xosd xpm xv xvid xvmc zlib elibc_glibc input_devices_joystick input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_cs linguas_en userland_GNU video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_v4l video_cards_vesa video_cards_vmware"
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-04-28 06:13:45 UTC
Created attachment 85660 [details]
preprocessed source
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-04-28 06:32:24 UTC
BTW, no segfault w/ gcc-4.0.3. Hmmm...
Comment 4 SpanKY gentoo-dev 2006-04-28 08:36:32 UTC
why dont you try it with different CFLAGS
Comment 5 Jakub Moc (RETIRED) gentoo-dev 2006-04-28 11:08:46 UTC
(In reply to comment #3)
> why dont you try it with different CFLAGS

Well, since it compiles perfectly fine w/ gcc-4.0.3, as said. ;) 

-ftree-vectorize crashes the thing hard, if someone wants to filter it or investigate the regression; otherwise just close it.
Comment 6 SpanKY gentoo-dev 2006-04-28 12:26:45 UTC
filtering flags is not a solution
Comment 7 SpanKY gentoo-dev 2006-04-28 17:00:22 UTC
gcc-4.2 works, so this is a 4.1-only regression ... seems to be x86-only
Comment 8 SpanKY gentoo-dev 2006-04-28 17:01:40 UTC
Created attachment 85712 [details]
gcc-4.1-samba-ICE.c
Comment 9 SpanKY gentoo-dev 2006-04-28 21:32:30 UTC
this has been fixed in the upstream gcc-4.1 branch so it'll be in gcc-4.1.1 ...
Comment 10 Mark Loeser (RETIRED) gentoo-dev 2006-04-29 18:48:19 UTC
As Spanky said, already fixed for 4.1.1.  -ftree-vectorize is troublesome anyway, so I'm not about to start having people filter it everywhere.  The patch is way too big to backport.
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-05-03 08:06:14 UTC
*** Bug 132132 has been marked as a duplicate of this bug. ***
Comment 12 Tiago Freire 2006-05-03 09:59:00 UTC
Hmm, I have emerged with "-march=athlon-xp -O2 -pipe" and the same crash happened...
Comment 13 Mark Loeser (RETIRED) gentoo-dev 2006-05-03 13:41:35 UTC
Please attach the preprocessed output if that is the case so I can look at it.
Comment 14 Tiago Freire 2006-05-04 06:05:48 UTC
Created attachment 86137 [details]
preprocessed output from failure with CFLAGS="-march=athlon-xp -O2 -pipe" (as requested)
Comment 15 Mark Loeser (RETIRED) gentoo-dev 2006-05-04 07:44:56 UTC
You have -ftree-vectorize in your CFLAGS.  This is the same bug.
Comment 16 Tiago Freire 2006-05-04 08:05:44 UTC
Hmm, I see. BUT it's not in my make.conf, and it does not show up in my emerge --info command. Where does it com from?
Comment 17 Jakub Moc (RETIRED) gentoo-dev 2006-05-05 11:40:25 UTC
*** Bug 132307 has been marked as a duplicate of this bug. ***
Comment 18 Tiago Freire 2006-05-18 11:45:33 UTC
Mark, Jakub, anyone? I stand to what I said. I do NOT have -ftree-vectorize on my CFLAGS, yet emerging samba insists on using it, and I don't know why. I had it the first time I tried to compile it, but not now. Maybe you can shed a light here? 
Comment 19 Neil Cathey 2006-05-19 12:46:10 UTC
Tiago:

Did you have -ftree-vectorize in your CFLAGS when you compiled mysql?  Try compiling mysql without -ftree-vectorize and then compiling samba without -ftree-vectorize.  It seems that samba inherits mysql's CFLAGS, so if mysql had -ftree-vectorize, samba will stick it in there too.

Oh, and I just tried to compile samba with -ftree-vectorize using gcc-4.1.1_pre20060517, and I got an ICE in the exact same place.
Comment 20 Mark Loeser (RETIRED) gentoo-dev 2006-05-19 12:59:06 UTC
(In reply to comment #18)
> Oh, and I just tried to compile samba with -ftree-vectorize using
> gcc-4.1.1_pre20060517, and I got an ICE in the exact same place.
> 

If this is the case, please attach the preprocessed output so I can verify it.
Comment 21 Neil Cathey 2006-05-19 16:37:05 UTC
Created attachment 87086 [details]
Preprocessed source of ipc.c from samba-3.0.22-r2 (bzipped)

I bzipped the preprocessed output - it was nearly 1 megabyte uncompressed.  I hope that's OK.  Anyway, here's the error:

[snip]
Compiling smbd/ipc.c

smbd/ipc.c:123: note: vectorized 0 loops in function.

smbd/ipc.c:437: note: LOOP VECTORIZED.
smbd/ipc.c:455: note: vectorized 1 loops in function.
smbd/ipc.c: In function 'reply_trans':
smbd/ipc.c:364: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
Preprocessed source stored into /var/tmp/portage/samba-3.0.22-r2/temp/ccym3NUP.out file, please attach this to your bugreport.
make: *** [smbd/ipc.o] Error 1

!!! ERROR: net-fs/samba-3.0.22-r2 failed.
Call stack:
  ebuild.sh, line 1527:   Called dyn_compile
  ebuild.sh, line 931:   Called src_compile
  samba-3.0.22-r2.ebuild, line 133:   Called die

!!! SAMBA make everything error
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 22 Tiago Freire 2006-05-22 04:39:30 UTC
Just to settle the issue, I re-emerged mysql without -ftree-vectorize and then I was able to emerge samba...
Comment 23 Tim Heinrich 2006-07-10 04:54:37 UTC
I got the same error here with gcc-4.1.1 today, is there a fix available by now?
Comment 24 SpanKY gentoo-dev 2006-07-10 20:27:47 UTC
4.1.1 works fine for me
Comment 25 Jakub Moc (RETIRED) gentoo-dev 2006-07-11 15:01:12 UTC
(In reply to comment #22)
> I got the same error here with gcc-4.1.1 today, is there a fix available by
> now?

Same here, doesn't seem to be fixed.
Comment 26 Daniel Mario Vega 2006-12-04 07:03:31 UTC
Same here. Please reopen

smbd/ipc.c: In function 'reply_trans':
smbd/ipc.c:364: internal compiler error: Segmentation fault

gcc versi
Comment 27 Daniel Mario Vega 2006-12-04 07:03:31 UTC
Same here. Please reopen

smbd/ipc.c: In function 'reply_trans':
smbd/ipc.c:364: internal compiler error: Segmentation fault

gcc versión 4.1.1 (Gentoo 4.1.1-r1)

I was able to reduce gcc flags up to this minimal
       -O1 -fstrict-aliasing -ftree-vectorize