Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

gcc causing system hangs

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
29 posts
  • 1
  • 2
  • Next
Author
Message
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

gcc causing system hangs

  • Quote

Post by Annirak » Thu Dec 01, 2005 11:00 pm

Whenever I try to do an $emerge gnome , I have troubles with gcc crashing. And I don't mean segfaults either.

I'm running:
X2 4400+ @ stock
DFI LP NF4 Ultra-D
2x512MB @ 2-2-2-8, 200MHz
WD 200GB SATA
AX800XL 256MB
LG 4163
Benq FP 783 LCD (DVI 1280x1024)

When I tried to do a stage 1 install, gcc segfaulted every time I tried. So I backed up to a stage 3 install, and managed to get my OS installed. I succeeded in compiling my kernel, and rebooted into my fresh OS.
Then I emerged ati-drivers and xfce4, which worked.
xfce4, however, wouldn't start, and $X -configure failed every time.
after running fglrxconfig which comes with the ati-drivers package, I managed to startxfce4.

$emerge gnome still causes the system to hang.

I tried to do an $emerge -e system; emerge -e system; emerge -e world; emerge -e world so that my system would be running with everything compiled for my hardware, but the system hung.

I emerged atanks, and ran it in xfce4, but it segfaults too much to make it really playable.

Could all this be because of my kernel config? What can I do?
Top
cokey
Advocate
Advocate
User avatar
Posts: 3355
Joined: Fri Apr 23, 2004 12:30 am

  • Quote

Post by cokey » Thu Dec 01, 2005 11:14 pm

Post some of the errors so we have a clue what we are dealing with.

Also post emerge info so we have a clue about gcc and glibc versions
https://otw20.com/ OTW20 The new place for off the wall chat
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Thu Dec 01, 2005 11:49 pm

When I say the system hangs, I mean just that. It hangs. There is no error message. The cursor blinks, but the keyboard is non-functional. Numlock doesn't cause the LED status light to change, I can't switch terminals. PS/2 and USB keyboards behave the same way.

I'll post emerge info in a few hours when I have access to the machine again.
Top
cyrillic
Watchman
Watchman
User avatar
Posts: 7311
Joined: Wed Feb 19, 2003 3:05 am
Location: Groton, Massachusetts USA

Re: gcc causing system hangs

  • Quote

Post by cyrillic » Fri Dec 02, 2005 1:23 am

Annirak wrote:When I tried to do a stage 1 install, gcc segfaulted every time I tried. So I backed up to a stage 3 install, and managed to get my OS installed.
...
I emerged atanks, and ran it in xfce4, but it segfaults too much to make it really playable.
This sure sounds like a hardware problem.

Even though you are not overclocked, you could have bad RAM, a bad power supply, cooling problems, etc. that would be causing your segfaults.
Top
hielvc
Advocate
Advocate
Posts: 2805
Joined: Fri Apr 19, 2002 5:55 pm
Location: Oceanside, Ca

  • Quote

Post by hielvc » Fri Dec 02, 2005 1:56 am

Me votes for BAD ram. Run memtest86 from the live cd
An A-Z Index of the Linux BASH command line
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Fri Dec 02, 2005 2:57 am

How many passes of Memtest86 do you want me to run? (my BIOS has it built-in :D)
I doubt that it is bad RAM or PSU as I have been running F@H for 2 months under WinXP x64 without dropping more than ~3 WUs.
I've run 2 passes on memtest86 with no errors before--but that won't stop me from doing it again.
My system sits at 38-40C reported--even while gaming.

I've run a 4.25 hour prime95 test with no errors.

It's possible that some of my RAM timings are too aggressive, but I don't think so because of the above.

Anyway, I'll go run a few passes of memtest86.
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Fri Dec 02, 2005 6:20 am

I ran 6 passes of memtest86 Ver. 1.55 with no errors.

Here is the output of $emerge --info:

Code: Select all

Gentoo Base System version 1.6.12
Portage 2.0.51.22-r3 (default-linux/amd64/2005.1, gcc-3.4.3, glibc-2.3.5-r0, 2.6.12-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.12-gentoo-r6 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4400+
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.11
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=k8 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X1 /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control 1/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=k8 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j16"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X alsa audiofile avi berkdb bitmap-fonts bzip2 crypt cups eds emboss encode esd exif expat fam foomaticdb fortran gif glut gnome gpm gstreamer gtk gtk2 imlib ipv6 jpeg kde lcms lzw lzw-tiff mng mozilla mp3 mpeg ncurses nls opengl pam pcre pdflib perl png python qt quicktime readline sdl spell ssl tcpd tiff truetype truetype-fonts type1-fonts udev usb userlocales xml2 xpm xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Top
cokey
Advocate
Advocate
User avatar
Posts: 3355
Joined: Fri Apr 23, 2004 12:30 am

  • Quote

Post by cokey » Fri Dec 02, 2005 8:58 am

disconnect the power from all the hard drives except the one you want to boot off and try again
https://otw20.com/ OTW20 The new place for off the wall chat
Top
nixnut
Bodhisattva
Bodhisattva
User avatar
Posts: 10974
Joined: Fri Apr 09, 2004 1:43 pm
Location: the dutch mountains

  • Quote

Post by nixnut » Fri Dec 02, 2005 12:16 pm

Moved from Installing Gentoo to Portage & Programming.
Not an installing gentoo problem
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Top
limn
l33t
l33t
Posts: 997
Joined: Fri May 13, 2005 8:08 pm

  • Quote

Post by limn » Fri Dec 02, 2005 12:58 pm

You might consider reducing:
MAKEOPTS="-j16"
Top
cokey
Advocate
Advocate
User avatar
Posts: 3355
Joined: Fri Apr 23, 2004 12:30 am

  • Quote

Post by cokey » Fri Dec 02, 2005 3:05 pm

limn wrote:You might consider reducing:
MAKEOPTS="-j16"
jesus christ, how did i not see that?
https://otw20.com/ OTW20 The new place for off the wall chat
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Fri Dec 02, 2005 5:12 pm

I only posted it in "installing" because I don't consider that I've finished installing yet, but if this forum fits it better, so be it.

It was originally set to -j3, but I saw the same problems. The -j16 provides a very significant boost in compiling performance on my X2. Someone I know with an FX-55 has seen massive performance increases with -j32.
Top
cokey
Advocate
Advocate
User avatar
Posts: 3355
Joined: Fri Apr 23, 2004 12:30 am

  • Quote

Post by cokey » Fri Dec 02, 2005 5:22 pm

Annirak wrote:I only posted it in "installing" because I don't consider that I've finished installing yet, but if this forum fits it better, so be it.

It was originally set to -j3, but I saw the same problems. The -j16 provides a very significant boost in compiling performance on my X2. Someone I know with an FX-55 has seen massive performance increases with -j32.
system performance or compile time?
https://otw20.com/ OTW20 The new place for off the wall chat
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Fri Dec 02, 2005 5:24 pm

I have not been using a swap partition. Is it possible that it's a question of needing swap?

Would this work:

Code: Select all

$ dd if=/dev/null of=/swap.file count=4M
$ swap -a /swap.file 0 4194304 
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Fri Dec 02, 2005 5:25 pm

cokehabit wrote:system performance or compile time?
Compile time.
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Fri Dec 02, 2005 5:35 pm

Annirak wrote:

Code: Select all

$ dd if=/dev/null of=/swap.file count=4M
$ swap -a /swap.file 0 4194304 
make that:

Code: Select all

$ dd if=/dev/zero of=/swap.file bs=1M count=2048
$ mkswap /swap.file
$ swapon /swap.file
Top
cokey
Advocate
Advocate
User avatar
Posts: 3355
Joined: Fri Apr 23, 2004 12:30 am

  • Quote

Post by cokey » Fri Dec 02, 2005 7:35 pm

Annirak wrote:I have not been using a swap partition. Is it possible that it's a question of needing swap?
depends how much ram you have. what does cat /proc/meminfo say?
https://otw20.com/ OTW20 The new place for off the wall chat
Top
masseya
Bodhisattva
Bodhisattva
User avatar
Posts: 2602
Joined: Wed Apr 17, 2002 3:56 pm
Location: Baltimore, MD
Contact:
Contact masseya
Website

  • Quote

Post by masseya » Fri Dec 02, 2005 7:48 pm

I have found that anything over -j4 is risking some compile errors for very large programs on my dual opteron 880 system. However, it doesn't cause a system hang so I don't think the number of jobs is really the issue either. If you haven't used the system reliably before are you sure that its not a cooling issue?
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Fri Dec 02, 2005 8:25 pm

I have 1GB of RAM.
masseya: I'll try dropping the -j argument entirely, and see what happens.
Top
cokey
Advocate
Advocate
User avatar
Posts: 3355
Joined: Fri Apr 23, 2004 12:30 am

  • Quote

Post by cokey » Sat Dec 03, 2005 12:15 am

-j is supposed to enable the unused cycles to be used to greater efficiency, once you get into -j4 -j5 -j6 etc you are just making things slower and risking errors because the cpu is distributing it's own power and cycles instead of having other processes and actions designating cycles (distcc)
https://otw20.com/ OTW20 The new place for off the wall chat
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Sat Dec 03, 2005 12:43 am

Well, tonight, I'm going to add swap and revert to single-threaded compiling and see if anything changes.
Top
Annirak
n00b
n00b
Posts: 13
Joined: Thu Dec 01, 2005 10:50 pm

  • Quote

Post by Annirak » Sat Dec 03, 2005 7:58 pm

I tried enabling some swap, and disabling the multi-threaded compiling, but I still get the system hang.
The package that fails is

Code: Select all

>>> emerge (1 of 34) media-plugins/gst-plugins-ffmpeg-0.8.4 to /
Here's my make.conf:

Code: Select all

# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
CFLAGS="-O3 -march=k8 -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
# MAKEOPTS="-j16"
Here's /proc/meminfo

Code: Select all

MemTotal:      1023476 kB
MemFree:        570676 kB
Buffers:         78096 kB
Cached:         191048 kB
SwapCached:          0 kB
Active:         237616 kB
Inactive:        95028 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:      1023476 kB
LowFree:        570676 kB
SwapTotal:     2097144 kB
SwapFree:      2097144 kB
Dirty:             276 kB
Writeback:           0 kB
Mapped:          91720 kB
Slab:            89280 kB
CommitLimit:   2608880 kB
Committed_AS:    85708 kB
PageTables:       2052 kB
VmallocTotal: 34359738367 kB
VmallocUsed:    145980 kB
VmallocChunk: 34359592227 kB
HugePages_Total:     0
HugePages_Free:      0
Hugepagesize:     2048 kB
Top
masseya
Bodhisattva
Bodhisattva
User avatar
Posts: 2602
Joined: Wed Apr 17, 2002 3:56 pm
Location: Baltimore, MD
Contact:
Contact masseya
Website

  • Quote

Post by masseya » Sat Dec 03, 2005 8:01 pm

Annirak wrote:masseya: I'll try dropping the -j argument entirely, and see what happens.
cokehabit is right about the -j option. In general, I use -j2 on dual processor systems and -j4 on dual processor dual core systems without any issue. These are nice options to have for large compiles because it can really save you some time. However, if you do more than that, you are really not doing yourself any favors.
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Top
masseya
Bodhisattva
Bodhisattva
User avatar
Posts: 2602
Joined: Wed Apr 17, 2002 3:56 pm
Location: Baltimore, MD
Contact:
Contact masseya
Website

  • Quote

Post by masseya » Sat Dec 03, 2005 8:15 pm

Are any errors getting logged in /var/log?
if i never try anything, i never learn anything..
if i never take a risk, i stay where i am..
Top
cokey
Advocate
Advocate
User avatar
Posts: 3355
Joined: Fri Apr 23, 2004 12:30 am

  • Quote

Post by cokey » Sun Dec 04, 2005 1:16 am

boot up off a livecd and try memtest86.

Masseya, put the old pic of the kitten back on, i used to like that :D
https://otw20.com/ OTW20 The new place for off the wall chat
Top
Post Reply

29 posts
  • 1
  • 2
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic