Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 183555 - sys-fs/udev - ttySx enumeration problem
Summary: sys-fs/udev - ttySx enumeration problem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: udev maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-28 16:54 UTC by Leonid Podolny
Modified: 2007-07-30 11:19 UTC (History)
0 users

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 Leonid Podolny 2007-06-28 16:54:51 UTC
I'm unable to start NUT, and I have tracked the problem down to this issue.

I have two serial ports on my box. Naturally, I would expect them to be
ttyS0 and ttyS1. Indeed, dmesg shows the following:

[snip]
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing disabled
pnp: Device 00:06 activated.
00:06: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
pnp: Device 00:07 activated.
00:07: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[snip]

However, the actual nodes that udev (or hotplug?) creates are:

[snip]
vyhuhol ~ # ls -l /dev/ttyS*
crw-rw---- 1 root uucp 4, 66 2007-06-26 09:04 /dev/ttyS2
crw-rw---- 1 root uucp 4, 67 2007-06-26 09:04 /dev/ttyS3
[snip]

Needless to say, I'm unable to communicate with the port unless I
manually mknod ttyS0 with minor 64.
The question is: how do I make hotplug (or udev?) enumerate them
correctly, as ttyS0 and ttyS1?

Reproducible: Always

Steps to Reproduce:
Comment 1 Leonid Podolny 2007-06-28 16:55:57 UTC
Portage 2.1.3_rc5 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r3, 2.6.21-gentoo-r3 i686)
=================================================================
System uname: 2.6.21-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Mon, 25 Jun 2007 10:50:01 +0000
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
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.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -O2 -pipe "
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/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -O2 -pipe "
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://pandemonium.tiscali.de/pub/gentoo/ http://gentoo.intergenia.de http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="en us en_GB ru he uk"
MAKEOPTS="-j3"
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 --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac aalib accessibility acpi aim alsa amd aoss apache2 apm arts asf automount bash-completion berkdb bidi bitmap-fonts bittorrent bonobo bzip2 c++ cairo cap cdb cddb cdparanoia cdr cdrom cgi chardet chm chroot clamav clamd clearpasswd cmucl cobalt cpudetection cracklib crypt cscope css ctype cups curl cvs cvsgraph dba dbase dbus dbx delays devmap dhcp dict dio directfb djvu dnd dpms dri dts dv dvb dvd dvdr dvdread dvi eb emacs emacs-w3 enca encode escreen ethereal exif expat extensions extrafilters fat fbcon fbdev fbsplash fep ffmpeg fftw firefox flac font-server fontconfig foomaticdb fortran fpx freetext ftp fuse gcj gd gg gif gimp gimpprint glade glib glibc-omitfp glut glx gmail gmailtimestamps gphoto2 gpm gprof gsnd gtk gtk2 gtkhtml guile hal haskell hfs high-ints hpn i8x0 icc iconv icq id3 idea idn ieee1394 imagemagick imap imlib imlib2 immqt irc irda jabber java javamail javascript jfs jpeg jpeg2k junit justify kde kdeenablefinal kdexdeltas kipi lame largeterminal latex lcd lcms leim libcaca libclamav libwww lj logitech-mouse logrotate lzo mad maps mbox mcal mikmod mjpeg mmap mmx mod_irc mod_muc mod_pubsub mod_python modelock modperl modplug mono motif mozcalendar moznoxft mozsvg mozxmlterm mp2 mp3 mpeg mplayer mpm-prefork msn mule multi-tty multiuser music mysql mysqli mythtv mzscheme nagios-dns nautilus ncurses need netboot network new-login nls nntp no-old-linux nptl nptlonly nsplugin ntfs ocaml offensive ogg oggvorbis opengl openssh openssl oscar oss pam parse-clocks pcap pcre pdf perl php plotutils pmu png posix postfix ppds print procmail python qt3 qt4 quicktime quotas rar rdesktop readline real reiserfs rss rtc ruby samba sblive screen sdl serial server session sharedmem slang smime snmp soap sockets socks5 sound sounds spell srt sse sse2 ssl stroke subversion svg swat sysfs syslog sysvipc tcl tcltk tcpd tetex theora threads tidy tiff tk tools transcode truetype truetype-fonts type1 type1-fonts unicode unzip ups urandom usb user-homedirs utempter v4l v4l2 vcd vcdimager vfat vim vim-pager vim-syntax vim-with-x visualization vnc vorbis web webdav win32codecs winbind wma wmf wxwindows x86 xanim xemacs xface xfs xgetdefault xine xinetd xml xmlrpc xorg xpm xprint xscreensaver xsl xslt xv xvid xvmc yahoo zlib" ALSA_CARDS="emu10k1" ELIBC="glibc" INPUT_DEVICES="keyboard mouse vmmouse" KERNEL="linux" LINGUAS="en us en_GB ru he uk" USERLAND="GNU" VIDEO_CARDS="i810 vesa fbdev vga v4l vmware"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-06-28 18:16:52 UTC
Well please move /etc/udev somewhere away, re-emerge udev and see if you still have the problem. You also didn't post udev version at all.
Comment 3 Leonid Podolny 2007-06-28 18:26:15 UTC
(In reply to comment #2)
> Well please move /etc/udev somewhere away, re-emerge udev and see if you still
> have the problem. You also didn't post udev version at all.
> 

Just tried it, the problem persists. Both with udev-112-r1 and (new) udev-113.
Comment 4 Matthias Schwarzott gentoo-dev 2007-06-29 09:20:58 UTC
Well, I get /dev/ttyS[0-3], and udev creates this based on the existance of:

/sys/class/tty/ttyS[0-3]/

Do these directories under /sys exist for you. If not you need to search elsewhere for the cause of the error.
Either in the kernel/driver, or in the serial port config (setserial and related).
Comment 5 Leonid Podolny 2007-06-29 10:59:47 UTC
(In reply to comment #4)
> Well, I get /dev/ttyS[0-3], and udev creates this based on the existance of:
> 
> /sys/class/tty/ttyS[0-3]/
> 
> Do these directories under /sys exist for you. If not you need to search
> elsewhere for the cause of the error.

I have all four of them. 
Comment 6 Matthias Schwarzott gentoo-dev 2007-07-29 12:29:19 UTC
Perhaps it helps to attach output of
udevinfo -a -p /sys/class/tty/ttyS0
Comment 7 Leonid Podolny 2007-07-29 18:08:01 UTC
(In reply to comment #6)
> Perhaps it helps to attach output of
> udevinfo -a -p /sys/class/tty/ttyS0
> 

leonid@vyhuhol ~ $ udevinfo -a -p /sys/class/tty/ttyS0

Udevinfo starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

  looking at device '/devices/pnp0/00:06/tty/ttyS0':
    KERNEL=="ttyS0"
    SUBSYSTEM=="tty"
    DRIVER==""
    ATTR{dev}=="4:64"

  looking at parent device '/devices/pnp0/00:06/tty':
    KERNELS=="tty"
    SUBSYSTEMS==""
    DRIVERS==""

  looking at parent device '/devices/pnp0/00:06':
    KERNELS=="00:06"
    SUBSYSTEMS=="pnp"
    DRIVERS=="serial"
    ATTRS{id}=="PNP0501"
    ATTRS{uevent}=="DRIVER=serial"

  looking at parent device '/devices/pnp0':
    KERNELS=="pnp0"
    SUBSYSTEMS==""
    DRIVERS==""
    ATTRS{uevent}==""

Comment 8 Leonid Podolny 2007-07-29 18:12:19 UTC
(In reply to comment #6)
> Perhaps it helps to attach output of
> udevinfo -a -p /sys/class/tty/ttyS0
> 

The problem somehow solved itself in the meantime. Are we interested in reproducing it? Should I downgrade the kernel and udev in order to continue debugging it?
Comment 9 Matthias Schwarzott gentoo-dev 2007-07-30 11:19:15 UTC
Well, as this is solved in meantime I think digging is only useful if you/somone has enough fun/spare time to do it.
But I say: lets close it
Reopen if this comes back