Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Debugging make.conf default emerge options
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 439
Location: Maryland, US

PostPosted: Wed Oct 03, 2012 10:05 pm    Post subject: [Solved] Debugging make.conf default emerge options Reply with quote

I completed installing a new Gentoo ~amd64 system on my laptop, (Clevo P150HM, Core i7-2820QM);
Code:
cat -n /proc/cpuinfo
     1   processor   : 0
     2   vendor_id   : GenuineIntel
     3   cpu family   : 6
     4   model      : 42
     5   model name   : Intel(R) Core(TM) i7-2820QM CPU @ 2.30GHz
     6   stepping   : 7
     7   microcode   : 0x1b
     8   cpu MHz      : 800.000
     9   cache size   : 8192 KB
    10   physical id   : 0
    11   siblings   : 8
    12   core id      : 0
    13   cpu cores   : 4
    14   apicid      : 0
    15   initial apicid   : 0
    16   fpu      : yes
    17   fpu_exception   : yes
    18   cpuid level   : 13
    19   wp      : yes
    20   flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm ida arat epb xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid
    21   bogomips   : 4589.68
    22   clflush size   : 64
    23   cache_alignment   : 64
    24   address sizes   : 36 bits physical, 48 bits virtual
    25   power management:

and I took this opportunity to start with a clean set of USE flags, and /etc/portage/make.conf settings. For the emerge performance aspect, I chose settings that I had previously used successfully with prior Core i7 systems, and they worked fine while emerging the base system, (gentoo-source-3.5.4, gnome-3.4.2, and cinnamon-1.6.1), and they include;
Code:
CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="x86_64-pc-linux-gnu"
AUTOCLEAN="yes"
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=8 --with-bdeps y --autounmask-write y"
FEATURES="candy ebuild-locks fixlafiles parallel-fetch parallel-install"
MAKEOPTS="-j9 -l8"
PORTDIR_OVERLAY="/usr/local/portage"
PORTAGE_TMPDIR="/tmp"

But when I started to do a large emerge of apps, (500+ packages), I've been getting halts of the emerge process, (even though --keep-going is enabled), with segmentation faults. I noticed after the first one, (after only about 20 or so packages), that I couldn't even re-emerge python, (thinking that I should re-emerge python and portage due to the segmentation faults). So I cleaned out my tmpdir and then commented out the EMERGE_DEFAULT_OPTS=, FEATURES=, and MAKEOPTS=, lines in my /etc/portage/make.conf, and both python and portage could be re-emerged cleanly. I then re-enabled the three make.conf lines, and restarted the emerge process. Again after emerging a number of packages, some packages started failing and then eventually I hit the following segmentation fault;
Code:
Total: 308 packages (302 new, 5 in new slots, 1 reinstall), Size of downloads: 0 kB
>>> Starting parallel fetch
>>> Emerging (1 of 308) dev-util/mdds-0.6.1
>>> Installing (1 of 308) dev-util/mdds-0.6.1
>>> Emerging (2 of 308) app-cdr/dvd+rw-tools-7.1-r1
>>> Emerging (3 of 308) sys-fs/xfsdump-3.1.0
>>> Installing (2 of 308) app-cdr/dvd+rw-tools-7.1-r1
>>> Emerging (4 of 308) dev-java/tomcat-servlet-api-7.0.30
>>> Emerging (5 of 308) dev-lang/ruby-1.8.7_p370
>>> Installing (3 of 308) sys-fs/xfsdump-3.1.0
>>> Recording sys-fs/xfsdump in "world" favorites file...
>>> Emerging (6 of 308) dev-libs/fribidi-0.19.4
>>> Installing (4 of 308) dev-java/tomcat-servlet-api-7.0.30
>>> Emerging (7 of 308) dev-util/automoc-0.9.88
>>> Installing (7 of 308) dev-util/automoc-0.9.88
>>> Emerging (8 of 308) media-libs/id3lib-3.8.3-r8
>>> Installing (6 of 308) dev-libs/fribidi-0.19.4
>>> Emerging (9 of 308) dev-libs/qjson-0.7.1-r1
>>> Jobs: 5 of 308 complete, 3 running              Load avg: 3.31, 2.73, 2.84
Traceback (most recent call last):
  File "/usr/bin/emerge", line 47, in <module>
  File "/usr/lib64/portage/pym/_emerge/main.py", line 2059, in emerge_main
  File "/usr/lib64/portage/pym/_emerge/actions.py", line 456, in action_build
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1005, in merge
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1357, in _merge
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 169, in _main_loop
  File "/usr/lib64/portage/pym/portage/util/_eventloop/EventLoop.py", line 180, in iteration
  File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 216, in _output_handler
  File "/usr/lib64/portage/pym/_emerge/AbstractPollTask.py", line 129, in _unregister_if_appropriate
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 161, in _wait_hook
  File "/usr/lib64/portage/pym/_emerge/EbuildPhase.py", line 287, in _post_phase_exit
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 161, in _wait_hook
  File "/usr/lib64/portage/pym/_emerge/TaskSequence.py", line 43, in _task_exit_handler
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 161, in _wait_hook
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 134, in _default_final_exit
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 161, in _wait_hook
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 294, in _build_exit
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 161, in _wait_hook
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 134, in _default_final_exit
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 161, in _wait_hook
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1328, in _build_exit
  File "/usr/lib64/portage/pym/_emerge/PollScheduler.py", line 147, in _schedule
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1522, in _schedule_tasks
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1610, in _schedule_tasks_imp
  File "/usr/lib64/portage/pym/_emerge/SequentialTaskQueue.py", line 23, in add
  File "/usr/lib64/portage/pym/_emerge/SequentialTaskQueue.py", line 45, in schedule
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 30, in start
  File "/usr/lib64/portage/pym/_emerge/MergeListItem.py", line 91, in _start
  File "/usr/lib64/portage/pym/_emerge/CompositeTask.py", line 147, in _start_task
  File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 30, in start
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 88, in _start
  File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 152, in _prefetch_exit
  File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 109, in log
  File "/usr/lib64/portage/pym/_emerge/emergelog.py", line 47, in emergelog
