Re: compiler optimization causing issues with glib

2012-06-05 Thread Colin Walters
On Fri, 2012-06-01 at 11:33 -0500, Mike wrote: If you read the example program, you will see in my test that I simply call exit in the child -- that's it. That meets your requirement. There is one issue in your code; you shouldn't be calling waitpid(-1, ...). That would break any

Re: compiler optimization causing issues with glib

2012-06-05 Thread Mike
On Tue, Jun 5, 2012 at 12:54 PM, Colin Walters walt...@verbum.org wrote: On Fri, 2012-06-01 at 11:33 -0500, Mike wrote: If you read the example program, you will see in my test that I simply call exit in the child -- that's it.  That meets your requirement. There is one issue in your code;

Re: compiler optimization causing issues with glib

2012-06-05 Thread Colin Walters
On Tue, 2012-06-05 at 13:20 -0500, Mike wrote: I'm fairly convinced at this point that it is something in libc, but I'm not sure that it isn't acting to spec with regards to allowed behavior. Just to be clear, *which* libc are we talking about? I'm guessing eglibc? I've walked through

Re: compiler optimization causing issues with glib

2012-06-05 Thread Mike
On Tue, Jun 5, 2012 at 1:28 PM, Colin Walters walt...@verbum.org wrote: On Tue, 2012-06-05 at 13:20 -0500, Mike wrote: I'm fairly convinced at this point that it is something in libc, but I'm not sure that it isn't acting to spec with regards to allowed behavior. Just to be clear, *which*

Re: compiler optimization causing issues with glib

2012-06-05 Thread Mike
On Tue, Jun 5, 2012 at 1:51 PM, Mike puffy.t...@gmail.com wrote: On Tue, Jun 5, 2012 at 1:28 PM, Colin Walters walt...@verbum.org wrote: On Tue, 2012-06-05 at 13:20 -0500, Mike wrote: I'm fairly convinced at this point that it is something in libc, but I'm not sure that it isn't acting to

Re: compiler optimization causing issues with glib

2012-06-01 Thread Mike
On Wed, May 30, 2012 at 3:16 PM, Mike puffy.t...@gmail.com wrote: On Wed, May 30, 2012 at 9:12 AM, Mike puffy.t...@gmail.com wrote: On Wed, May 30, 2012 at 6:43 AM, Simon McVittie simon.mcvit...@collabora.co.uk wrote: On 24/05/12 17:20, Mike wrote: I am using glib 2.26.0 [...] The

Re: compiler optimization causing issues with glib

2012-06-01 Thread Mike
I am using glib 2.26.0 [...] The application I'm having issues with uses gdbus [...] - Thread stuck in futex wait inside kernel When I've attached GDB (or done SysRq), it's the gdbus thread that is stuck. If your application is calling GDBus APIs from more than one thread (it's unclear

Re: compiler optimization causing issues with glib

2012-06-01 Thread Simon McVittie
On 01/06/12 16:43, Mike wrote: The issue seems to somehow relate to calling fork. From GLib documentation (e.g. http://developer.gnome.org/glib/2.32/glib-The-Main-Event-Loop.html): On Unix, the GLib mainloop is incompatible with fork(). Any program using the mainloop must either exec() or

Re: compiler optimization causing issues with glib

2012-06-01 Thread Mike
On Fri, Jun 1, 2012 at 11:30 AM, Simon McVittie simon.mcvit...@collabora.co.uk wrote: On 01/06/12 16:43, Mike wrote: The issue seems to somehow relate to calling fork. From GLib documentation (e.g. http://developer.gnome.org/glib/2.32/glib-The-Main-Event-Loop.html): On Unix, the GLib

Re: compiler optimization causing issues with glib

2012-06-01 Thread Mike
On Fri, Jun 1, 2012 at 11:17 AM, Mike puffy.t...@gmail.com wrote: I am using glib 2.26.0 [...] The application I'm having issues with uses gdbus [...] - Thread stuck in futex wait inside kernel When I've attached GDB (or done SysRq), it's the gdbus thread that is stuck. If your

Re: compiler optimization causing issues with glib

2012-05-30 Thread Mike
On Wed, May 30, 2012 at 6:43 AM, Simon McVittie simon.mcvit...@collabora.co.uk wrote: On 24/05/12 17:20, Mike wrote: I am using glib 2.26.0 [...] The application I'm having issues with uses gdbus [...] - Thread stuck in futex wait inside kernel When I've attached GDB (or done SysRq), it's

Re: compiler optimization causing issues with glib

2012-05-30 Thread Mike
On Wed, May 30, 2012 at 9:12 AM, Mike puffy.t...@gmail.com wrote: On Wed, May 30, 2012 at 6:43 AM, Simon McVittie simon.mcvit...@collabora.co.uk wrote: On 24/05/12 17:20, Mike wrote: I am using glib 2.26.0 [...] The application I'm having issues with uses gdbus [...] - Thread stuck in

Re: compiler optimization causing issues with glib

2012-05-25 Thread Mike
On Thu, May 24, 2012 at 11:20 AM, Mike puffy.t...@gmail.com wrote: Hi, I'm seeing some unexplained behavior from glib when I compile it with optimizations.  I am using glib 2.26.0 cross-compiled for ARM using Code Sourcery arm-2010q1-202. The application I'm having issues with uses gdbus

Re: compiler optimization causing issues with glib

2012-05-25 Thread Stef Walter
On 05/25/2012 11:14 PM, Mike wrote: Unfortunately, I just managed to get this error to trigger now even with the optimization changes, which is probably good -- I'd like to trust the compiler! In any case, is there a document anywhere that describes the different threads that glib sets up?

compiler optimization causing issues with glib

2012-05-24 Thread Mike
Hi, I'm seeing some unexplained behavior from glib when I compile it with optimizations. I am using glib 2.26.0 cross-compiled for ARM using Code Sourcery arm-2010q1-202. The application I'm having issues with uses gdbus and exposes a few methods. The method of causing the issue is