Application crash when invoking upstart dbus api's.

Naveen Verma ernaveenverma at gmail.com
Tue Jun 9 23:27:04 PDT 2009


Hi,

 Hello,
>
> I am trying to investigate a crash in the dbus/dbus-glib code when trying
> to use dbus-glib to communicate with upstart 0.5.
>
>
>
> Whenever a crash occurs, it always seems to be failing with a similar stack
> trace (see below).
>
> The system is a 4 core cavium board (mips).
>
> The test application is using 4 gthreads to make upstart async api calls to
> get upstart version in a while loop.
>
> We have started a separate gthread to that does a g_main_loop_run() to
> handle responses from the async calls.
>
> The application crashes after several successful api requests (1000 +)
>
> The same code does not crash on a 2 core ppc based board.
>
>
>
> The software versions we are using are as follows.
>
> Upstart     Version   0.5
>
> dbus-glib   Version  0.76
>
> dbus         Version  1.2.1
>
> glib           Version  2.6.6
>
>
>
> The code flow looks like this
>
> main()
>
> {
>
> g_type_init ();
>
> g_thread_init(NULL);
>
> dbus_g_thread_init();
>
> //Create dbus connection
>
> connection = dbus_g_bus_get (DBUS_BUS_SYSTEM,&error);
>

-- Could you check if you get the connection here, because in the bt it look
like your connection object is NULL.


> //Create upstart proxy to be shared by the 4 threads.
>
> upstartProxy = dbus_g_proxy_new_for_name (connection,
>
>                                                 UPSTART_SERVICE, /*
> "com.ubuntu.Upstart"*/
>
>                                                 UPSTART_SERVICE_PATH, /*
> "/com/ubuntu/Upstart"*/
>
>                                                 UPSTART_INTERFACE); /*
> "com.ubuntu.Upstart"*/
>
> //Create mutex to lock/unlock before each of the threads makes the async
> call.
>
> myMutex=g_mutex_new();
>
> //Upstart Proxy and mutex are passed to all 4 threads.
>
> //Create 1 gthread that runs g_main_loop_run() to handle callbacks for
> async calls.
>
> //Create 4 gthreads to make async calls.
>
> //call g_thread_join() on all 5 threads.
>
> }
>

-- Well, did not understand, why you are creating so many threads.


>
>
>
> Thanks,
>
> Sandeep
>  -Br

Naveen

>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/dbus/attachments/20090610/1f0e772b/attachment.html 


More information about the dbus mailing list