Gentoo Archives: gentoo-dev

From: Steven Elling <ellings@×××××.com>
To: Gentoo User <gentoo-user@g.o>
Cc: Gentoo Dev <gentoo-dev@g.o>
Subject: [gentoo-dev] Be Careful of Your MAKEOPTS!!
Date: Thu, 04 Dec 2003 19:27:05
Message-Id: 1070587610.14650.86.camel@radiation.wks.electrostatic.org
1 If your using distcc, have multiple processors, etc. be very careful
2 with using the '-j' option without a number in the MAKEOPTS variable.
3
4 I recently did an update of glibc to glibc-2.3.2-r3 and after a while of
5 compiling my system was freezing. I would start the emerge process and
6 walk away because I knew it would take a while. When I came back to the
7 system later on, the drive light was lit solid and would not shut off.
8 The system would also not respond to user input even though I could
9 switch from VT to VT. Everything I saw happening pointed to a drive
10 failing only part of the time.
11
12 It took me a while to figure out what was going on but I started the
13 emerge process on one VT and sat there a watched it. On another VT, I
14 used watch to periodically display the disk usage, as well as, the
15 output of vmstat. Pretty soon I found out what was going on.
16
17 The system started to slow to a crawl and I happened to look at the
18 process table. There were upward of 870 process running on my box
19 during the compile. Ouch!
20
21 Essentially, I was slowly fork bombing my box because I was using the
22 '-j' option without a number in MAKEOPTS. The man page for make states,
23 "If the -j option is given without an argument, make will not limit the
24 number of jobs that can run simultaneously." With most packages this is
25 not a problem but, in the case of glibc, the source directory has
26 several components to compile and there were enough components that it
27 was bringing my system down.
28
29 Therefore, if you find your system freezing during a emerge like mine
30 did, check your MAKEOPTS.
31
32
33 Steven Elling
34
35
36 P.S. Developers: You might want to look into adding a number to the '-j'
37 option in MAKEOPTS during emerges of certain packages to account for
38 this situation.
39
40
41 --
42 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Be Careful of Your MAKEOPTS!! Mike Frysinger <vapier@g.o>
Re: [gentoo-dev] Be Careful of Your MAKEOPTS!! Ciaran McCreesh <ciaranm@g.o>
Re: [gentoo-dev] Be Careful of Your MAKEOPTS!! Lisa Seelye <lisa@g.o>
Re: [gentoo-dev] Be Careful of Your MAKEOPTS!! Sven Blumenstein <bazik@g.o>