public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* devfs -> udev transition: vcsN are not created
@ 2004-08-25 12:17 Denis Vlasenko
  2004-08-25 19:43 ` Greg KH
  2004-08-27  9:48 ` Denis Vlasenko
  0 siblings, 2 replies; 6+ messages in thread
From: Denis Vlasenko @ 2004-08-25 12:17 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 4475 bytes --]

I am migrating my 2.6 systems from devfs to udev.
Versions:

# uname -a
Linux firebird 2.6.7-bk20 #6 Mon Jul 12 01:23:31 EEST 2004 i686 unknown
# ls -d udev* hotplug*
hotplug-2004_04_01  udev-030

In early boot, when root fs is readonly yet, I start udev this way:

mount -t ramfs none /dev
env - udevd & sleep 1
udevstart

and then continue as normal. Things mostly work.
However, I noticed that vcsN device nodes are missing
(I tried to start Midnight Commander and it failed).
This can be due to the fact that I start agettys very
late in boot sequence, and thus all ttyN's were not
open at the time of udevstart, only first one was (tty1).

I logged in and did:

# ls -l /udev >before
# strace -o us.log udevstart
# ls -l /udev >after
# diff -u before after >diff

This worked, vcsN's appeared:

--- before      Wed Aug 25 14:52:42 2004
+++ after       Wed Aug 25 14:53:10 2004
@@ -1,4 +1,6 @@
 total 0
+crw-------    1 root     root      10, 175 Aug 25 14:53 agpgart
+lrwxrwxrwx    1 root     root            3 Aug 25 14:53 cdrom -> hdb
 crw-------    1 root     root       5,   1 Aug 25  2004 console
 brw-------    1 root     root       2,   0 Aug 25  2004 fd0
 crw-------    1 root     root       1,   7 Aug 25  2004 full
@@ -10,6 +12,7 @@
 brw-------    1 root     root       3,   4 Aug 25  2004 hda4
 brw-------    1 root     root       3,  64 Aug 25  2004 hdb
 crw-------    1 root     root      10, 183 Aug 25  2004 hw_random
+drwxr-xr-x    2 root     root            0 Aug 25 14:53 input
 crw-------    1 root     root       1,   2 Aug 25  2004 kmem
 crw-------    1 root     root       1,  11 Aug 25  2004 kmsg
 srw-rw-rw-    1 root     root            0 Aug 25 14:52 log
@@ -52,7 +55,7 @@
 crw-------    1 root     root       4,   1 Aug 25  2004 tty1
 crw-------    1 root     root       4,  10 Aug 25  2004 tty10
 crw-------    1 root     root       4,  11 Aug 25 14:52 tty11
-crw-------    1 root     root       4,  12 Aug 25 14:52 tty12
+crw-------    1 root     root       4,  12 Aug 25 14:53 tty12
 crw-------    1 root     root       4,  13 Aug 25  2004 tty13
 crw-------    1 root     root       4,  14 Aug 25  2004 tty14
 crw-------    1 root     root       4,  15 Aug 25  2004 tty15
@@ -60,7 +63,7 @@
 crw-------    1 root     root       4,  17 Aug 25  2004 tty17
 crw-------    1 root     root       4,  18 Aug 25  2004 tty18
 crw-------    1 root     root       4,  19 Aug 25  2004 tty19
-crw--w----    1 root     tty        4,   2 Aug 25 14:52 tty2
+crw-------    1 root     tty        4,   2 Aug 25 14:53 tty2
 crw-------    1 root     root       4,  20 Aug 25  2004 tty20
 crw-------    1 root     root       4,  21 Aug 25  2004 tty21
 crw-------    1 root     root       4,  22 Aug 25  2004 tty22
@@ -163,6 +166,24 @@
 crw-------    1 root     root       1,   9 Aug 25  2004 urandom
 crw-------    1 root     root       7,   0 Aug 25  2004 vcs
 crw-------    1 root     root       7,   1 Aug 25  2004 vcs1
+crw-------    1 root     root       7,  11 Aug 25 14:53 vcs11
+crw-------    1 root     root       7,  12 Aug 25 14:53 vcs12
+crw-------    1 root     root       7,   2 Aug 25 14:53 vcs2
+crw-------    1 root     root       7,   3 Aug 25 14:53 vcs3
+crw-------    1 root     root       7,   4 Aug 25 14:53 vcs4
+crw-------    1 root     root       7,   5 Aug 25 14:53 vcs5
+crw-------    1 root     root       7,   6 Aug 25 14:53 vcs6
+crw-------    1 root     root       7,   7 Aug 25 14:53 vcs7
+crw-------    1 root     root       7,   8 Aug 25 14:53 vcs8
 crw-------    1 root     root       7, 128 Aug 25  2004 vcsa
 crw-------    1 root     root       7, 129 Aug 25  2004 vcsa1
+crw-------    1 root     root       7, 139 Aug 25 14:53 vcsa11
+crw-------    1 root     root       7, 140 Aug 25 14:53 vcsa12
+crw-------    1 root     root       7, 130 Aug 25 14:53 vcsa2
+crw-------    1 root     root       7, 131 Aug 25 14:53 vcsa3
+crw-------    1 root     root       7, 132 Aug 25 14:53 vcsa4
+crw-------    1 root     root       7, 133 Aug 25 14:53 vcsa5
+crw-------    1 root     root       7, 134 Aug 25 14:53 vcsa6
+crw-------    1 root     root       7, 135 Aug 25 14:53 vcsa7
+crw-------    1 root     root       7, 136 Aug 25 14:53 vcsa8
 crw-------    1 root     root       1,   5 Aug 25  2004 zero

Strace and syslog are in attached tarball.

PS. Also mouse doesn't paste in console, but let's handle
it one at a time.
--
vda

[-- Attachment #2: info.tar.bz2 --]
[-- Type: application/x-tbz, Size: 12908 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: devfs -> udev transition: vcsN are not created
  2004-08-25 12:17 devfs -> udev transition: vcsN are not created Denis Vlasenko
@ 2004-08-25 19:43 ` Greg KH
  2004-08-25 20:06   ` Denis Vlasenko
  2004-08-27  9:48 ` Denis Vlasenko
  1 sibling, 1 reply; 6+ messages in thread
From: Greg KH @ 2004-08-25 19:43 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: linux-kernel

On Wed, Aug 25, 2004 at 03:17:31PM +0300, Denis Vlasenko wrote:
> I am migrating my 2.6 systems from devfs to udev.
> Versions:
> 
> # uname -a
> Linux firebird 2.6.7-bk20 #6 Mon Jul 12 01:23:31 EEST 2004 i686 unknown

Can you try the latest -mm tree?  It should have this fixed.  I'll be
sending the patch that does this off to Linus later today.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: devfs -> udev transition: vcsN are not created
  2004-08-25 19:43 ` Greg KH
@ 2004-08-25 20:06   ` Denis Vlasenko
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Vlasenko @ 2004-08-25 20:06 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

On Wednesday 25 August 2004 22:43, Greg KH wrote:
> On Wed, Aug 25, 2004 at 03:17:31PM +0300, Denis Vlasenko wrote:
> > I am migrating my 2.6 systems from devfs to udev.
> > Versions:
> >
> > # uname -a
> > Linux firebird 2.6.7-bk20 #6 Mon Jul 12 01:23:31 EEST 2004 i686 unknown
>
> Can you try the latest -mm tree?  It should have this fixed.  I'll be
> sending the patch that does this off to Linus later today.

Hopefully tomorrow.
--
vda


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: devfs -> udev transition: vcsN are not created
  2004-08-25 12:17 devfs -> udev transition: vcsN are not created Denis Vlasenko
  2004-08-25 19:43 ` Greg KH
@ 2004-08-27  9:48 ` Denis Vlasenko
  2004-08-27 10:46   ` Denis Vlasenko
  2004-09-05  8:02   ` Greg KH
  1 sibling, 2 replies; 6+ messages in thread
From: Denis Vlasenko @ 2004-08-27  9:48 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

Hi Greg,

On Wednesday 25 August 2004 15:17, Denis Vlasenko wrote:
> I am migrating my 2.6 systems from devfs to udev.
> Versions:
>
> # uname -a
> Linux firebird 2.6.7-bk20 #6 Mon Jul 12 01:23:31 EEST 2004 i686 unknown
> # ls -d udev* hotplug*
> hotplug-2004_04_01  udev-030
>
> In early boot, when root fs is readonly yet, I start udev this way:
>
> mount -t ramfs none /dev
> env - udevd & sleep 1
> udevstart
>
> and then continue as normal. Things mostly work.
> However, I noticed that vcsN device nodes are missing
> (I tried to start Midnight Commander and it failed).
> This can be due to the fact that I start agettys very
> late in boot sequence, and thus all ttyN's were not
> open at the time of udevstart, only first one was (tty1).
>
> I logged in and did:
>
> # ls -l /udev >before
> # strace -o us.log udevstart
> # ls -l /udev >after
> # diff -u before after >diff
>
> This worked, vcsN's appeared:
[snip]

As you suggested, I tried 2.6.9-rc1-mm1. Sorry. It does not work.

My hotplug is instrumented a bit
to log invocations to syslog. I did 'cat >/dev/tty13':

hotplug[1196]: cmd: /sbin/hotplug vc
hotplug[1196]: env: DEVPATH=/class/vc/vcs13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
ACTION=add PWD=/ SHLVL=1 HOME=/ SEQNUM=232 _=/sbin/env
hotplug[1198]: cmd: /sbin/hotplug vc
hotplug[1198]: env: DEVPATH=/class/vc/vcsa13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
ACTION=add PWD=/ SHLVL=1 HOME=/ SEQNUM=233 _=/sbin/env
hotplug[1198]: run: /etc/hotplug.d/default/default.hotplug vc
hotplug[1196]: run: /etc/hotplug.d/default/default.hotplug vc
hotplug[1196]: run: /etc/hotplug.d/default/udev.hotplug vc
hotplug[1198]: run: /etc/hotplug.d/default/udev.hotplug vc

	/dev/vcs[a]13 did NOT appear.
	I waited ~15 secs and ^C'ed cat:

hotplug[1233]: cmd: /sbin/hotplug vc
hotplug[1233]: env: DEVPATH=/class/vc/vcs13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
ACTION=remove PWD=/ SHLVL=1 HOME=/ SEQNUM=234 _=/sbin/env
hotplug[1235]: cmd: /sbin/hotplug vc
hotplug[1235]: env: DEVPATH=/class/vc/vcsa13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
ACTION=remove PWD=/ SHLVL=1 HOME=/ SEQNUM=235 _=/sbin/env
hotplug[1233]: run: /etc/hotplug.d/default/default.hotplug vc
hotplug[1235]: run: /etc/hotplug.d/default/default.hotplug vc
hotplug[1235]: run: /etc/hotplug.d/default/udev.hotplug vc
hotplug[1233]: run: /etc/hotplug.d/default/udev.hotplug vc

I verified that I do run udevsend:

# ls -l /etc/hotplug.d/default/udev.hotplug
lrwxrwxrwx    1 root     root           48 Aug 25 10:53 /etc/hotplug.d/default/udev.hotplug -> /app/udev-030/etc/hotplug.d/default/udev.hotplug

# ls -l /app/udev-030/etc/hotplug.d/default/udev.hotplug
lrwxrwxrwx    1 root     root           14 Jul 27 15:35 /app/udev-030/etc/hotplug.d/default/udev.hotplug -> /sbin/udevsend

# ls -l /sbin/udevsend
lrwxrwxrwx    1 root     root           27 Aug 25 10:53 /sbin/udevsend -> /app/udev-030/sbin/udevsend

# ls -l /app/udev-030/sbin/udevsend
-rwxr-xr-x    1 root     root         6696 Aug 25 10:53 /app/udev-030/sbin/udevsend

Symlink forest may look strange to you, but actually works.

I replaced /app/udev-030/sbin/udevsend with sh script doing
'echo "I AM HERE" | logger' and I do see it in syslog.
I conclude udevsend is being run, but doesn't do it's magic.
--
vda

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: devfs -> udev transition: vcsN are not created
  2004-08-27  9:48 ` Denis Vlasenko
@ 2004-08-27 10:46   ` Denis Vlasenko
  2004-09-05  8:02   ` Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Denis Vlasenko @ 2004-08-27 10:46 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

> As you suggested, I tried 2.6.9-rc1-mm1. Sorry. It does not work.
>
> My hotplug is instrumented a bit
> to log invocations to syslog. I did 'cat >/dev/tty13':
>
> hotplug[1196]: cmd: /sbin/hotplug vc
> hotplug[1196]: env: DEVPATH=/class/vc/vcs13
> PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PWD=/ SHLVL=1 HOME=/
> SEQNUM=232 _=/sbin/env
> hotplug[1198]: cmd: /sbin/hotplug vc
> hotplug[1198]: env: DEVPATH=/class/vc/vcsa13
> PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=add PWD=/ SHLVL=1 HOME=/
> SEQNUM=233 _=/sbin/env
> hotplug[1198]: run: /etc/hotplug.d/default/default.hotplug vc
> hotplug[1196]: run: /etc/hotplug.d/default/default.hotplug vc
> hotplug[1196]: run: /etc/hotplug.d/default/udev.hotplug vc
> hotplug[1198]: run: /etc/hotplug.d/default/udev.hotplug vc
>
> 	/dev/vcs[a]13 did NOT appear.
> 	I waited ~15 secs and ^C'ed cat:
>
> hotplug[1233]: cmd: /sbin/hotplug vc
> hotplug[1233]: env: DEVPATH=/class/vc/vcs13
> PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove PWD=/ SHLVL=1 HOME=/
> SEQNUM=234 _=/sbin/env
> hotplug[1235]: cmd: /sbin/hotplug vc
> hotplug[1235]: env: DEVPATH=/class/vc/vcsa13
> PATH=/sbin:/bin:/usr/sbin:/usr/bin ACTION=remove PWD=/ SHLVL=1 HOME=/
> SEQNUM=235 _=/sbin/env
> hotplug[1233]: run: /etc/hotplug.d/default/default.hotplug vc
> hotplug[1235]: run: /etc/hotplug.d/default/default.hotplug vc
> hotplug[1235]: run: /etc/hotplug.d/default/udev.hotplug vc
> hotplug[1233]: run: /etc/hotplug.d/default/udev.hotplug vc
>
> I verified that I do run udevsend:
>
> # ls -l /etc/hotplug.d/default/udev.hotplug
> lrwxrwxrwx    1 root     root           48 Aug 25 10:53
> /etc/hotplug.d/default/udev.hotplug ->
> /app/udev-030/etc/hotplug.d/default/udev.hotplug
>
> # ls -l /app/udev-030/etc/hotplug.d/default/udev.hotplug
> lrwxrwxrwx    1 root     root           14 Jul 27 15:35
> /app/udev-030/etc/hotplug.d/default/udev.hotplug -> /sbin/udevsend
>
> # ls -l /sbin/udevsend
> lrwxrwxrwx    1 root     root           27 Aug 25 10:53 /sbin/udevsend ->
> /app/udev-030/sbin/udevsend
>
> # ls -l /app/udev-030/sbin/udevsend
> -rwxr-xr-x    1 root     root         6696 Aug 25 10:53
> /app/udev-030/sbin/udevsend
>
> Symlink forest may look strange to you, but actually works.
>
> I replaced /app/udev-030/sbin/udevsend with sh script doing
> 'echo "I AM HERE" | logger' and I do see it in syslog.
> I conclude udevsend is being run, but doesn't do it's magic.


I straced udevsend invocation by

#!/bin/sh
exec </dev/null
exec >/dev/null
exec 2>/dev/null
strace -o /tmp/udevsend-$$ /app/udev-030/sbin/udevsend "$@"

It looks very strange:

execve("/app/udev-030/sbin/udevsend", ["/app/udev-030/sbin/udevsend", "vc"], [/* 8 vars */]) = 0
uname({sys="Linux", node="firebird", ...}) = 0
brk(0)                                  = 0x804b000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 0
fstat64(0, {st_mode=S_IFREG|0644, st_size=48875, ...}) = 0
mmap2(NULL, 48875, PROT_READ, MAP_PRIVATE, 0, 0) = 0xb7fe2000
close(0)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 0
read(0, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\\\1"..., 1024) = 1024
fstat64(0, {st_mode=S_IFREG|0755, st_size=29126107, ...}) = 0
mmap2(NULL, 1168804, PROT_READ|PROT_EXEC, MAP_PRIVATE, 0, 0) = 0xb7ec4000
mprotect(0xb7fda000, 30116, PROT_NONE)  = 0
mmap2(0xb7fda000, 20480, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 0, 0x116) = 0xb7fda000
mmap2(0xb7fdf000, 9636, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fdf000
close(0)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7ec3000
munmap(0xb7fe2000, 48875)               = 0
getpid()                                = 13020
socket(PF_UNIX, SOCK_DGRAM, 0)          = 0
sendto(0, "udevd_030\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 356, 0, {sin_family=AF_UNIX, path=@udevd}, 8) = 356
close(0)                                = 0
semget(IPC_PRIVATE, 3086872064, 0

This is all. No segfault. 
I am puzzled 8|
-- 
vda

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: devfs -> udev transition: vcsN are not created
  2004-08-27  9:48 ` Denis Vlasenko
  2004-08-27 10:46   ` Denis Vlasenko
@ 2004-09-05  8:02   ` Greg KH
  1 sibling, 0 replies; 6+ messages in thread
From: Greg KH @ 2004-09-05  8:02 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: linux-kernel

On Fri, Aug 27, 2004 at 12:48:59PM +0300, Denis Vlasenko wrote:
> Hi Greg,
> 
> On Wednesday 25 August 2004 15:17, Denis Vlasenko wrote:
> > I am migrating my 2.6 systems from devfs to udev.
> > Versions:
> >
> > # uname -a
> > Linux firebird 2.6.7-bk20 #6 Mon Jul 12 01:23:31 EEST 2004 i686 unknown
> > # ls -d udev* hotplug*
> > hotplug-2004_04_01  udev-030
> >
> > In early boot, when root fs is readonly yet, I start udev this way:
> >
> > mount -t ramfs none /dev
> > env - udevd & sleep 1
> > udevstart
> >
> > and then continue as normal. Things mostly work.
> > However, I noticed that vcsN device nodes are missing
> > (I tried to start Midnight Commander and it failed).
> > This can be due to the fact that I start agettys very
> > late in boot sequence, and thus all ttyN's were not
> > open at the time of udevstart, only first one was (tty1).
> >
> > I logged in and did:
> >
> > # ls -l /udev >before
> > # strace -o us.log udevstart
> > # ls -l /udev >after
> > # diff -u before after >diff
> >
> > This worked, vcsN's appeared:
> [snip]
> 
> As you suggested, I tried 2.6.9-rc1-mm1. Sorry. It does not work.
> 
> My hotplug is instrumented a bit
> to log invocations to syslog. I did 'cat >/dev/tty13':
> 
> hotplug[1196]: cmd: /sbin/hotplug vc
> hotplug[1196]: env: DEVPATH=/class/vc/vcs13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
> ACTION=add PWD=/ SHLVL=1 HOME=/ SEQNUM=232 _=/sbin/env
> hotplug[1198]: cmd: /sbin/hotplug vc
> hotplug[1198]: env: DEVPATH=/class/vc/vcsa13 PATH=/sbin:/bin:/usr/sbin:/usr/bin
> ACTION=add PWD=/ SHLVL=1 HOME=/ SEQNUM=233 _=/sbin/env
> hotplug[1198]: run: /etc/hotplug.d/default/default.hotplug vc
> hotplug[1196]: run: /etc/hotplug.d/default/default.hotplug vc
> hotplug[1196]: run: /etc/hotplug.d/default/udev.hotplug vc
> hotplug[1198]: run: /etc/hotplug.d/default/udev.hotplug vc
> 
> 	/dev/vcs[a]13 did NOT appear.
> 	I waited ~15 secs and ^C'ed cat:

Hm, this works for me.

What does /sys/class/vc/ contain?  Any "vcs" files there?  If not,
that's the issue.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-06  3:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-25 12:17 devfs -> udev transition: vcsN are not created Denis Vlasenko
2004-08-25 19:43 ` Greg KH
2004-08-25 20:06   ` Denis Vlasenko
2004-08-27  9:48 ` Denis Vlasenko
2004-08-27 10:46   ` Denis Vlasenko
2004-09-05  8:02   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox