Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 149426 - sys-apps/module-init-tools: creates huge amount of processes with USE=no-old-linux
Summary: sys-apps/module-init-tools: creates huge amount of processes with USE=no-old-...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 142397 150686 154126 157534 157860 157959 158027 158156 158259 158603 158913 160162 163831 164088 164602 166340 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-09-28 08:46 UTC by Sascha G.
Modified: 2008-02-10 21:52 UTC (History)
17 users (show)

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


Attachments
Fix endless recursion and wrong handling of newline (generate-modprobe.patch,1.48 KB, patch)
2006-12-09 02:46 UTC, Martin Väth
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha G. 2006-09-28 08:46:01 UTC
When using module-init-tools with USE=no-old-linux, emerging some ebuilds create a huge amount of processes, e.g. ppp.
This happens at the following point:

>>> Original instance of package unmerged safely.
 * Determining the location of the kernel source code
 * Found kernel source directory:
 *     /usr/src/linux
 * Found sources for kernel version:
 *     2.6.17-hardened-r1

 * If the following test report contains a missing kernel configuration option that you need,
 * you should reconfigure and rebuild your kernel before running pppd.
 * Checking for suitable kernel configuration options...
 *   CONFIG_PPP_ASYNC:	 missing asynchronous serial line discipline (optional, but highly recommended)
 *   CONFIG_PPP_SYNC_TTY:	 missing synchronous serial line discipline (optional; used by 'sync' pppd option)
 *   CONFIG_PPP_DEFLATE:	 missing Deflate compression (optional, but highly recommended)
 *   CONFIG_PPP_BSDCOMP:	 missing BSD-Compress compression (optional, but highly recommended)
 *   CONFIG_PPP_MPPE:	 missing MPPE encryption (optional, mostly used by PPTP links)
 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
 * Updating /etc/modprobe.conf by hand ...

I suspended emerge at this point (via ctrl-z).

$ ps ax
[...]
 9087 pts/1    TN     0:00 /bin/bash /sbin/generate-modprobe.conf
28625 pts/1    TN     0:00 /bin/bash /sbin/generate-modprobe.conf
 7626 pts/1    TN     0:00 /bin/bash /sbin/generate-modprobe.conf
29347 pts/1    TN     0:00 /bin/bash /sbin/generate-modprobe.conf
23399 pts/1    TN     0:00 /bin/bash /sbin/generate-modprobe.conf
29332 pts/1    TN     0:00 /bin/bash /sbin/generate-modprobe.conf
[...]

$ ps ax|grep modprobe|wc -l
184

No such problem exists with USE=-no-old-linux. Also, different messages are being shown:

 * Please check to make sure these options are set correctly.
 * Failure to do so may cause unexpected problems.
 * Updating /etc/modules.conf ...                                                               [ ok ]
 * Updating /etc/modprobe.conf ...                                                              [ ok ]
 * Updating modules.dep ...                                                                     [ ok ]

instead of
 * Updating /etc/modprobe.conf by hand ...
