[lttng-dev] Segfault during process exit

Jeffrey Chen cpthk at live.com
Wed Mar 2 22:13:23 UTC 2016


Thanks!

I will try to get a sample executable. But, just from the theory point of view, this issue is possible, right?



________________________________
From: Jonathan Rajotte Julien <Jonathan.rajotte-julien at efficios.com>
Sent: Wednesday, March 2, 2016 12:35 PM
To: Jeffrey Chen
Cc: lttng-dev at lists.lttng.org
Subject: Re: [lttng-dev] Segfault during process exit

Hi,

Don't forget to cc the mailing list.

On 2016-03-02 02:42 PM, Jeffrey Chen wrote:

Even I share our executable, you will not be able to run on your machine, as it depends on our environment.

This is expected, it's also why I asked you if you could provide a reproducer, a simpler version of your problem that reproduce the behavior even sporadically.


The idea is that, if you spawn some threads, and these threads keep writing traces through LTTng. Then, exit the main thread, as in return main() function. LTTng's logic will do cleanup itself, but my other threads are still writing to LTTng. This would cause segfault. It would try to reference address 0x0.

This could be a good start for a simple reproducer.

Cheers


#0  0x0000000000000000 in ?? ()
#1  0x00007f7e31fdfd78 in __tracepoint_cb_processor___tracepoint_info (
    taskNameArg=0x1cf3c30 "BackgroundTask", dataArg=0x1fd5200 "S")

...

________________________________
From: Jonathan Rajotte Julien <Jonathan.rajotte-julien at efficios.com><mailto:Jonathan.rajotte-julien at efficios.com>
Sent: Wednesday, March 2, 2016 11:21 AM
To: Jeffrey Chen
Cc: lttng-dev at lists.lttng.org<mailto:lttng-dev at lists.lttng.org>
Subject: Re: [lttng-dev] Segfault during process exit

Hi,

Could you provide a reproducer ?

Could you give us some context ?

Thanks

On 2016-03-02 02:07 PM, Jeffrey Chen wrote:

Hi:


Our system process will spawn several background threads to do tasks. During the process exit, there is no guarantee that these background threads are finished. I have noticed several times that the execution would segfault during exiting. The stacktrace is showing that the segfault happened at the call to write trace, tracepoint(). My guess is that LTTng cleaned up the tracing connection, and the background thread was still running. Has anyone noticed this issue? I thought about trying wait for all the background threads to complete, but this is very difficult to do in a complex system, as the background thread could spawn more threads during the process. Is there any way to solve this? Thanks.



_______________________________________________
lttng-dev mailing list
lttng-dev at lists.lttng.org<mailto:lttng-dev at lists.lttng.org>
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



--
Jonathan R. Julien
Efficios


--
Jonathan R. Julien
Efficios
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20160302/1e48e923/attachment.html>


More information about the lttng-dev mailing list