[Bug 1201865] Re: upstart on nexus4 is frequently writing :sys:power_supply-device-changed event messages

James Hunt 1201865 at bugs.launchpad.net
Fri Jul 19 13:14:35 UTC 2013


This is rather an interesting one: we first added support for running
upstart as a non-priv user, we forced it to run in debug mode (since
debugging was the main reason for running init as a non-priv user). As
such, when you run "init --user", you are automatically in debug mode
('initctl log-priority' confirms this).

This problem has not been seen on the desktop because there, the login
script redirect stdout to null and only redirect stderr to $HOME
/.xsession-errors... but Upstart, when run as a non-priv user, outputs
its debug to stdout.

There are 2 work-arounds for this problem:

1) Create a job that specifies:

    start on startup
    exec initctl log-priority message

2) Use shell redirection to change the exec line in /etc/init/ubuntu-touch-session.conf to discard stdout.
    
    This sounds a little extreme, but higher priority messages from Upstart go to stderr and hence *will* still get logged to /var/log/upstart/ubuntu-touch-session.log as expected.

-- 
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/1201865

Title:
  upstart on nexus4 is frequently writing :sys:power_supply-device-
  changed event messages

Status in Upstart:
  New
Status in “upstart” package in Ubuntu:
  Triaged

Bug description:
  Running fatrace on today's ubuntu touch images on the nexus4 I'm
  seeing very frequent upstart messages in  /var/log/upstart/ubuntu-
  touch-session-phablet.log

  To reproduce:

  sudo apt-get install fatrace
  cd /
  fatrace  -c
  init(1): W /var/log/upstart/ubuntu-touch-session-phablet.log
  init(1): W /var/log/upstart/ubuntu-touch-session-phablet.log
  init(1): W /var/log/upstart/ubuntu-touch-session-phablet.log
  init(1): W /var/log/upstart/ubuntu-touch-session-phablet.log

  ..every second or so an new message is written on an idle phone.

  And  tail -f /var/log/upstart/ubuntu-touch-session-phablet.log  shows:

  event_finished: Finished :sys:cpu-device-offline event
  event_new: Pending :sys:power_supply-device-changed event
  Handling :sys:power_supply-device-changed event
  event_finished: Finished :sys:power_supply-device-changed event
  event_new: Pending :sys:cpu-device-online event
  Handling :sys:cpu-device-online event
  event_finished: Finished :sys:cpu-device-online event
  event_new: Pending :sys:cpu-device-offline event
  Handling :sys:cpu-device-offline event
  event_finished: Finished :sys:cpu-device-offline event
  event_new: Pending :sys:cpu-device-online event
  Handling :sys:cpu-device-online event
  event_finished: Finished :sys:cpu-device-online event
  event_new: Pending :sys:power_supply-device-changed event
  Handling :sys:power_supply-device-changed event
  event_finished: Finished :sys:power_supply-device-changed event
  event_new: Pending :sys:cpu-device-offline event
  Handling :sys:cpu-device-offline event
  event_finished: Finished :sys:cpu-device-offline event
  event_new: Pending :sys:cpu-device-online event
  Handling :sys:cpu-device-online event

To manage notifications about this bug go to:
https://bugs.launchpad.net/upstart/+bug/1201865/+subscriptions




More information about the foundations-bugs mailing list