Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 258442 - sys-apps/module-init-tools-3.6 requires /sys to be mounted
Summary: sys-apps/module-init-tools-3.6 requires /sys to be mounted
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 258352 259104 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-10 13:50 UTC by lordcris
Modified: 2009-02-18 11:00 UTC (History)
23 users (show)

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


Attachments
module-init-tools-sysfs-no-fatal.patch (module-init-tools-sysfs-no-fatal.patch,380 bytes, patch)
2009-02-13 07:07 UTC, SpanKY
Details | Diff
Kernel patch to enable module autoload tracing (linux-kmod-tracing.patch,698 bytes, text/plain)
2009-02-14 12:04 UTC, Maciej Grela
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lordcris 2009-02-10 13:50:22 UTC
sys-apps/module-init-tools-3.6  
causes repeted messages
modprobe: FATAL: /sys is not mounted
on boot.

system boots fine in 20 seconds.
but there is definitely something wrong.

Reproducible: Always
Comment 1 aidar 2009-02-10 17:13:01 UTC
I confirm, after upgrading to module-init-tools-3.6 I get :

"modprobe: FATAL: sys is not mounted."
Comment 2 Ashu Tiwary 2009-02-10 21:17:14 UTC
I confirm the presence of the repeating messages - but my system does not continue on to boot - I did a hard reboot after five minutes of watching the messages scroll.

Reverting back to module-init-tools-3.5 continues to work correctly.

I'm using an amd64 system:

Portage 2.1.6.7 (default/linux/amd64/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.27-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7700_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Tue, 10 Feb 2009 18:15:02 +0000
app-shells/bash:     3.2_p48-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.2
sys-apps/sandbox:    1.3.5
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=core2 -mtune=core2 -mmmx -msse -msse2 -msse3 -mssse3 -fomit-frame-pointer -mfpmath=sse"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/lib64/fax /usr/share/config /var/lib/hsqldb /var/spool/fax/etc /var/spool/torque"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /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/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=core2 -mtune=core2 -mmmx -msse -msse2 -msse3 -mssse3 -fomit-frame-pointer -mfpmath=sse"
DISTDIR="/mnt/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="ftp://ftp.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.tds.net/gentoo ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ ftp://mirror.datapipe.net/gentoo ftp://mirror.mcs.anl.gov/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ "
LANG="C"
LC_ALL="C"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en en_US en_GB en_IN hi hi_IN de de_DE es es_ES es_MX fr fr_FR it it_IT ja ja_JP ko ko_KR ru ru_RU zh zh_CN zh_HK zh_TW"
MAKEOPTS="-j3"
PKGDIR="/mnt/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=500"
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="/mnt/portage/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/mnt/portage/local /usr/local/portage/layman/jokey /usr/local/portage/layman/java-overlay /usr/local/portage/layman/vmware"
SYNC="rsync://rsync21.us.gentoo.org/gentoo-portage"
USE="X acl amd64 berkdb bzip2 cli cracklib crypt cups doc dri examples fortran gdbm gpm htmlhandbook iconv ipv6 isdnlog midi mmx mudflap multilib ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection sample session source spl sse sse2 sse3 ssl ssse3 sysfs tcpd test unicode xorg 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 mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cern_meta charset_lite dav dav_fs dav_lock dbd deflate dir disk_cache dumpio env expires ext_filter file_cache filter headers ident imagemap include info log_config log_forensic logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http rewrite setenvif speling status substitute unique_id userdir usertrack version vhost_alias" APACHE2_MPMS="worker" CAMERAS="adc65 agfa-cl20 aox barbie canon casio clicksmart310 digigr8 digita dimera directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 kodak konica largan lg_gsm mars minolta mustek panasonic pccam300 pccam600 polaroid ptp2 ricoh samsung sierra sipix smal sonix sonydscf1 sonydscf55 soundvision spca50x sq905 stv0674 stv0680 sx330z template toshiba agfa_cl20 casio_qv dimagev dimera3500 kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica_qm150 panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh_g3 sipix_blink sipix_blink2 sipix_web2 sony_dscf1 sony_dscf55 toshiba_pdrm11 jl2005a topfield" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse synaptics vmmouse void" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US en_GB en_IN hi hi_IN de de_DE es es_ES es_MX fr fr_FR it it_IT ja ja_JP ko ko_KR ru ru_RU zh zh_CN zh_HK zh_TW" LIRC_DEVICES="all" NETBEANS_MODULES="apisupport harness ide java nb cnd groovy gsf identity j2ee mobility php profiler soa visualweb webcommon websvccommon xml" USERLAND="GNU" VIDEO_CARDS="nvidia nv vmware fbdev v4l vesa vga"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS
Comment 3 Rémi Cardona (RETIRED) gentoo-dev 2009-02-10 22:14:20 UTC
confirming on 2 ~x86 boxens.

@Mike, maybe this version should be masked until this bug is fixed?

Cheers
Comment 4 SpanKY gentoo-dev 2009-02-11 03:28:11 UTC
try adding 'need sysfs' to depend() in /etc/init.d/modules
Comment 5 Rasmus P 2009-02-11 15:53:00 UTC
OpenRC got updated to 0.4.3 today. Doesn't fix the problem.

(In reply to comment #4)
> try adding 'need sysfs' to depend() in /etc/init.d/modules
> 
I tried adding this with the new OpenRC. Doesn't fix the problem.
Comment 6 Gonçalo Silva 2009-02-11 23:35:33 UTC
Same happening on my ~x86 box. Took about of 45 seconds of this messages being printed before it continued the boot-up process.
Comment 7 SpanKY gentoo-dev 2009-02-11 23:57:16 UTC
can someone post the boot log and/or highlight the services that get started before and after the error messages ?  the only thing that should load modules is the modules script and if that depends on sysfs, there shouldnt be a problem from that.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-12 02:30:14 UTC
spanky: the sysfs init script goes up immediately after the messages. I don't have a serial console handy at the moment, but I'll try to see what I can capture.
I think the kernel is triggering modprobes, but I can't confirm it.
Comment 9 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-12 04:09:08 UTC
Spanky: Ok, I got some more details, as well as a workaround for now.

====
INIT: version 2.86 booting
request_module: runaway loop modprobe net-pf-1
modprobe: FATAL: /sys is not mounted
...
(many repeats of modprobe, some of request_module)
OpenRC 0.4.2 is starting ...
(more request_module/modprobe)
====

net-pf-1 is the UNIX socket. I have it built as module on most of my systems. Changing to built-in makes the problem go away.
Comment 10 SpanKY gentoo-dev 2009-02-12 05:57:37 UTC
istr some threads on the mailing lists about there being some places where the autoloading of modules had bugs (specific to some drivers)

at any rate, are you using an initramfs ?

the older module-init-tools parsed /proc, but that would be just as unavailable as /sys at that point in time.  i thought i looked at the change and the /proc being unavailable was just as fatal, but perhaps not.  i'll check again.
Comment 11 SpanKY gentoo-dev 2009-02-12 05:59:33 UTC
mailing lists == lkml
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2009-02-12 08:24:48 UTC
yeah, this is an initramfs box for my LVM, but I don't find any of the normal initramfs output, I think it's being killed by the modprobe error stuff.
Comment 13 Rémi Cardona (RETIRED) gentoo-dev 2009-02-12 08:52:35 UTC
As for me, I'm not using any initramfs, although I do have the support built into the kernel...

Cheers
Comment 14 dony 2009-02-12 10:22:47 UTC
with rc_parallel DISABLED in rc.conf the message is gone!!! 
Comment 15 Rasmus P 2009-02-12 12:16:57 UTC
(In reply to comment #14)
> with rc_parallel DISABLED in rc.conf the message is gone!!! 
> 

I've been running with rc_parallel="NO" all the time, and still has this problem.
Comment 16 dony 2009-02-12 12:56:32 UTC
> 
> I've been running with rc_parallel="NO" all the time, and still has this
> problem.
> 
I double ckeced it:

with rc_parallel="NO"  - no messages
with rc_parallel="YES" - modprobe: FATAL: sys is not mounted

same in  sys-apps/openrc-0.4.2 AND 0.4.3 --> ~x86 / 2.6.27-gentoo-r7 AND 2.6.28-gentoo-r1 / module-init-tools-3.6

emerge --info
Portage 2.1.6.7 (default/linux/x86/2008.0/desktop, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.27-gentoo-r7 i686)
=================================================================
System uname: Linux-2.6.27-gentoo-r7-i686-Intel-R-_Pentium-R-_M_processor_1.70GHz-with-glibc2.0
Timestamp of tree: Thu, 12 Feb 2009 09:00:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p48-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3
sys-apps/sandbox:    1.3.6
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium-m -O2 -pipe -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/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/sandbox.d /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=pentium-m -O2 -pipe -fomit-frame-pointer"
DISTDIR="/SUN/tmp"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE@euro"
LC_ALL="de_DE@euro"
LDFLAGS="-Wl,-O1"
LINGUAS="de"
MAKEOPTS=""
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="/SUN"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X X509 a52 aac aalib acl acpi alsa apache2 asf automopunt avahi avi bacula-clientonly bash-completion berkdb branding bzip2 cairo cdr cli cracklib crypt cups dbus dri drm dvd dvdr dvdread eds emboss emerald encode esd evo fam fbcondecor ffmpeg firefox fortran gdbm gif glitz gnome gnome-keyring gphoto2 gpm gstreamer gtk hal iconv imagemagick ipod ipv6 irda isdnlog java jpeg jpeg2k laptop largefile ldap libnotify mad mdnsresponder-compat midi mikmod mono mp3 mpeg mudflap nautilus ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp pam pcre pdf pdflib perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection reiserfs sdl session sms spell spl ssl startup-notification svg sysfs tcpd tiff truetype udev unicode usb v4l2 v4li vcd vidix vorbis wifi win32codecs x86 xcb xml xorg xulrunner xv xvid xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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="access authz_host auth auth_dbm auth_anon auth_digest alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in deflate mime-magic cern-meta expires filter headers loop-aes usertrack unique-id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so unique_id" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="vesa i810 vga vmware v4l intel"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY



Comment 17 SpanKY gentoo-dev 2009-02-12 14:55:11 UTC
there are probably a few different ways this issue shows up, some of which will be solved by my /etc/init.d suggestion (and thus perhaps the parallel change)
Comment 18 SpanKY gentoo-dev 2009-02-12 14:55:29 UTC
*** Bug 258352 has been marked as a duplicate of this bug. ***
Comment 19 Eduard Huguet 2009-02-12 19:22:22 UTC
Hi, 
    Just a "me too" note, but I'll also add some info that might (or not) be useful to solve this bug:

· running on ~x86, fully up-to-date, Gentoo sources 2.6.28-r1
· I get a bunch of the "modprobe: FATAL: /sys is not mounted" just after loading the kernel, at OpenRC startup (I guess), but then the system continues and boots (almost...) fine.
· the previous "almost" specifically means that it fails to load snd_seq_oss, snd_pcm_oss & snd_mixer_oss modules (it says "file not found" or something similar), although they are there and I can just modprobe them succesfully once system has finished boot. Maybe it's not related, but I'm almost sure this wasn't happening before.
· any other service starts fine, including KDE4 KDM.
· setting RC_PARALLEL="NO" or adding "need sysfs" to /etc/init.d/modules makes no difference to me, I get the very same behaviour in all cases.

I hope this might help.
Comment 20 SpanKY gentoo-dev 2009-02-13 07:07:48 UTC
Created attachment 181843 [details, diff]
module-init-tools-sysfs-no-fatal.patch

someone try this patch.  the modprobe code is written already to handle the case where it doesnt know if a module is loaded (because /proc or /sys or whatever is not available).  so just drop the spurious check.
Comment 21 George Kadianakis (RETIRED) gentoo-dev 2009-02-13 07:51:59 UTC
(In reply to comment #20)
> Created an attachment (id=181843) [edit]
> module-init-tools-sysfs-no-fatal.patch
> 
> someone try this patch.  the modprobe code is written already to handle the
> case where it doesnt know if a module is loaded (because /proc or /sys or
> whatever is not available).  so just drop the spurious check.
> 

From what I see, both rmmod() and insmod() of handle_module() are using module_in_kernel(), which according to the comments 'assumes that sysfs is mounted' (which is normal, since handle_module() should have made sure that sysfs is mounted) to use the nofail_asprintf with an argument referring to /sys/module.
Comment 22 SpanKY gentoo-dev 2009-02-13 08:07:24 UTC
i think you're confusing the "nofail" part of asprintf.  the nofail means it checks the return value of asprintf to make sure that step didnt fail (since asprintf implies memory allocation).  it makes no statement whatsoever about the buffer that was actually sprintf-ed (a path in this case).
Comment 23 Maciej Grela 2009-02-14 12:04:20 UTC
Created attachment 181994 [details]
Kernel patch to enable module autoload tracing
Comment 24 Maciej Grela 2009-02-14 12:07:31 UTC
I have fixed this for my system by enabling support for the "BSD legacy PTYs" in the kernel. After that the modprobe error message doesn't appear. If you want to check, if that was the reason in your system too please apply the linux-kmod-tracing.patch attached. It will show you all module names requested by the kernel. In my case, dmesg was being spammed by entries like:

[    8.837316] kmod: Requesting module char-major-2
[    8.839291] kmod: Requesting module char-major-2-72
[    8.841246] kmod: Requesting module char-major-2
[    8.843164] kmod: Requesting module char-major-2-73
[    8.845093] kmod: Requesting module char-major-2
[    8.847309] kmod: Requesting module char-major-2-74
[    8.849324] kmod: Requesting module char-major-2
[    8.851511] kmod: Requesting module char-major-2-75
[    8.853491] kmod: Requesting module char-major-2
[    8.855397] kmod: Requesting module char-major-2-76
[    8.857407] kmod: Requesting module char-major-2
[    8.859705] kmod: Requesting module char-major-2-77
[    8.861627] kmod: Requesting module char-major-2
[    8.863919] kmod: Requesting module char-major-2-78

The character device 2 are the legacy PTYs according to linux/Documentation/devices.txt

The only question remains, what part of openrc (and init) triggers the kernel to try to init bsd ptys ?

Best regards,
Maciej Grela
Comment 25 Roy Marples 2009-02-14 17:41:57 UTC
OpenRC uses the openpty call for logging and prettying parallel messages. My kernel doesn't build Legacy BSD PTY support, not even as a module.
Comment 26 PaX Team 2009-02-15 11:22:51 UTC
after some debugging and code reading, this is what seems to happen:

1. openrc/rc starts up and calls rc_logger_open() *before* it calls do_sysinit().

2. rc_logger_open() calls openpty() (it's even commented that /dev/pts may not be available as yet, in fact, that's pretty much guaranteed to be the case on boot, so what's the point of even trying...).

3. glibc/openpty() first calls __posix_openpt() which checks that either /dev/pts is mounted as DEVPTS_SUPER_MAGIC or that /dev is mounted as DEVFS_SUPER_MAGIC.

4. since neither is true at this early stage of booting, openpty() falls back to __bsd_getpt() which in turn will provoke all the modprobe messages if the kernel doesn't have the legacy BSD pty support.

i'm not sure where to place the blame here, it's a rather unfortunate sequence of events that openrc/glibc/modprobe all take part in but i hope someone can figure out the best way of fixing this mess ;).
Comment 27 Roy Marples 2009-02-15 11:55:55 UTC
(In reply to comment #26)
> 1. openrc/rc starts up and calls rc_logger_open() *before* it calls
> do_sysinit().
> 
> 2. rc_logger_open() calls openpty() (it's even commented that /dev/pts may not
> be available as yet, in fact, that's pretty much guaranteed to be the case on
> boot, so what's the point of even trying...).

Some environments have openpty() working before OpenRC does sysinit, so the attempt is valid.
Comment 28 PaX Team 2009-02-15 12:35:43 UTC
(In reply to comment #27)
> (In reply to comment #26)
> > 1. openrc/rc starts up and calls rc_logger_open() *before* it calls
> > do_sysinit().
> > 
> > 2. rc_logger_open() calls openpty() (it's even commented that /dev/pts may not
> > be available as yet, in fact, that's pretty much guaranteed to be the case on
> > boot, so what's the point of even trying...).
> 
> Some environments have openpty() working before OpenRC does sysinit, so the
> attempt is valid.

in that case wouldn't it be reasonable to restrict the attempt to those environments only? or is that not (easily) feasible?

on another note, i looked at the glibc's __getpt/__bsd_getpt and i think it's a bug in the sense that it attempts to break out of the try-each-pty loop early if the open() attempt gets a particular errno (ENOENT) only, maybe ENXIO should also be treated the same way since that means there's no kernel driver behind the /dev entry (or should the kernel return ENOENT in such a case?).
Comment 29 Roy Marples 2009-02-15 16:38:32 UTC
(In reply to comment #28)
> in that case wouldn't it be reasonable to restrict the attempt to those
> environments only? or is that not (easily) feasible?

I'm not sure that I can as I have no way of knowing if the openpty will work or not until I make the call, by which time it's too late.

The only possible "fix" from OpenRC is to add a knob to say "don't log or run in parallel the sysinit runlevel". But I think the real "fix" would either be the user enabling the right kernel options or not making libc/modprobe so spammy. We have too many knobs as it is anyway.
Comment 30 Caleb Cushing 2009-02-15 22:19:18 UTC
related? http://bugs.gentoo.org/show_bug.cgi?id=259104
Comment 31 SpanKY gentoo-dev 2009-02-15 22:28:31 UTC
*** Bug 259104 has been marked as a duplicate of this bug. ***
Comment 32 Caleb Cushing 2009-02-15 22:48:09 UTC
I can verify the snd* module problems. and even after the system has started reloading /etc/init.d/alsasound they still fail.
Comment 33 Greg Fitzgerald 2009-02-15 23:01:54 UTC
(In reply to comment #25)
> OpenRC uses the openpty call for logging and prettying parallel messages. My
> kernel doesn't build Legacy BSD PTY support, not even as a module.
> 

So am I to understand if you don't have BSD PTY support you shouldn'tsee these messages? Because I don't have it in any of my kernels and I'm still seeing it. Maybe I am miss understanding what you said though.
Comment 34 Roy Marples 2009-02-15 23:05:27 UTC
(In reply to comment #33)
> (In reply to comment #25)
> > OpenRC uses the openpty call for logging and prettying parallel messages. My
> > kernel doesn't build Legacy BSD PTY support, not even as a module.
> > 
> 
> So am I to understand if you don't have BSD PTY support you shouldn'tsee these
> messages? Because I don't have it in any of my kernels and I'm still seeing it.

My kernels are statically built - no modules, aside from nVidia (desktop) and ipw2200 (laptop) which need to be modules. Maybe this helps me.

Could a user with the issue please enable BSD PTY support directly in the kernel and see if this fixes the issue?
Comment 35 Greg Fitzgerald 2009-02-16 00:06:18 UTC
(In reply to comment #34)
> (In reply to comment #33)
> > (In reply to comment #25)
> > > OpenRC uses the openpty call for logging and prettying parallel messages. My
> > > kernel doesn't build Legacy BSD PTY support, not even as a module.
> > > 
> > 
> > So am I to understand if you don't have BSD PTY support you shouldn'tsee these
> > messages? Because I don't have it in any of my kernels and I'm still seeing it.
> 
> My kernels are statically built - no modules, aside from nVidia (desktop) and
> ipw2200 (laptop) which need to be modules. Maybe this helps me.
> 
> Could a user with the issue please enable BSD PTY support directly in the
> kernel and see if this fixes the issue?
> 

Enabling BSD PTY support solves the issue here.
Comment 36 Rémi Cardona (RETIRED) gentoo-dev 2009-02-16 06:50:53 UTC
On my laptop, it *almost* fixes the issue. All of the error messages are indeed gone _except_ for one, which happens right after the message that says that /sys is being mounted, and before the [ OK ].

@Roy, if there's any way to not require those PTY, that would be great. It makes configuring the kernel easier, and the doc says those are deprecated and unsafe (I have no idea why, I just usually trust what the kernel docs say)

Thanks
Comment 37 Roy Marples 2009-02-16 08:14:42 UTC
(In reply to comment #36)
> @Roy, if there's any way to not require those PTY, that would be great.

Sure. Disable logging and parallel and you no longer need those PTY's available.

> It
> makes configuring the kernel easier, and the doc says those are deprecated and
> unsafe (I have no idea why, I just usually trust what the kernel docs say)

As I said earlier, I don't see these messages. Do people with the problem have Unix 98 PTYs enabled? If so, module or in-kernel?
Comment 38 SpanKY gentoo-dev 2009-02-16 08:28:41 UTC
you cannot turn UNIX98_PTYS off with linux-2.6.28 on non-embedded systems

since no one has tested my patch, it's been added to 3.6-r1