Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26320 - scrollkeeper segfaults on random omf files with -march=athlon-xp
Summary: scrollkeeper segfaults on random omf files with -march=athlon-xp
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GNOME (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
: 26591 27505 28708 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-08-10 03:19 UTC by Rutger van Bergen
Modified: 2003-09-20 05:03 UTC (History)
6 users (show)

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


Attachments
Session log of emerge gnome (emerge gnome.zip,76.81 KB, application/x-zip-compressed)
2003-08-12 11:25 UTC, Rutger van Bergen
Details
Session log of emerge gnome (emerge gnome.zip,76.81 KB, application/octet-stream)
2003-08-12 11:26 UTC, Rutger van Bergen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rutger van Bergen 2003-08-10 03:19:42 UTC
I'm currently doing an install of Gentoo 1.4, and am trying to emerge gnome 
(emerge as in "download and compile"). 

The problem I am having is that the install of one of the required packages 
(gnome-base/gnome-panel-2.2.2.1) fails with errors. 

Reproducible: Always
Steps to Reproduce:
emerge gnome-base/gnome

Actual Results:  
The problem occurs when the following build command is executed: 

for file in clock-C.omf; do \ 
/bin/install -c -m 644 $file.out /var/tmp/portage/<rest-of-path>/$file; \ 
done

This yields the following error: 

/bin/install: cannot stat 'clock-C.omf.out': No such file or directory

This error bubbles up the various make levels, and causes the emerge to fail 
with the following text: 

!!! ERROR: gnome-base/gnome-panel-2.2.2.1 failed. 
!!! Function einstall, Line 343, Exitcode 2 
!!! einstall failed


Expected Results:  
It should have completed the install of gnome-panel, and continued emerge of 
gnome packages (I somehow feel rather stupid telling you this...)

Portage 2.0.48-r5 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1)
=================================================================
System uname: 2.4.21-gss i686 AMD Athlon(TM) XP1800+
GENTOO_MIRRORS="http://gentoo.oregonstate.edu 
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/confi
g /usr/kde/3/share/config"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
PORTDIR="/usr/portage"
DISTDIR="/usr/portage/distfiles"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR_OVERLAY=""
USE="x86 oss 3dnow apm avi crypt cups encode foomaticdb gif jpeg gnome libg++ 
libwww mad mikmod mmx mpeg ncurses nls pdflib png quicktime slang spell 
truetype xml2 xmms xv zlib gdbm berkdb readline arts svga java X sdl gpm tcpd 
pam ssl perl python esd imlib oggvorbis gtk qt kde motif opengl"
COMPILER="gcc3"
CHOST="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe"
CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe"
ACCEPT_KEYWORDS="x86"
MAKEOPTS="-j2"
AUTOCLEAN="yes"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
FEATURES="sandbox ccache"
Comment 1 foser (RETIRED) gentoo-dev 2003-08-10 06:53:31 UTC
first of all try lowering your optimizations, second please give us the relevant part of the breaking output.
Comment 2 Rutger van Bergen 2003-08-12 11:25:30 UTC
Created attachment 15985 [details]
Session log of emerge gnome

This is a session log of an emerge gnome, which I am sure contains "the
relevant part of the breaking output" you asked for.
Comment 3 Rutger van Bergen 2003-08-12 11:26:30 UTC
Created attachment 15986 [details]
Session log of emerge gnome

This is a session log of an emerge gnome, which I am sure contains "the
relevant part of the breaking output" you asked for.
Comment 4 Rutger van Bergen 2003-08-12 11:30:28 UTC
In response to your suggestion, I'd like to know what I would have to change my optimizations to. The point is that I am using the default optimizations of the Athlon XP LiveCD. I would think those should work?
Comment 5 foser (RETIRED) gentoo-dev 2003-08-12 11:56:15 UTC
the log you gave shows a completed gnome-panel install and now it breaks in a similar manner on gnome-utils . I'd say this is some sort of problem on your side, if it's not exactly reproducable its most likely a machine specific problem.

The gentoo default optimizations should work, but are not guaranteed to work everywhere or anywhere afaic.

Try rebuilding scrollkeeper with conservative CFLAGS , thats the app that handles omf related stuff. Some sort of corruption might be the cause.
Comment 6 Josh Chaney 2003-08-16 21:46:44 UTC
I am having the same exact problem. I am also running an AMD Athlon XP 1800+ with the Athlon XP CD's.. I have made no CHOST flag changes. This is a stock Athlon XP gentoo cd install starting with stage3. One thing I did notice somewhere around that error was this.. ( I apologize I hand wrote it down on paper and am copying it here )

/bin/install -c -m 644 $file.out /var/tmp/portage/gnome-panel/image//usr/share

notice the dual "//" between image and usr. 

