From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andreas Jellinghaus [c]" Date: Thu, 15 Mar 2007 10:46:48 +0000 Subject: udev or kernel broken with rsdl 0.30 patch [u] Message-Id: <20070315104654.19025CA4097@mx1.ciphirelabs.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org the rsdl patch only changes the scheduler, so I really wonder why udev/kernel emit less events when the kernel is patched with it. maybe a race condition or other bug in this area only exposed by the rsdl 0.30 patch? here is my analysis so far: udev events on 2.6.20.2 (without rsdl): ( "$ACTION - $DEVICE - $DEVNAME - $PRODUCT - $$ - $PPID") add - /proc/bus/usb/002/016 - - 8e6/3438/100 - 6071 - 6065 add - - /dev/usbdev2.16_ep02 - - 6116 - 6113 add - - /dev/usbdev2.16_ep82 - - 6118 - 6114 add - - /dev/usbdev2.16_ep81 - - 6120 - 6115 udev events on 2.6.20.2 (with rsdl):=20 ( "$ACTION - $DEVICE - $DEVNAME - $PRODUCT - $$ - $PPID") add - - /dev/usbdev2.8_ep02 - - 5287 - 5286 add - - /dev/usbdev2.8_ep82 - - 5290 - 5288 add - - /dev/usbdev2.8_ep81 - - 5291 - 5289 the /proc event is missing. in both cases /proc/ was mounted. syslog with udev on debugging (only the /proc event from the kernel w/o rsdl): Mar 15 11:19:06 localhost udevd[2622]: udev_event_run: seq 2869 forked, pid [6065], 'add' 'usb', 0 seconds old Mar 15 11:19:06 localhost udevd-event[6065]: wait_for_sysfs: file '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.5/2-1.5:1.0/bus' appeared after 0 loops Mar 15 11:19:06 localhost udevd-event[6065]: run_program: '/lib/udev/openct_usb' Mar 15 11:19:07 localhost udevd-event[6065]: run_program: '/lib/udev/openct_usb' returned with status 0 Mar 15 11:19:07 localhost udevd-event[6065]: pass_env_to_socket: passed 338 bytes to socket '/org/freedesktop/hal/udev_event',=20 Mar 15 11:19:07 localhost udevd-event[6065]: run_program: '/sbin/modprobe -Q usb:v08E6p3438d0100dc00dsc00dp00ic0Bisc00ip00' Mar 15 11:19:07 localhost udevd-event[6065]: run_program: '/sbin/modprobe' returned with status 1 Mar 15 11:19:07 localhost udevd-event[6065]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',=20 Mar 15 11:19:07 localhost udevd-event[6065]: udev_event_run: seq 2869 finished Mar 15 11:19:07 localhost udevd[2622]: udev_done: seq 2869, pid [6065] exit with 1, 1 seconds old there is something similar in syslog (on the rsdl kernel): Mar 15 11:24:32 localhost udevd[2607]: udev_event_run: seq 2717 forked, pid [5284], 'add' 'usb', 0 seconds old Mar 15 11:24:32 localhost udevd-event[5284]: wait_for_sysfs: file '/sys/devices/pci0000:00/0000:00:1d.1/usb2/2-1/2-1.5/2-1.5:1.0/bus' appeared after 0 loops Mar 15 11:24:32 localhost udevd-event[5284]: pass_env_to_socket: passed 338 bytes to socket '/org/freedesktop/hal/udev_event',=20 Mar 15 11:24:32 localhost udevd-event[5284]: run_program: '/sbin/modprobe -Q usb:v08E6p3438d0100dc00dsc00dp00ic0Bisc00ip00' Mar 15 11:24:32 localhost udevd-event[5284]: run_program: '/sbin/modprobe' returned with status 1 Mar 15 11:24:32 localhost udevd-event[5284]: pass_env_to_socket: passed -1 bytes to socket '/org/kernel/udev/monitor',=20 Mar 15 11:24:32 localhost udevd-event[5284]: udev_event_run: seq 2717 finished Mar 15 11:24:32 localhost udevd[2607]: udev_done: seq 2717, pid [5284] exit with 1, 0 seconds old the machine and the usb device are 100% the same, except that the first kernel is 2.6.20.2 plain and the second was patched with rsdl 0.30. the machine is a thinkpad t40 running ubuntu edgy (093-0ubuntu18.0edgy2). the config was unchanged. the hardware is a usb smart card reader. also maybe someone knows: what happened to the /dev/bus/usb events? for a while I got two events from udev (guess that was dapper / much older kernel and udev) and thus spawned two processed - one for handling the device file in /proc/bus/usb and one for the device file in /dev/bus/usb. now I see I'm no longer getting events for /dev/bus/usb/ at all. why that? so if /proc/bus/usb/ is no longer mounted, my application will fail? the udev config is quite simple: BUS!=3D"usb", ACTION!=3D"add", GOTO=3D"openct_usb_rules_end" .. SYSFS{bInterfaceClass}=3D"0b", SYSFS{bInterfaceSubClass}=3D"00", SYSFS{bInterfaceProtocol}=3D"00" RUN+=3D"/lib/udev/openct_usb" .. LABEL=3D"openct_usb_rules_end" .. (pcmcia stuff) Thanks for your help. Regards, Andreas ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel