Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 238134 - emerging some ebuilds create a huge amount disk swapping and hang the pc
Summary: emerging some ebuilds create a huge amount disk swapping and hang the pc
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-19 19:01 UTC by mondrillo
Modified: 2008-11-18 17:25 UTC (History)
1 user (show)

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


Attachments
linux-2.6.26-gentoo-r1 Kernel configuration (.config,65.95 KB, text/plain)
2008-09-21 10:09 UTC, mondrillo
Details
make.conf file (make.conf,3.12 KB, text/plain)
2008-09-21 10:11 UTC, mondrillo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mondrillo 2008-09-19 19:01:11 UTC
I'm playing amarok, aMule an Pidgin( Hotmail, Yahoo and Freenode) is up and open a gnome-terminal, I do a su - and emerge phpmyadmin, after 2 seconds I hear the swapping of the hard disk and all apps are hang, a lot off swapping for a loop. Cannot stop with CTRL+C and cannot do anything that reset the PC. 
 There is a five twice that it's happend the same with emerging other ebuilds.

Reproducible: Sometimes

Steps to Reproduce:
1.Open gnome-terminal and su -
2.emerge something
3.hang




/var/log/ebuild.log

... after emerge --sync it's ok

1221775206:  *** emerge --quiet sync
1221775206:  === sync
1221775206: >>> Starting rsync with rsync://134.68.220.97/gentoo-portage
1221775232: >>> Starting retry 1 of 3 with rsync://91.186.30.235/gentoo-portage
1221775476: === Sync completed with rsync://91.186.30.235/gentoo-portage
1221775529:  *** terminating.
1221846703: Started emerge on: Sep 19, 2008 19:51:43
---<<<<<<------Here I do the emerge phpmyadmin
1221846703:  *** emerge  phpmyadmin
1221846735:  >>> emerge (1 of 3) app-admin/webapp-config-1.50.16-r3 to /
1221848026: Started emerge on: Sep 19, 2008 20:13:46
---<<<<<<------It's hang with no data reset and after do some full susefully emerge's 




# emerge --info



Portage 2.2_rc8 (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.26-gentoo-r1-x86_64-AMD_Athlon-tm-_64_Processor_3000+-with-glibc2.2.5
Timestamp of tree: Thu, 18 Sep 2008 22:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.4.4-r13, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.62-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.26
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -pipe -O2"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -pipe -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch preserve-libs sandbox sfperms unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo ftp://mirrors.blueyonder.co.uk/sites/gentoo ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://mirror.switch.ch/mirror/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/ ftp://ftp.solnet.ch/mirror/Gentoo http://www.mirror.ac.uk/mirror/www.ibiblio.org/"
LDFLAGS="-Wl,-O1"
LINGUAS="es"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp/portage"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl alsa amd64 amr apache2 arts automount autostart avi berkdb bidi bluetooth bzip2 caps cdda cdio cdr cli cpdflib cracklib crypt ctype cups curl dba dga dlloader dri dts dvb dvd dvdread encode ffmpeg firefox fortran freetype gd gdbm gdexternal glade glitz gnome gnutls gpm gtk gtk2 httpd iconv ipv6 irmc isdnlog jpeg kde lame live mad matroska midi mikmod mjpeg mmx mmx2 mp3 mp4 mpeg mplayer mudflap multilib musepack mysql nautilus ncurses network new-login nls nptl nptlonly nvidia obex ogg oggvorbis opengl openmp pam pcre pdf pdo-external pear perl photo-viewer php php5 png pppd python quicktime readline reflection samba scanner sdl session simplexml soap soup spell spl sqlite sse sse2 ssl stream svg symlink sysfs syslog tcpd theora threads tk transcode truetype unicode usb useflag utf8 v4l2 vcd vlc vlm vorbis wxwindows xinerama xml xorg xsl xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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 auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="es" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY



# cat /proc/cpuinfo 


processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 12
model name	: AMD Athlon(tm) 64 Processor 3000+
stepping	: 0
cpu MHz		: 2000.000
cache size	: 512 KB
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext 3dnow rep_good
bogomips	: 4025.13
TLB size	: 1024 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

# uname -an
Linux gentoo64 2.6.26-gentoo-r1 #2 PREEMPT Mon Sep 1 23:04:46 CEST 2008 x86_64 AMD Athlon(tm) 64 Processor 3000+ AuthenticAMD GNU/Linux
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-09-19 19:33:41 UTC
Would you mind providing "cat /proc/meminfo" - I'm not sure we can do much about this though =/
Comment 2 mondrillo 2008-09-19 20:08:26 UTC
Yes of course

 # cat /proc/meminfo
MemTotal:      1027028 kB
MemFree:         10380 kB
Buffers:         27720 kB
Cached:         328672 kB
SwapCached:          0 kB
Active:         749168 kB
Inactive:       193776 kB
SwapTotal:           0 kB
SwapFree:            0 kB
Dirty:             136 kB
Writeback:           0 kB
AnonPages:      586576 kB
Mapped:         129120 kB
Slab:            32448 kB
SReclaimable:    17936 kB
SUnreclaim:      14512 kB
PageTables:      18688 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:    513512 kB
Committed_AS:  1749252 kB
VmallocTotal: 34359738367 kB
VmallocUsed:     21152 kB
VmallocChunk: 34359709691 kB

Comment 3 mondrillo 2008-09-19 20:55:42 UTC
Sorry I haven't any swap cache up :-(, I hope there not the problem but...
Now I have one swap raid 0, an active :-)

# swapon -s
Filename				Type		Size	Used	Priority
/dev/md0                                partition	1774904	0	-1

Now meminfo, have SwapTotal

# cat /proc/meminfo 

MemTotal:      1027028 kB
MemFree:         79732 kB
Buffers:          2752 kB
Cached:         319056 kB
SwapCached:          0 kB
Active:         674656 kB
Inactive:       189408 kB
SwapTotal:     1774904 kB
SwapFree:      1774904 kB
Dirty:              12 kB
Writeback:           0 kB
AnonPages:      542280 kB
Mapped:         115148 kB
Slab:            42068 kB
SReclaimable:    28480 kB
SUnreclaim:      13588 kB
PageTables:      18152 kB
NFS_Unstable:        0 kB
Bounce:              0 kB
WritebackTmp:        0 kB
CommitLimit:   2288416 kB
Committed_AS:  1691908 kB
VmallocTotal: 34359738367 kB
VmallocUsed:     22024 kB
VmallocChunk: 34359709691 kB


And now two raid0 devices with two hard disk 

# mdadm /dev/md0
/dev/md0: 1733.31MiB raid0 2 devices, 0 spares. Use mdadm --detail for more detail.
gentoo64 ~ # mdadm /dev/md1
/dev/md1: 296.21GiB raid0 2 devices, 0 spares. Use mdadm --detail for more detail.

Here, my fdisl config

fdisk -l

Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x003a0039

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1          25      200781   83  Linux
/dev/sda2              26         123      787185   82  Linux swap / Solaris
/dev/sda3             124       19457   155300355   fd  Linux raid autodetect

Disk /dev/sdb: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x13b013af

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         123      987966   82  Linux swap / Solaris
/dev/sdb2             124       19457   155300355   fd  Linux raid autodetect


