Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 163098 - ppp0 device not created, but RC_DEVICE_TARBALL="yes"
Summary: ppp0 device not created, but RC_DEVICE_TARBALL="yes"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-21 17:59 UTC by Evgeniy Dushistov
Modified: 2007-08-31 18:29 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Evgeniy Dushistov 2007-01-21 17:59:22 UTC
I update udev to 104-r1 and reboot,
and /dev/ppp0 device disappear,
and I have 

RC_DEVICE_TARBALL="yes"
in
/etc/conf.d/rc

Reproducible: Always
Comment 1 SpanKY gentoo-dev 2007-01-21 18:08:47 UTC

*** This bug has been marked as a duplicate of bug 162866 ***
Comment 2 Evgeniy Dushistov 2007-02-03 16:29:18 UTC
After update to udev 104-r7 bug appears again.
Comment 3 Evgeniy Dushistov 2007-02-03 16:31:42 UTC
Portage 2.1.1-r2 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.4-r4, 2.6.19-gentoo-r5 i686)
=================================================================
System uname: 2.6.19-gentoo-r5 i686 AMD Athlon(tm) XP 2600+
Gentoo Base System version 1.12.6
Last Sync: Thu, 01 Feb 2007 11:30:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.3.5-r2, 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.17
sys-devel/autoconf:  2.13, 2.61
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
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -mfpmath=sse -msse -mmmx -m3dnow -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /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/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -mfpmath=sse -msse -mmmx -m3dnow -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="ru_RU.UTF-8"
LC_ALL=""
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
LINGUAS="en ru"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
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="/home/evgeniy/portage /usr/portage/local/layman/nx"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow X acl alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938 alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0 alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apache2 apm arts bash-completion berkdb bitmap-fonts cjk cli cracklib crypt cups dlloader doc dri eds elibc_glibc emacs emboss encode esd fam fbcon firefox font-server foomaticdb fortran gdbm gif gimpprint gpm gstreamer gtk gtk2 iconv imlib input_devices_keyboard input_devices_mouse isdnlog jpeg kde kdeenablefinal kdexdeltas kernel_linux lcd_devices_bayrad lcd_devices_cfontz lcd_devices_cfontz633 lcd_devices_glk lcd_devices_hd44780 lcd_devices_lb216 lcd_devices_lcdm001 lcd_devices_mtxorb lcd_devices_ncurses lcd_devices_text libg++ libwww linguas_en linguas_ru logrotate mad maildir midi mikmod mmx motif mp3 mpeg ncurses nls nptl nptlonly ogg opengl oss pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spel spell spl sse ssl tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_vesa video_cards_vga vorbis xml xorg xv zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Comment 4 Evgeniy Dushistov 2007-02-07 15:58:52 UTC
with udev-104-r9 the same picture.
Comment 5 Evgeniy Dushistov 2007-02-07 19:30:11 UTC
I add some debug hooks to udev-stop.sh
--- /usr/portage/sys-fs/udev/files/udev-stop-104-r8.sh  2007-02-04 01:42:00.000000000 +0300
+++ /lib/rcscripts/addons/udev-stop.sh  2007-02-07 21:58:28.688518422 +0300
@@ -89,6 +89,7 @@
                        cd /lib/udev/devices
                        find . -xdev -type b -or -type c -or -type l | cut -d/ -f2- >> "${devices_udev
}"
                fi
+               cp "${devices_udev}" /tmp/devices_udev
                cd /dev
                fgrep -x -v -f "${devices_udev}" < "${devices_real}" | \
                  grep -v ^\\.udev > "${devices_totar}"
@@ -102,6 +103,7 @@
                else
                        rm -f /lib/udev/state/devices.tar.bz2
                fi
+               cp "${devices_totar}" /tmp/devices_totar
                eend 0
        fi
--------------------------
And here I get:
$grep ppp /tmp/devices_udev 
ppp
$grep ppp /tmp/devices_totar
$

so udev or udev-stop.sh think that devices created by udev,
but I completly sure that it is me, who enter
mknod /dev/ppp c 108 0
Comment 6 Matthias Schwarzott gentoo-dev 2007-07-10 21:01:12 UTC
I gonna add this rule to udev-113-r1, but that will not solve this problem. It just will prevent the device from disappearing after rmmod ppp_generic.
KERNEL=="ppp",          MODE="0600", OPTIONS+="ignore_remove"

