Looking at ply_event_loop_process_pending_events(), what stands out is
the call to alloca(3) which is used to allocated a fixed size chunk of
storage (and have it automatically freed on function exit). Use of
alloca() is not recommended for a number of reasons. Note too that the
result of the call to alloca() is not checked.

The man page for alloca(3) claims that this function allocates storage
on the stack. However, I think the plymouth build is using gcc's
internal implementation of alloca() which *doesn't* use the stack - it
uses malloc(3) (some levels down). Presumably the reason for using
alloca() was performance, but since the gcc implementation uses
malloc(), that isn't really a gain now. Note that gccs internal
implementation could be inlined (hence wouldn't appear on the stack
trace), and also calls abort() on error (which will generate a SIGSEGV
as is being seen by users).

 I've spun up a modified version of plymouth using a static array (since
there doesn't appear to be any advantage in using dynamic memory
allocation in this case AFAIKS). The updated packages are in my ikb ppa
if anyone is feeling brave:

  https://launchpad.net/~jamesodhunt/+archive/ikb/

If this does fix the problem we still need to understand what is
consuming all the memory. Maybe a bug with the alloca() implementation
in the gcc-4.6?

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

Title:
  plymouthd crashed with SIGSEGV in
  ply_event_loop_process_pending_events()

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

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to