I will be atent if the error it will be reproduce one more.  :-(
Comment 4 mondrillo 2008-09-20 10:42:54 UTC
I have emerge the last update and the CPU is 100% HIGH but don't hang now. 

CCACHE_DIR="/var/tmp/ccache" ccache -s
cache directory                     /var/tmp/ccache
cache hit                         691724
cache miss                       1573860
called for link                   192689
multiple source files                528
compile failed                     40880
preprocessor error                 27843
couldn't find the compiler          1617
bad compiler arguments                10
not a C/C++ file                   85617
autoconf compile/link             369980
unsupported compiler option        76786
no input file                     187161
files in cache                    124309
cache size                           1.8 Gbytes
max cache size                       2.0 Gbytes
Comment 5 Andrey Vul 2008-09-21 02:37:22 UTC
The hangs might be due to bad drivers for your HD controller. Can you post your kernel's .config file?
Comment 6 Andrey Vul 2008-09-21 05:25:53 UTC
What are your MAKEOPTS ?
I have 2 GB and MAKEOPTS="-j2" results in ~150 MB free RAM (emerging gcc, etc.) according to /proc/meminfo.
Also, does the hang happen right after the message "Regenerationgs /etc/ld.so.cache" ?
Comment 7 mondrillo 2008-09-21 10:09:25 UTC
Created attachment 165975 [details]
linux-2.6.26-gentoo-r1 Kernel configuration
Comment 8 mondrillo 2008-09-21 10:11:37 UTC
Created attachment 165977 [details]
make.conf file

MAKEOPTS="-j2"
Comment 9 mondrillo 2008-09-21 10:20:09 UTC
(In reply to comment #8)
> Created an attachment (id=165977) [edit]
> make.conf file
> 
> MAKEOPTS="-j2"
> 
> Also, does the hang happen right after the message "Regenerationgs
> /etc/ld.so.cache" ?

No, it's happend just doing the emerge ... command that swap and swap and don't show any output. :-(

I "belive", it can be for haven't swap activated. This could be the problem.

 I recently reinstall from scracth the system do it for a system file permiss problem and miss to put the mdadm.conf conf file ) from 4 years ago that I have Gentoo up and running.

I have de swap partition in a raid0 too. 
Comment 10 mondrillo 2008-09-21 10:33:02 UTC
When recompile gimp to tiff --newuse it's has all men used ? only 60Mb free, it this normal?


top - 12:29:40 up 1 day, 16:35,  1 user,  load average: 3.09, 3.10, 2.63
Tasks: 106 total,   5 running, 100 sleeping,   0 stopped,   1 zombie
Cpu(s): 59.0%us, 39.7%sy,  0.0%ni,  0.0%id,  0.3%wa,  0.0%hi,  1.0%si,  0.0%st
Mem:   1027028k total,   965984k used,    61044k free,    60856k buffers
Swap:  1774904k total,   332292k used,  1442612k free,   383292k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                                       
13126 usrusru   20   0  413m  98m 9020 R 12.7  9.9 250:19.60 amule                                                                                                                                         
 3858 root      20   0  156m  60m 7824 S  6.0  6.0  76:45.13 X                                                                                                                                             
27814 usrusru   20   0  664m 142m  32m S  4.0 14.2   2:48.46 firefox-bin                                                                                                                                   
 4041 usrusru   20   0  286m  18m 8904 S  1.7  1.8   3:19.02 gnome-panel                                                                                                                                   
 4248 usrusru   20   0  249m  12m 6368 R  0.7  1.2   1:17.19 gnome-terminal                                                                                                                                
16951 usrusru   20   0 19060 1364  988 R  0.7  0.1   0:00.32 top                                                                                                                                           
18544 mysql     20   0  226m 6384 2620 S  0.7  0.6   1:43.96 mysqld                                                                                                                                        
 4029 usrusru   20   0  148m 1620 1064 S  0.3  0.2   2:26.48 gnome-screensav                                                                                                                               
 4037 usrusru   20   0  152m 8328 6136 S  0.3  0.8   1:34.75 metacity                                                                                                                                      
    1 root      20   0  3812  300  272 S  0.0  0.0   0:01.34 init                                                                                                                                          
    2 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kthreadd                                                                                                                                      
    3 root      15  -5     0    0    0 S  0.0  0.0   0:05.80 ksoftirqd/0                                                                                                                                   
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:01.90 watchdog/0                                                                                                                                    
    5 root      15  -5     0    0    0 S  0.0  0.0   0:05.66 events/0                                                                                                                                      
    6 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khelper                                                                                                                                       
   68 root      15  -5     0    0    0 S  0.0  0.0   0:05.68 kblockd/0                                                                                                                                     
   71 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpid                                                                                                                                        
   72 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kacpi_notify                                                                                                                                  
  155 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ata/0                                                                                                                                         
  156 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ata_aux                                                                                                                                       
  158 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kseriod                                                                                                                                       
  203 root      15  -5     0    0    0 S  0.0  0.0   0:27.00 kswapd0                                                                                                                                       
  204 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 aio/0                                                                                                                                         
  205 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 xfslogd/0                                                                                                                                     
  206 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 xfsdatad/0                                                                                                                                    
  207 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 xfs_mru_cache                                                                                                                                 
  346 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ath5k_pci                                                                                                                                     
  393 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_0                                                                                                                                     
  395 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 scsi_eh_1                                                                                                                                     
  422 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kpsmoused                                                                                                                                     
  453 root      15  -5     0    0    0 S  0.0  0.0   0:00.12 reiserfs/0                                                                                                                                    
  544 root      16  -4 14116  328  264 S  0.0  0.0   0:00.50 udevd                                                                                                                                         
 1032 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 ksuspend_usbd                                                                                                                                 
 1033 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 khubd                                                                                                                                         
 1128 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 saa7133[0]                                                                                                                                    
 2245 root      15  -5     0    0    0 S  0.0  0.0   0:00.00 kjournald                                                                                                                                     
 3210 ntp       20   0 25272  976  840 S  0.0  0.1   0:01.98 ntpd                                                                                                                                          
 3739 messageb  20   0 14872  684  468 S  0.0  0.1   0:02.06 dbus-daemon                                                                                                                                   
 3754 root      20   0 17500  600  432 S  0.0  0.1   0:00.24 syslog-ng
Comment 11 mondrillo 2008-09-21 14:03:15 UTC
If the swap is off, and no free memory are there emerge can fail?
Comment 12 mondrillo 2008-11-17 18:36:33 UTC
(In reply to comment #11)
> If the swap is off, and no free memory are there emerge can fail?
> 

(In reply to comment #11)
> If the swap is off, and no free memory are there emerge can fail?
> 

Comment 13 Andrei Slavoiu 2008-11-17 22:09:59 UTC
From my own experience, the newer versions of GCC (>=4.1) can easily use more then 1GB of RAM while compiling some C++ sources on AMD64. So unless you can get more RAM expect swap to be used intensely while building some packages.
Comment 14 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-18 16:43:42 UTC
The times you run out of memory is when you should consider investing in more RAM - this isn't a problem software can fix.