udevd daemon run with --debug affects output of 'udevadm info'

Bug #591460 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: udev

On lucid, I've added the following rule in /etc/udev/rules.d/85-foo.rules:
ACTION=="add", RUN+="/tmp/foo"

then, /tmp/foo has:
#!/bin/sh
udevadm info --export-db > ${0}.stdout 2>${0}.stderr

if I run udevd with '--debug --debug-trace', then /tmp/foo.stderr will have content. If I run without --debug and --debug-trace, then foo.stderr has no content.

An example of the content in /tmp/foo.stderr is:

custom logging function 0x7f6c8bd1a010 registered
selinux=0
calling: info
device 0x7f6c8bd24d30 has devpath '/devices/LNXSYSTM:00'
device 0x7f6c8bd24d30 has devpath '/devices/LNXSYSTM:00/LNXCPU:00'
device 0x7f6c8bd24d30 has devpath '/devices/LNXSYSTM:00/LNXPWRBN:00'
...
device 0x7f6c8bd24d50 has devpath '/devices/virtual/vtconsole/vtcon0'
device 0x7f6c8bd24d50 has devpath '/devices/virtual/vtconsole/vtcon1'
device 0x7f6c8bd24d50 has devpath '/devices/virtual/block/md0'
device 0x7f6c8bd24d50 filled with db symlink data '/dev/md0'

Essentially, the flags that the udev daemon are run with affect the stderr of something that is run via a udev hook.

This is causing a problem for a program that is parsing 'udevadm info' output from a udev hook. Obviously it can be worked around by not having the program parsing that output join udevadm's stdout and stderr, but I believe this is buggy behavior none the less.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: udev 151-12
ProcVersionSignature: User Name 2.6.34-4.11-virtual 2.6.34
Uname: Linux 2.6.34-4-virtual x86_64
Architecture: amd64
CustomUdevRuleFiles: 85-ebsmount.rules
Date: Tue Jun 8 21:00:32 2010
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: Bochs Bochs
ProcCmdLine: root=/dev/sda1 console=ttyS0
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: udev
dmi.bios.date: 01/01/2007
dmi.bios.vendor: Bochs
dmi.bios.version: Bochs
dmi.chassis.type: 1
dmi.chassis.vendor: Bochs
dmi.modalias: dmi:bvnBochs:bvrBochs:bd01/01/2007:svnBochs:pnBochs:pvr:cvnBochs:ct1:cvr:
dmi.product.name: Bochs
dmi.sys.vendor: Bochs

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

testing shows that '--debug-trace' has no effect, its the '--debug' flag itself.

Revision history for this message
Scott Moser (smoser) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.