How do you use /dev/ppp? By using some baselayout net-scripts like net.ppp0? Or by yourself calling pppd.
In later case I suggest adding correct ppp module to modules.autoload.d, or adding modprobe into the script calling pppd.
Comment 7 Evgeniy Dushistov 2007-07-11 17:37:01 UTC
(In reply to comment #6)
> I gonna add this rule to udev-113-r1, but that will not solve this problem. It
> just will prevent the device from disappearing after rmmod ppp_generic.
> KERNEL=="ppp",          MODE="0600", OPTIONS+="ignore_remove"
> 
> How do you use /dev/ppp? 

I use wvdial to work with modem and pptp to start VPN over ethernet.
Adding ppp_generic to autoload looks like help, and it is more clean solution 
than my adding call of mknod to start scripts.

But so if I create device inode using mknod, udev can in every moment just delete it?

>By using some baselayout net-scripts like net.ppp0? Or
> by yourself calling pppd.
> In later case I suggest adding correct ppp module to modules.autoload.d, or
> adding modprobe into the script calling pppd.
> 

Comment 8 Matthias Schwarzott gentoo-dev 2007-08-05 18:18:23 UTC
debian's udev start script does create this at boot? should we also do this?
Comment 9 Roy Marples (RETIRED) gentoo-dev 2007-08-06 11:38:31 UTC
So why can't wvdial load the modules itself if /dev/ppp0 is not present?
Comment 10 Alin Năstac (RETIRED) gentoo-dev 2007-08-06 12:21:36 UTC
Correction: there is no such device /dev/ppp0. The only related device is /dev/ppp.

The device can be created by loading ppp_generic module, which IMO should be done by pppd. Questions are:
  a) Does anyone have objections about that?
  b) What command line do you think is more appropriate, "modprobe -q ppp_generic" or "modprobe -q /dev/ppp" ?
Comment 11 Evgeniy Dushistov 2007-08-07 18:17:57 UTC
wvdial is just establish connection, and when all done,
call pppd,

pppd if /dev/ppp not present, say:

Feb 25 11:24:50 rain pppd[17182]: pppd is unable to open the /dev/ppp device. You need to create the /dev/ppp device node by executing the following command as root:         mknod /dev/ppp c 108 0

and exit
Comment 12 Alin Năstac (RETIRED) gentoo-dev 2007-08-07 20:32:54 UTC
net-dialup/ppp-2.4.4-r10 solves this issue through dev-ppp patch.

Feel free to close this bug.
Comment 13 giovanni.bobbio 2007-08-08 13:06:39 UTC
(In reply to comment #12)
> net-dialup/ppp-2.4.4-r10 solves this issue through dev-ppp patch.
> 
> Feel free to close this bug.

In my setup ppp-2.4.4-r10 does NOT load ppp_generic before trying to access /dev/ppp, so I still incur the error. 

I'm using kppp, by the way.
Comment 14 Alin Năstac (RETIRED) gentoo-dev 2007-08-08 13:28:02 UTC
(In reply to comment #13)

This doesn't help me much. See if:
  a) you have ppp_generic kernel module
  b) /dev/ppp gets created by udev when you run modprobe ppp_generic. Be sure it isn't already loaded (lsmod | grep ppp_generic) before running the aforementioned command.

Comment 15 giovanni.bobbio 2007-08-08 13:32:57 UTC
(In reply to comment #14)
> (In reply to comment #13)
> 
> This doesn't help me much. See if:
>   a) you have ppp_generic kernel module
>   b) /dev/ppp gets created by udev when you run modprobe ppp_generic. Be sure
> it isn't already loaded (lsmod | grep ppp_generic) before running the
> aforementioned command.

Yes and yes. Will gladly help if you need anymore info. 
Comment 16 Alin Năstac (RETIRED) gentoo-dev 2007-08-08 13:57:40 UTC
Ups... seems modprobe ends before creation of the ppp device, which results in pppd's failure when executed for the first time.

Udev peeps, please advise. Should I run "modprobe -q ppp_generic" then sleep for 1 second if /dev/ppp don't exist? 
Comment 17 Matthias Schwarzott gentoo-dev 2007-08-08 14:54:20 UTC
The second, even more ugly possibility is: mknod /dev/ppp when it is needed, it will then trigger kernel to do modprobe when opened.
Comment 18 Alin Năstac (RETIRED) gentoo-dev 2007-08-08 15:21:23 UTC
The source already contains something like that, but is excluded from compilation by a #if 0:

    fd = open("/dev/ppp", O_RDWR);
#if 0
    if (fd < 0 && errno == ENOENT) {
        /* try making it and see if that helps. */
        if (mknod("/dev/ppp", S_IFCHR | S_IRUSR | S_IWUSR,
                  makedev(108, 0)) >= 0) {
            fd = open("/dev/ppp", O_RDWR);
            if (fd >= 0)
                info("Created /dev/ppp device node");
            else
                unlink("/dev/ppp");     /* didn't work, undo the mknod */
        } else if (errno == EEXIST) {
            fd = open("/dev/ppp", O_RDWR);
        }
    }
#endif /* 0 */

I could simply remove the #if 0 and add S_IRGRP | S_IWGRP to the permissions mask.
Comment 19 Alin Năstac (RETIRED) gentoo-dev 2007-08-17 08:05:38 UTC
Fixed in ppp-2.4.4-r11 by using the solution presented in comment 18.