Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Gentoo keeps freezing after trying to emerge chr...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Fri Jun 10, 2011 9:43 am    Post subject: [SOLVED] Gentoo keeps freezing after trying to emerge chr... Reply with quote

Good morning/evening!
Yesterday I reinstalled Gentoo (have been using it for a year without a problem). Kernel version is 2.6.38-r6, I manually compiled it, including all drivers I thought I'd need. I installed gnome-light and booted into it.
At first everything was perfect, but then I tried to install chromium - it downloaded the package, unpacked it, started compiling and after a few minutes my whole system froze. Keyboard and mouse were not responding, the cursor even disappeared from the screen. I waited a bit and gave up and restarted the PC from the button. I tried reinstalling chromium - it kept hanging right after the emerge command. I terminated it, cleaned the /var/tmp/portage directory and emerged it again. This time presumably successfully. It said that it was installed, the icon appeared in the main menu, but when I tried to open it, nothing happened.
I ran emerge -uDN world && revdep-rebuild. revdep-rebuild stopped at 46%. Just hanging. The system was responding somehow - I could move the cursor, open the gnome menu, but whatever I tried to execute, it failed - no nautilus, no Shutdown, no Ctrl+C to terminate revdep-rebuild. I switched to a virtual console and tried to login as root, to reboot, but after I typed in root, it hang there too, not asking me for password. I had to restart it from the button again.
I removed chromium, ran emerge --depclean, emerge -uDN world, revdep-rebuild (this time successfully) and it found no problem.
I tried installing chromium again and this time it returned an error. Here is the log file:

Code:
^[[32;01m * ^[[39;49;00mPackage:    www-client/chromium-11.0.696.71
^[[32;01m * ^[[39;49;00mRepository: gentoo
^[[32;01m * ^[[39;49;00mMaintainer: chromium@gentoo.org
^[[32;01m * ^[[39;49;00mUSE:        amd64 cups elibc_glibc gnome kernel_linux multilib userland_GNU
^[[32;01m * ^[[39;49;00mFEATURES:   sandbox
 ^[[32;01m*^[[0m Determining the location of the kernel source code
 ^[[32;01m*^[[0m Found kernel source directory:
 ^[[32;01m*^[[0m     /usr/src/linux
 ^[[32;01m*^[[0m Found kernel object directory:
 ^[[32;01m*^[[0m     /lib/modules/2.6.38-gentoo-r6/build
 ^[[32;01m*^[[0m Found sources for kernel version:
 ^[[32;01m*^[[0m     2.6.38-gentoo-r6
 ^[[32;01m*^[[0m Checking for suitable kernel configuration options...
^[[A^[[72C ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m
>>> Unpacking source...
>>> Unpacking chromium-11.0.696.71.tar.bz2 to /var/tmp/portage/www-client/chromium-11.0.696.71/work
/usr/lib64/portage/bin/ebuild.sh: line 366: 30610 Broken pipe             $1 -c -- "$srcdir$x"
     30611 Segmentation fault      | tar xof -
 ^[[31;01m*^[[0m ERROR: www-client/chromium-11.0.696.71 failed (unpack phase):
 ^[[31;01m*^[[0m   failure unpacking chromium-11.0.696.71.tar.bz2
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m Call stack:
 ^[[31;01m*^[[0m               ebuild.sh, line   56:  Called src_unpack
 ^[[31;01m*^[[0m             environment, line 6129:  Called _eapi0_src_unpack
 ^[[31;01m*^[[0m               ebuild.sh, line  618:  Called unpack 'chromium-11.0.696.71.tar.bz2'
 ^[[31;01m*^[[0m               ebuild.sh, line  397:  Called _unpack_tar 'bzip2 -d'
 ^[[31;01m*^[[0m               ebuild.sh, line  369:  Called assert_sigpipe_ok 'failure unpacking chromium-11.0.696.71.tar.bz2'
 ^[[31;01m*^[[0m   isolated-functions.sh, line   37:  Called die
 ^[[31;01m*^[[0m The specific snippet of code:
 ^[[31;01m*^[[0m                [[ $x -ne 0 && $x -ne ${PORTAGE_SIGPIPE_STATUS:-141} ]] && die "$@"
 ^[[31;01m*^[[0m
 ^[[31;01m*^[[0m If you need support, post the output of 'emerge --info =www-client/chromium-11.0.696.71',
 ^[[31;01m*^[[0m the complete build log and the output of 'emerge -pqv =www-client/chromium-11.0.696.71'.
 ^[[31;01m*^[[0m The complete build log is located at '/var/tmp/portage/www-client/chromium-11.0.696.71/temp/build.log'.
 ^[[31;01m*^[[0m The ebuild environment file is located at '/var/tmp/portage/www-client/chromium-11.0.696.71/temp/environment'.
 ^[[31;01m*^[[0m S: '/var/tmp/portage/www-client/chromium-11.0.696.71/work/chromium-11.0.696.71'


I gave up, ran emerge --depclean to remove the other packages it installed before chromium and tried to clean my /var/tmp/portage directory again. But when it had 200 MB left to remove it hung again... Even after terminating the command and trying again, it couldn't empty the directory. I had to reboot and try again, to delete it.

I have never encountered anything like that on my previous Gentoo installation. Sorry I can't provide any more useful information, but since it doesn't return any other errors and since, I have no idea what could possibly be causing the freezing, I don't know where to look for logs.
I appologize if the topic is in the wrong section, but as I said, I have no idea where the problem is.

Any help would be appreciated!


Last edited by AaylaSecura on Fri Jun 10, 2011 10:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
SlashBeast
Developer
Developer


Joined: 23 May 2006
Posts: 2908

PostPosted: Fri Jun 10, 2011 10:15 am    Post subject: Reply with quote

Blind guess - you do not have swap (or small one) and while emerging chromium some important processes was killed because of astronomical amount of memory what is needed to compile chromium.
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Fri Jun 10, 2011 10:19 am    Post subject: Reply with quote

Thanks for the reply! But I have never used swap, since I have 2GB of RAM. And on my previous installation (without swap) it did not cause any problems (think)
Back to top
View user's profile Send private message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 700

PostPosted: Fri Jun 10, 2011 10:30 am    Post subject: Reply with quote

I have 4 GB of RAM and no swap and unless I shut down X and every other program I'm using I can't compile chromium. I can assure you 2 GB is NOWHERE NEAR enough memory to compile chromium. You need swap.
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Fri Jun 10, 2011 10:32 am    Post subject: Reply with quote

Thanks, I'll make a swap partition and see if it will be fixed.
Back to top
View user's profile Send private message
SlashBeast
Developer
Developer


Joined: 23 May 2006
Posts: 2908

PostPosted: Fri Jun 10, 2011 10:40 am    Post subject: Reply with quote

Swap is must have, believe me. I have 6G of ram, and 6G of swap (I used to have 1:1 ram:swap). Sometmes, like when I compile chromium, swap is life saver. Also, when you have over 1G of ram, good idea would be config swappiness to resonable value, I have swappiness=5, which is 5% of installed ram, about 300M. By default swappiness is... 60%.
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Fri Jun 10, 2011 7:38 pm    Post subject: Reply with quote

Ok, I formatted a 5GB partition as swap, it shows up as mounted, everything should be fine, but when I tried to emerge it it gave the same error as before... I really have no clue as to what is going on :|
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1945
Location: Zurich, Switzerland

PostPosted: Fri Jun 10, 2011 8:03 pm    Post subject: Reply with quote

how much space does /var/tmp have?
Did you increase it to (lets say) 8G?

V.
_________________
read the portage output!
If my answer is too concise, ask for an explanation.
Back to top
View user's profile Send private message
SlashBeast
Developer
Developer


Joined: 23 May 2006
Posts: 2908

PostPosted: Fri Jun 10, 2011 8:05 pm    Post subject: Reply with quote

shows as mounted? 'cat /proc/swaps' and check if you have this swap enabled (mkswap + swapon).
Back to top
View user's profile Send private message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 700

PostPosted: Fri Jun 10, 2011 9:59 pm    Post subject: Reply with quote

I just realized that if tar was killed by the OOM killer it'd say 'killed', not 'segmentation fault'.

4 possibilities:
- bad RAM
- bad compile of coreutils
- bad compile of glibc
- bad download causing tar to crash

So clean out /usr/portage/distfiles, and if that doesn't help, post the output of
Code:
dmesg|tail

after reproducing the problem.
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Fri Jun 10, 2011 10:15 pm    Post subject: Reply with quote

It is enabled:

Code:
aleksandrina aleksandrina # cat /proc/swaps
Filename            Type      Size   Used   Priority
/dev/sda4                               partition   5245216   0   -1




I have 4GB free, I moved the PORTAGE_TMPDIR to another partition with 10GB free and tried again - IT WORKED!

Thanks to all of you :)
Back to top
View user's profile Send private message
SlashBeast
Developer
Developer


Joined: 23 May 2006
Posts: 2908

PostPosted: Sat Jun 11, 2011 9:02 am    Post subject: Reply with quote

fwiw OOM killer is the feature what kills apps when system need more memory.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6778

PostPosted: Sat Jun 11, 2011 1:20 pm    Post subject: Reply with quote

Aquous wrote:
I have 4 GB of RAM and no swap and unless I shut down X and every other program I'm using I can't compile chromium. I can assure you 2 GB is NOWHERE NEAR enough memory to compile chromium. You need swap.

Unless you're using an insanely high value for make -j, 1GB and no swap is enough to compile chromium.
Back to top
View user's profile Send private message
Aquous
l33t
l33t


Joined: 08 Jan 2011
Posts: 700

PostPosted: Sat Jun 11, 2011 2:18 pm    Post subject: Reply with quote

Perhaps I should add that I compile with -ggdb... hehe 8)
Back to top
View user's profile Send private message
SlashBeast
Developer
Developer


Joined: 23 May 2006
Posts: 2908

PostPosted: Sat Jun 11, 2011 3:03 pm    Post subject: Reply with quote

Well, on 64bit system compilation of chromium use even more memory.
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Sat Jun 11, 2011 6:42 pm    Post subject: Reply with quote

SlashBeast wrote:
fwiw OOM killer is the feature what kills apps when system need more memory.

I have never been fond of any kind of task killers, since I don't trust their judgement on which processes to kill. Now that I added 5 GB of swap, I hope I won't have problems with RAM.

SlashBeast wrote:
Well, on 64bit system compilation of chromium use even more memory.

That explains it - I forgot to mention, that I'm running amd64 :)
Back to top
View user's profile Send private message
Etal
Veteran
Veteran


Joined: 15 Jul 2005
Posts: 1824

PostPosted: Sat Jun 11, 2011 10:20 pm    Post subject: Reply with quote

Aquous wrote:
Perhaps I should add that I compile with -ggdb... hehe 8)


That definitely increases memory usage (and so compilation time for large packages) significantly.

If you don't anticipate filing bugs with backtraces for chromium, you can selectively disable the -ggdb flag.

I've done it like this:

Code:
$ cat /etc/portage/env/no-debug
CFLAGS="${CFLAGS/ -ggdb/}"
CXXFLAGS="${CFLAGS}"
FEATURES="-splitdebug"

$ tree --dirsfirst /etc/portage/env/
/etc/portage/env/
├── app-office
│   ├── libreoffice -> ../no-debug
│   └── openoffice -> ../no-debug
├── dev-vcs
│   └── git -> ../no-debug
├── net-libs
│   └── xulrunner -> ../no-debug
├── sys-devel
│   └── clang -> ../no-debug
├── x11-libs
│   └── qt-webkit -> ../no-debug
└── no-debug

_________________
“And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010
Back to top
View user's profile Send private message
arantius
n00b
n00b


Joined: 03 Jan 2004
Posts: 69

PostPosted: Sun Aug 18, 2019 2:32 pm    Post subject: Reply with quote

For me this was llvm. Emerge it and my machine would always hard lock somewhere in the middle. Emerge with a lower job count and it would (slowly) complete fine. So I:

Code:
$ cat /etc/portage/env/low_jobs.conf
MAKEOPTS="-j4"
$ cat /etc/portage/package.env/llvm
sys-devel/llvm low_jobs.conf


And now I can emerge safely without locking up.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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