[Bug 829980] Re: upstart-udev-bridge eats 100% cpu calling dbus_message_iter_append_basic()

James Hunt 829980 at bugs.launchpad.net
Fri Sep 30 10:09:27 UTC 2011


Kay has intimated that the sanitizing of udev messages is a userspace
concern (the kernel just passes the data from the device to userspace):

  http://marc.info/?l=linux-hotplug&m=131737595918135&w=2

This implies that maybe we should fix the upstart-udev-bridge to perform
sanitization, but how this should be done is unclear. The batteries
@smagoun and @Sascha have -- as far as I know -- are the only devices
we've ever seen that have caused this problem, but we *could* modify
upstart-udev-bridge to add a new switch "--sanitise" that would do the
following:

- if non-printables are found in either the udev event name or the udev event environment, replace them with spaces.
  (to handle potential utf-8 characters within strings).

- if non-printables are found *at the end* of either the udev event name or the udev event environment, remove them.
  (to handle what appears to be a buggy device that that is passing junk to the kernel erroneously).

- if any non-printable characters are found, the upstart-udev-bridge will emit a warning message showing:
  - the sanitized name of the event that contained non-printables.
  - the sanitized name of the environment variable associated with the udev event that was found to contain non-printables
   (if applicable).
  - maybe a hex-encoded version of the orignal value that was found to contain non-printables.

Ubuntu would then add the "--sanitise" switch to /etc/init/upstart-udev-
bridge.conf. Note that not specifying "--sanitise" would revert to
performing no sanitising of any udev event names or environment
variables (the current behaviour).

We could change the way the upstart-udev-bridge creates the dbus
messages, but that would take time, require lots of extra tests to be
written and probably isn't worth the effort as we seem to be dealing
with potentially a very small set of devices sending non-printables to
userspace (maybe just the device @smagoun has).


** Changed in: upstart (Ubuntu)
       Status: Invalid => Opinion

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/829980

Title:
  upstart-udev-bridge eats 100% cpu calling
  dbus_message_iter_append_basic()

Status in “linux” package in Ubuntu:
  Confirmed
Status in “upstart” package in Ubuntu:
  Opinion

Bug description:
  the segv was created by me sending a kill -11. but the 100% cpu is
  unbarable

  ProblemType: Crash
  DistroRelease: Ubuntu 11.10
  Package: upstart 1.3-0ubuntu6
  ProcVersionSignature: Ubuntu 3.0.0-8.11-generic 3.0.1
  Uname: Linux 3.0.0-8-generic x86_64
  NonfreeKernelModules: fglrx
  Architecture: amd64
  Date: Sat Aug 20 11:48:34 2011
  ExecutablePath: /sbin/upstart-udev-bridge
  InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Alpha amd64+mac (20110803.1)
  ProcCmdline: upstart-udev-bridge --daemon
  ProcEnviron: PATH=(custom, no user)
  Signal: 11
  SourcePackage: upstart
  StacktraceTop:
   ?? () from /lib/x86_64-linux-gnu/libc.so.6
   ?? () from /lib/x86_64-linux-gnu/libdbus-1.so.3
   ?? () from /lib/x86_64-linux-gnu/libdbus-1.so.3
   dbus_message_iter_append_basic () from /lib/x86_64-linux-gnu/libdbus-1.so.3
   ?? ()
  Title: upstart-udev-bridge crashed with SIGSEGV in dbus_message_iter_append_basic()
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups:

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/829980/+subscriptions




More information about the foundations-bugs mailing list