← Back to team overview

touch-packages team mailing list archive

[Bug 1447756] Re: segfault in log.c code causes phone reboot loops

 

So when job gets terminated we don't succeed to write to to the disk and it is added to the unflushed list.
Problem is another call to write function later on, but before we get writable disk signal:
[    7.460627]init: log_handle_unflushed:778:len=32673, path='/var/log/upstart/ureadahead-touch.log'
[    7.460682]init: unflushed->len=32673
[    7.460736]init: job_process_terminated:1877:adding job ureadahead-touch to unflushed list

but then later one we get:
[    7.968094]init: log_io_reader:368:
[    7.968158]init: log_file_write:552:unflashed:61817, new_len:150, path:/var/log/upstart/ureadahead-touch.log
[    7.975087]init: log_file_write:579:unflashed->len:61817, written_len:61817
calling "nih_io_buffer_shrink (log->unflushed, (size_t)wlen);"
[    7.975167]init: log_file_write:581:unflashed->len:0

and eventually we get:
[    8.369166]init: control_notify_disk_writeable<<
[    8.369239]init: log_clear_unflushed<<
[    8.369280]init: OK checking assert:unflashed->len = 46
[    8.369435]init: log_clear_unflushed:888:
[    8.369492]init: log_file_write:552:unflashed->len=46, new:0, path:/var/log/upstart/container-detect.log
[    8.370305]init: log_file_write:579:len:46, wlen:46
[    8.370359]init: log_file_write:581:len:0
[    8.370450]init: OK checking assert:unflashed->len = 0
[    8.370509]init: log.c:874: Assertion failed in log_clear_unflushed: log->unflushed->len

As you can see call to write in the middle is one causing the issue,
since it flushes log buffer, but does not remove it from unflushed list.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/1447756

Title:
  segfault in log.c code causes phone reboot loops

Status in the base for Ubuntu mobile products:
  Fix Committed
Status in Upstart:
  New
Status in upstart package in Ubuntu:
  Confirmed

Bug description:
  We recently started getting reprots from phone users that their
  devices go into a reboot loop after changing the language or getting
  an OTA upgrade (either of both end with a reboot of the phone)

  after a bit of research we collected the log at
  http://pastebin.ubuntu.com/10872934/

  this shows a segfault of upstarts init binary in the log.c code:

  [    6.999083]init: log.c:819: Assertion failed in log_clear_unflushed: log->unflushed->len
  [    7.000279]init: Caught abort, core dumped
  [    7.467176]Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000600

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1447756/+subscriptions


References