AttributeError: seekable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/emerge", line 61, in <module>
  File "/usr/lib64/python3.2/traceback.py", line 269, in format_exc
  File "/usr/lib64/python3.2/traceback.py", line 186, in format_exception
  File "/usr/lib64/python3.2/traceback.py", line 75, in format_tb
  File "/usr/lib64/python3.2/traceback.py", line 100, in extract_tb
  File "/usr/lib64/python3.2/linecache.py", line 15, in getline
  File "/usr/lib64/python3.2/linecache.py", line 41, in getlines
  File "/usr/lib64/python3.2/linecache.py", line 126, in updatecache
  File "/usr/lib64/python3.2/tokenize.py", line 346, in open
AttributeError: seekable
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib64/portage/pym/portage/process.py", line 129, in run_exitfuncs
  File "/usr/lib64/portage/pym/portage/elog/mod_echo.py", line 27, in finalize
  File "/usr/lib64/portage/pym/portage/elog/mod_echo.py", line 35, in _finalize
  File "/usr/lib64/portage/pym/portage/output.py", line 514, in __init__
  File "/usr/lib64/portage/pym/portage/output.py", line 446, in get_term_size
TypeError: 'f⁤' is an invalid keyword argument for this function

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.2/linecache.py", line 126, in updatecache
  File "/usr/lib64/python3.2/tokenize.py", line 346, in open
AttributeError: seekable
Segmentation fault