It looks like the build script or something has a typo. After re-trying: emerge gnome   two more times it finally went through and ended up having another error somewhere down in gnome-extras or utils.. restarted and now it past that and now it's happening on gnome-games. I apologize for the lack of actual text, I had to boot into windows to send this off. Hope this helps somewhat.
Comment 7 Spider (RETIRED) gentoo-dev 2003-08-17 07:38:38 UTC
dual / in a path is completely ok and will not cause a trouble.
try ls -l /usr//share////doc for example
Comment 8 Rutger van Bergen 2003-08-17 08:13:23 UTC
I did some more investigation into what actually happens, and I found out that the root cause of the errors are core dumps of scrollkeeper. When I tried to rebuild scrollkeeper (and other packages) and looked closely, I found that core dumps were happening all over the place.

The motherboard of the system we are talking about has a VIA KT266A chipset, which is known to cause stability issues under certain circumstances. I can't be sure that the issues I am having are not caused by the chipset, so I decided to give up on installing Gentoo on this box (RedHat and SuSE work like a charm on this system.)
I guess Gentoo is not ready (yet) for the particular configuration I tried to run it on.
Comment 9 Josh Chaney 2003-08-17 13:23:43 UTC
/bin/sh ../../../mkinstalldirs /var/tmp/portage/gnome-panel-2.2.2.2-r30/image//usr/share/omf/gnome-panel
for file in fish-applet-2-C.omf; do \
        /bin/install -c -m 644 $file.out /var/tmp/portage/gnome-panel-2.2.2.2-r30/image//usr/share/omf/gnome-panel/$file; \
done
/bin/install: cannot stat `fish-applet-2-C.omf.out': No such file or directory
make[5]: *** [install-data-hook-omf] Error 1
make[5]: Leaving directory `/var/tmp/portage/gnome-panel-2.2.2.2-r30/work/gnome-panel-2.2.2.2/help/C/fish'
make[4]: *** [install-data-am] Error 2
Comment 10 Josh Chaney 2003-08-17 17:49:29 UTC
update - rebooted, tried again and it worked... no clue whats happening here.
Comment 11 Reuben Martin 2003-08-17 17:59:24 UTC
There's all kinds of gnome packages that won't install properly, reguardless of your build flags. 
Here's what you do: 
 
Downgrade to gtk-2.2.1-r1 : this fixes some of the problems people have had AFTER compiling. 
Downgrade to scrollkeeper-0.3.11-r1 : this fixes the problems when emerging the packages 
 
This should allow you to emerge and run the gnome packages properly. Milage may vary 
according to flags and setup, but this should fix alot of the problems. :) 
Comment 12 foser (RETIRED) gentoo-dev 2003-08-18 05:15:59 UTC
[ bugwranglers, this seems to be a GRP 'problem', please give it to them so they know about these possible issues. The gnome team can't be of any more help here. ]

i'm quite sure its system dependant. You might want to try a less optimized GRP cd and see if that behaves better (in that case your hardware config certainly is to blame). The problem may even be one core lib that misbehaves on this hardware in particular situations.

The fact that binary distros work sais nothing, Gentoo stresses the system in other ways than you general distro, especially during builds. I had this machine i couldnt compile 1 thing on -it always segfaulted after a while-, but with binaries it did its work just fine if not stressed too much.

#11, you are talking about downgrading gtk+ to 2.2.1-r1 , this is testing profile. Not our suggested use for general users. Same goes for scrollkeeper. Besides that i think it's the recompilation that solves problems, not the specific version.

I think we better report this to the GRP folks, there is nothing we can do here.
Comment 13 Reuben Martin 2003-08-18 15:53:25 UTC
I don't think this is totally a GRP problem. I was building from stage2 when I ran into these problems. The gnome packages build just fine, it's only when the scripts attempted to use scrollkeeper that errors prevented the full install. The errors, reguardless of the package, always start with the lines:

/bin/install: cannot stat `<any_file_name_here>.omf.out': No such file or directory
make[x]: *** [install-data-hook-omf] Error 1

When I changed the scrollkeeper version the omf files were handled properly. Lots of people here seem to be using Athlon-XP. Perhaps the -march=athlon-xp flag causes scrollkeeper to build improperly?
Comment 14 Tim Haughton 2003-08-23 02:41:58 UTC
I'm now experiencing the same problem. I had big problems trying to emerge scrollkeeper, and then with gnome-terminal. Turning down the optimisations worked. I have seen some other people on different packages having problems emerging gnome because of problems with omf files.

Seems that scollkeeper might be the root of all evils here.
Comment 15 Tim Haughton 2003-08-23 04:53:27 UTC
Just changed my kernel config to Athlon rather than i386 in the hope of fixing it. No change.

Several of my friends (all with about a year's gentoo experience) are trying to emerge Gnome on a brand new system, all of them are failing. Gnome appears to be broken for many users.

This PC has been running Gentoo for about 2 years, same hardware, same CFLAGS, with no problems.
Comment 16 Chris Hickman 2003-08-26 23:23:01 UTC
I am having the exact same problem, except it's gnome-panel-2.2.2.2. I'm using a Soyo Dragon Plus motherboard w/Athlon XP 1700+. Gnome will not emerge from the GRP CD nor after an rsync. Have already tried updating everything beyond the initial install, have not touched optimizations or USE flags.
Comment 17 foser (RETIRED) gentoo-dev 2003-08-27 06:06:34 UTC
and rebuilding scrollkeeper, updating it to the ~ version or building it without CFLAGS set doesn't make it stop crashing ?
Comment 18 Tim Haughton 2003-08-27 08:26:28 UTC
I concluded that the CFLAGS:

-funroll-loops -fprefetch-loop-arrays

combined with an Athlon architecture are incompatible with GNOME, or at least scrollkeeper. I took out these two CFLAGS, rebuilt my whole system (emerge -e world), and everything worked. These 2 flags seem to be too aggressive for the default settings, especially on this processor.
Comment 19 foser (RETIRED) gentoo-dev 2003-08-29 04:34:55 UTC
*** Bug 27505 has been marked as a duplicate of this bug. ***
Comment 20 foser (RETIRED) gentoo-dev 2003-09-05 03:59:41 UTC
are all problem reporters here using -march=athlon-xp ? Can we  -with some certainty- say that the problem is athlon-xp specific, maybe in combination with the CFLAGS in #18 ?
Comment 21 Rutger van Bergen 2003-09-07 02:05:04 UTC
I can confirm that I was using -march=athlon-xp.
Comment 22 jeff 2003-09-10 21:10:36 UTC
I too am using an athlon-xp and am having the same problems.  I'm installing from the athlon-xp stage 1 tarball and am not changing *any* stock settings (cflags, use, etc).  Haven't yet found a solution.
Comment 23 foser (RETIRED) gentoo-dev 2003-09-11 01:24:02 UTC
and recompiling scrollkeeper with eg. '-march=i686' solves the problem ?

Is your machine recently installed and from what stage ?
Comment 24 S.Scholz 2003-09-11 13:35:40 UTC
I have the same problems too (on an Athlon XP). I installed from stage 2.
Recompiling scrollkeeper even with -march=i386 or i686 without any optimization does not help. 

In my case it may 'emerge' but the result is corrupted anyway. 
The resulting binary - tested by calling scrollkeeper-update - crashes with SEGFAULT not on every call but quite often.

This is happening not only with scrollkeeper-0.3.11-r1, but also with 0.3.12

I tried the binary scrollkeeper-0.3.11-r1 from the Athlon GRP CD, but it chrashs as well!
Comment 25 foser (RETIRED) gentoo-dev 2003-09-11 16:40:32 UTC
and CFLAGS empty ? and the optimizations mentioned in #18 removed (if you have them ) ?

The problem here i haven't seen one coherent result, yes there's a problem with march=athlon-xp , but i have seen different possible solutions. One works here, but not there. I can't do much with this.

Be more verbose on CFLAGS and results related to them.
Comment 26 S.Scholz 2003-09-13 03:26:03 UTC
> and CFLAGS empty ? and the optimizations mentioned in #18 removed (if you have
> them ) ?  
Exactly. Scrollkeeper often segfaults even with empty CFLAGS when I had the
optimizations mentioned in #18 for everything else. 

But I looked at the call stack and found scrollkeeper-update was chrashing
deep in libxml2 functions.

Well, after trying various CFLAGS I can conclude the following:

The CFLAGS="-O3 -march=athlon-xp -fprefetch-loop-arrays -funroll-loops"
are incompatible with libxml2 at the moment. (libxml2-2.5.8)

Compiling everything else (including scrollkeeper) with these CFLAGS seems ok,
but lower them while emerging libxml2.

Setting
CFLAGS="-O3 -march=athlon-xp -fprefetch-loop-arrays "
or
CFLAGS="-O3 -march=athlon-xp -funroll-loops"
while emerging libxml2 seems to work.

Maybe someone out there, who still is having trouble, can confirm
that reemering libxml2 with lowered CFLAGS solves his problems.
Comment 27 foser (RETIRED) gentoo-dev 2003-09-13 04:33:04 UTC
*** Bug 28597 has been marked as a duplicate of this bug. ***
Comment 28 foser (RETIRED) gentoo-dev 2003-09-13 04:37:15 UTC
Great work in #26 mr.Scholz, can anyone else confirm that lowering CFLAGS for libxml2 solves the problem ? If so, we can do some flag stripping in that ebuild.
Comment 29 Martin Ehmsen (RETIRED) gentoo-dev 2003-09-13 05:14:15 UTC
I have compiled libxml2-2.5.11 with
CFLAGS="-mcpu=athlon-xp -O3 -pipe"
but I still had problems with emergeing eog-2.4.0
but then I noticed that I hadn't installed scrollkeeper. And after installing scrollkeeper, eog-2.4.0 emerged fine.

Please notice that everything on my system is emerged with
CFLAGS="-mcpu=athlon-xp -O3 -pipe"

So I guess it supports the theory in #26
Comment 30 Rutger van Bergen 2003-09-14 10:53:03 UTC
I just rebuilt my entire system (including gnome) with CFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe", except for libxml2, which I emerged with CFLAGS="-O3 -march=athlon-xp -pipe". 
This time, I was able to get gnome to emerge (and run) properly.

So I guess it seems that mr. Scholz hit the nail right on the head!

Comment 31 foser (RETIRED) gentoo-dev 2003-09-14 13:12:22 UTC
*** Bug 28708 has been marked as a duplicate of this bug. ***
Comment 32 FieldySnuts 2003-09-14 14:29:19 UTC
Okay. I am running an athlon XP 1800+ system (dual). I saw all of these same problems (that last dupe was my bug).

Before, I was unable to emerge many apps, with similar errors as scattered in this bug.

I was able to emerge gnome-2.4.0 by emerging libxml2 withOUT the following two CFLAGS: -funroll-loops -fprefetch-loop-arrays . I did not have to recompile scrollkeeper.

I am not sure if it's one, or both, of those flags causing problems on XP.

# emerge info
Portage 2.0.49-r3 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.22)
=================================================================
System uname: 2.4.22 i686 AMD Athlon(TM) XP 1800+
ccache version 2.2 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe -mmmx -msse -m3dnow -mfpmath=sse,387"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=athlon-xp -funroll-loops -fprefetch-loop-arrays -pipe -mmmx -msse -m3dnow -mfpmath=sse,387"
DISTDIR="/usr/portage/distfiles"
FEATURES="sandbox autoaddcvs ccache buildpkg notitle"
GENTOO_MIRRORS="ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo ftp://gentoo.noved.org/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://gentoo.seren.com/gentoo http://gentoo.noved.org/ ftp://csociety-ftp.ecn.purdue.edu/pub/gentoo/ ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 oss apm avi crypt cups foomaticdb gif jpeg libg++ libwww mad mikmod mpeg ncurses nls png quicktime sdl slang spell xml2 xv zlib gdbm berkdb readline svga java tcpd pam ssl python esd imlib qt motif opengl mozilla X gtk gtk2 gpm gnome 3dnow cdr encode kde mmx oggvorbis pdflib perl sse tiff truetype xmms -arts -ipv6"


Keep up the great work, guys! Thank you to norelent and foser for assisting me in the Gentoo IRC channel. norelent may post his own results here soon.
Comment 33 FieldySnuts 2003-09-14 14:31:52 UTC
I always forget one last comment, I swear.

Just a note that on the 1.4 athlon-xp cd1, both of the suspect flags, -funroll-loops and -fprefetch-loop-arrays are in the default USE settings.

Therefore, anyone on an athlon-xp who goes with the default USE settings may run into these errors. Might want to topic that one in the IRC channel if this is confirmed.
Comment 34 Daniel Robbins (RETIRED) gentoo-dev 2003-09-15 13:59:17 UTC
The new 20030911 builds of the athlon-xp CDS that have just been put on the mirrors have been built with "-O2" (that's it.) We'll try bumping it up to -O3 after doing a good deal of testing. For now, I think we can have the GNOME team put some kind of CFLAGS protection in the right packages and then we can close this bug. It's not a 1.4 issue anymore.
Comment 35 FieldySnuts 2003-09-16 19:31:32 UTC
If I can do anything to help, please let me know. Rather speedy system.
Comment 36 Alastair Tse (RETIRED) gentoo-dev 2003-09-17 11:11:14 UTC
*** Bug 26591 has been marked as a duplicate of this bug. ***
Comment 37 Alastair Tse (RETIRED) gentoo-dev 2003-09-17 13:08:33 UTC
I've just added the filter-flags to the newest stable and ~x86 libxml2 versions. Joe, would you be able to test emerging libxml2 with -funroll-loops and -fprefetch-loop-array in your CFLAGS?
Comment 38 FieldySnuts 2003-09-19 10:22:02 UTC
This worked for me (as I emailed you since BZ was acting up)
Comment 39 Alastair Tse (RETIRED) gentoo-dev 2003-09-20 05:03:59 UTC
thanks .. well, i think this is the end of this issue.