Comment 1 Sascha G. 2006-09-28 08:47:15 UTC
Portage 2.1.2_pre1-r3 (selinux/2005.1/x86/hardened, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-hardened-r1 i686)
=================================================================
System uname: 2.6.17-hardened-r1 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz
Gentoo Base System version 1.12.5
Last Sync: Wed, 27 Sep 2006 15:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--alphabetical"
FEATURES="autoconfig collision-protect distlocks loadpolicy parallel-fetch sandbox selinux sfperms strict stricter userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common"
LINGUAS="en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from /etc/portage/rsync_excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X a52 aac alsa bzip2 caps cjk crypt cups dts dvd dvdread elibc_glibc ffmpeg flac ftp gif hardened idn input_devices_keyboard input_devices_mouse ipv6 jpeg kdeenablefinal kernel_linux linguas_en mikmod mmx mp3 ncurses nptl offensive ogg opengl pam pdf pic png selinux sse sse2 ssl symlink theora threads tiff truetype unicode userland_GNU video_cards_nvidia vorbis win32codecs xinerama xv xvid zlib"
Unset:  CTARGET, INSTALL_MASK, LC_ALL
Comment 2 SpanKY gentoo-dev 2006-10-21 23:03:20 UTC
*** Bug 150686 has been marked as a duplicate of this bug. ***
Comment 3 SpanKY gentoo-dev 2006-11-05 14:01:30 UTC
*** Bug 154126 has been marked as a duplicate of this bug. ***
Comment 4 SpanKY gentoo-dev 2006-11-05 14:01:56 UTC
what files do you guys have in /etc/mod*.d/
Comment 5 Sascha G. 2006-11-05 16:48:37 UTC
(In reply to comment #4)
> what files do you guys have in /etc/mod*.d/

In modules.autoload.d: kernel-2.4 + kernel-2.6
In modules.d: aliases + alsa + i386 + nvidia + ppp

These are the default files, except for nvidia, where I added the line "options nvidia NVreg_EnableAGPFW=1".
Comment 6 SpanKY gentoo-dev 2006-11-09 10:42:54 UTC
*** Bug 142397 has been marked as a duplicate of this bug. ***
Comment 7 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2006-12-07 09:25:58 UTC
comment http://bugs.gentoo.org/show_bug.cgi?id=142397#c4 lead me to the correct solution. I removed the compatibility entries for nvidia devices in /etc/modules.d/aliases and modules-update works again.
Comment 8 Petteri Räty (RETIRED) gentoo-dev 2006-12-08 02:09:49 UTC
Seems to happen with every external kernel module installation nowadays. I am using sys-apps/baselayout-1.13.0_alpha7-r1 so it might be triggered by that.
Comment 9 Petteri Räty (RETIRED) gentoo-dev 2006-12-08 02:17:51 UTC
(In reply to comment #8)
> Seems to happen with every external kernel module installation nowadays. I am
> using sys-apps/baselayout-1.13.0_alpha7-r1 so it might be triggered by that.
> 

Ok this was just caused by a recent upgrade of nvidia-drivers. Could baselayout be updated so that the entries would only be installed once so that we can at least prevent our users from hitting this problem?
Comment 10 SpanKY gentoo-dev 2006-12-08 07:32:19 UTC
the real fix would be to find out why the thing is fork bombing and stop it from doing so

munging drivers isnt a real fix since /etc/modules.d/ is for old things
Comment 11 Jakub Moc (RETIRED) gentoo-dev 2006-12-08 14:36:45 UTC
*** Bug 157534 has been marked as a duplicate of this bug. ***
Comment 12 Martin Väth 2006-12-09 02:46:36 UTC
Created attachment 103671 [details, diff]
Fix endless recursion and wrong handling of newline

I had analized the problem, and it turns out that these
are actually *two* bugs in /sbin/generate-modprobe:

1. If the same alias occurs twice, the grep-commmand in the
   resolve_alias function returns both matches separated by return.
   resolve_alias then stumbles over this return due to missing quotes.
   The clean solution is to die when there are more than one match.

2. There is no test about endless recursion at all in resolve_alias.
   So the lines
   alias a b
   alias b a
   will also lead to an endless loop.

I add a patch which fixes both bugs.
Comment 13 Togge 2006-12-11 01:02:47 UTC
I can confirm that this fixed my forkbombing issue, nice work.
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2006-12-11 14:39:58 UTC
*** Bug 157860 has been marked as a duplicate of this bug. ***
Comment 15 SpanKY gentoo-dev 2006-12-12 19:50:20 UTC
*** Bug 157959 has been marked as a duplicate of this bug. ***
Comment 16 Jakub Moc (RETIRED) gentoo-dev 2006-12-13 06:49:42 UTC
*** Bug 158027 has been marked as a duplicate of this bug. ***
Comment 17 Ira Snyder 2006-12-13 12:51:14 UTC
The patch from #12 also fixed this for me.
Comment 18 SpanKY gentoo-dev 2006-12-13 18:39:27 UTC
thanks, fixed in module-init-tools-3.2.2-r2
Comment 19 Jakub Moc (RETIRED) gentoo-dev 2006-12-14 13:22:43 UTC
*** Bug 158156 has been marked as a duplicate of this bug. ***
Comment 20 Jakub Moc (RETIRED) gentoo-dev 2006-12-16 01:11:04 UTC
*** Bug 158259 has been marked as a duplicate of this bug. ***
Comment 21 Jakub Moc (RETIRED) gentoo-dev 2006-12-20 00:49:00 UTC
*** Bug 158603 has been marked as a duplicate of this bug. ***
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2006-12-23 06:52:11 UTC
*** Bug 158913 has been marked as a duplicate of this bug. ***
Comment 23 SpanKY gentoo-dev 2007-01-05 00:34:26 UTC
*** Bug 160162 has been marked as a duplicate of this bug. ***
Comment 24 Simon Cooper 2007-01-15 16:38:59 UTC
May I ask that the patch gets backported to -r1? It's a major bug, that the latest 'stable' is suffering from, and adding -r2 to portage.keywords screws things up because it depends on an unstable baselayout, which has other unstable dependancies as well (eg virtual/init)
Comment 25 SpanKY gentoo-dev 2007-01-16 01:37:50 UTC
no
Comment 26 Jakub Moc (RETIRED) gentoo-dev 2007-01-26 07:38:56 UTC
*** Bug 163831 has been marked as a duplicate of this bug. ***
Comment 27 Jakub Moc (RETIRED) gentoo-dev 2007-01-27 18:43:28 UTC
*** Bug 164088 has been marked as a duplicate of this bug. ***
Comment 28 Jakub Moc (RETIRED) gentoo-dev 2007-01-30 20:21:10 UTC
*** Bug 164602 has been marked as a duplicate of this bug. ***
Comment 29 Jakub Moc (RETIRED) gentoo-dev 2007-02-11 13:37:22 UTC
*** Bug 166340 has been marked as a duplicate of this bug. ***