I've now again commented out the lines mentioned above from my make.conf and rebuilt python (2 and 3), and portage. I'm also going to go ahead and emerge the rest of my packages with those lines commented out. If anyone can suggest a safer set of default emerge options, please feel free to make suggestions.
Code:
emerge --info
Portage 2.1.11.23 (default/linux/amd64/10.0/desktop/gnome, gcc-4.6.3, glibc-2.15-r3, 3.5.4-gentoo x86_64)
=================================================================
System uname: Linux-3.5.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-2820QM_CPU_@_2.30GHz-with-gentoo-2.2
Timestamp of tree: Wed, 03 Oct 2012 12:30:01 +0000
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12
dev-lang/python:          2.7.3-r2, 3.2.3-r1
dev-util/cmake:           2.8.9-r1
dev-util/pkgconfig:       0.27.1
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.10.5
sys-apps/sandbox:         2.6
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6, 1.12.4
sys-devel/binutils:       2.22.90
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r3
sys-kernel/linux-headers: 3.5 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo local
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="${EPREFIX}/etc/gconf /etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=8 --load-average=8 --with-bdeps y --autounmask-write y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs candy config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parallel-install protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j9 -l8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aacs acl acpi aio alsa amd64 amr artworkextra audio bash-completion berkdb bluetooth bluray branding bzip2 cairo cdaudio cdda cdr cli colord consolekit corefonts cracklib crypt cups cxx dbus djvu dri dts dv dvd dvdr dvi eds emboss encode evo exif extras faac faad fam ffmpeg firefox flac fluidsynth fortran freetype ftp fuse gallium gdbm gif gimp gnome gnome-keyring gnome-online-accounts gpg gphoto2 gpm graphicsmagick graphviz gstreamer gtk gtkstyle iconv icu id3 id3tag infinality inotify ipv6 java jpeg jpeg2k kerberos lame laptop lcms ldap libmpeg2 libnotify libv4l libv4l2 lm_sensors mad matroska md5sum midi mkfont mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses networkmanager nfs nls nntp nptl ns nsplugin ntfs ntlm offensive ogg opengl openmp osdmenu pam pango pcre pdf pm-utils pmu png policykit postscript ppds pppd pulseaudio python qt3support qt4 readline rtmp samba sdl sensord session smp socialweb sox speex spell sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 startup-notification svg t1lib tcpd theora threads tiff tk truetype twolame udev udisks unicode upower usb v4l v4l2 vdpau video virtualbox vorbis vpx wav webcam webkit webm winbind wmf wxwidgets x264 xcb xfs xml xv xvid xvmc youtube zlib zsh-completion" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="canon" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev keyboard mouse synaptics wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="nlpsolver pdfimport presenter-console presenter-minimizer wiki-publisher" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="r600 radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

Thanks..


Last edited by jasn on Thu Oct 04, 2012 3:14 am; edited 1 time in total
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 8291
Location: Saint Amant, Acadiana

PostPosted: Wed Oct 03, 2012 10:11 pm    Post subject: Reply with quote

Quote:
MAKEOPTS="-j9 -l8"

You need lots of RAM for this. Even if you have lots of RAM some of it may be bad.
_________________
My Gentoo installation notes.
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 439
Location: Maryland, US

PostPosted: Wed Oct 03, 2012 11:08 pm    Post subject: Reply with quote

Well I spoke too soon. Something else is wrong. I started the emerge process with my emerge options turned off as mentioned, so basically my system is only emerging a package at a time, and I'm getting errors in building packages anyway. I guess I'll have to dig into this a bit further.

BTW, I've got 32G of RAM total, with 8G as a /tmp ramdisk, as my portage tmpdir. Perhaps I will turn that off and see if this improves things.
Code:
free -m
             total       used       free     shared    buffers     cached
Mem:         32111       8089      24022          0        394       5090
-/+ buffers/cache:       2603      29508
Swap:         2047          4       2043

Also I'm installing a clean Gentoo install after having run Funtoo on this system, with the exact same settings, without issue, for some time now. Perhaps I could have bad hardware like memory, but I would think that those issues would have shown themselves by now.

Thanks..
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21431

PostPosted: Thu Oct 04, 2012 2:35 am    Post subject: Reply with quote

An intermittent fault, especially if it occurs only during heavy compilations, can be an indication of inadequate cooling. You said this is a laptop. Laptops are notorious for inadequate ventilation. What is the resting temperature (in Celsius) of the CPU? What temperature do you see when the segmentation faults appear?
Back to top
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 439
Location: Maryland, US

PostPosted: Thu Oct 04, 2012 3:14 am    Post subject: Reply with quote

[facepalm]

I should remind myself to run memtest86+ before posting something like this. Thanks Jaglover and Hu. If it hadn't been memory it would have been logical to suspect heat. Fortunately memtest86+ is showing bad ram, so I ordered replacement SODIMMs tonight and I think that should sort it out.

(I really started to suspect memory when I started re-emerging the same 4 packages over and over, and they would emerge cleanly one time, only to have the internal compiler: segfault another time..) (shame on me..)

Thanks..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum