<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Thanks!</p>
<p>I will try to get a sample executable. But, just from the theory point of view, this issue is possible, right?<br>
</p>
<p><br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Jonathan Rajotte Julien <Jonathan.rajotte-julien@efficios.com><br>
<b>Sent:</b> Wednesday, March 2, 2016 12:35 PM<br>
<b>To:</b> Jeffrey Chen<br>
<b>Cc:</b> lttng-dev@lists.lttng.org<br>
<b>Subject:</b> Re: [lttng-dev] Segfault during process exit</font>
<div> </div>
</div>
<div>Hi,<br>
<br>
Don't forget to cc the mailing list.<br>
<br>
<div class="moz-cite-prefix">On 2016-03-02 02:42 PM, Jeffrey Chen wrote:<br>
</div>
<blockquote type="cite"></blockquote>
<blockquote type="cite">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Even I share our executable, you will not be able to run on your machine, as it depends on our environment.</p>
</div>
</blockquote>
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.<br>
<br>
<blockquote type="cite">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>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.<br>
</p>
</div>
</blockquote>
This could be a good start for a simple reproducer. <br>
<br>
Cheers<br>
<blockquote type="cite">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<p><br>
</p>
<p><span style="background-color:rgb(255,255,0)">#0 0x0000000000000000 in ?? ()</span><br>
#1 0x00007f7e31fdfd78 in __tracepoint_cb_processor___tracepoint_info (<br>
taskNameArg=0x1cf3c30 "BackgroundTask", dataArg=0x1fd5200 "S")<br>
</p>
...<br>
<br>
<div style="color:rgb(0,0,0)">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Jonathan Rajotte Julien
<a class="moz-txt-link-rfc2396E" href="mailto:Jonathan.rajotte-julien@efficios.com">
<Jonathan.rajotte-julien@efficios.com></a><br>
<b>Sent:</b> Wednesday, March 2, 2016 11:21 AM<br>
<b>To:</b> Jeffrey Chen<br>
<b>Cc:</b> <a class="moz-txt-link-abbreviated" href="mailto:lttng-dev@lists.lttng.org">
lttng-dev@lists.lttng.org</a><br>
<b>Subject:</b> Re: [lttng-dev] Segfault during process exit</font>
<div> </div>
</div>
<div>Hi,<br>
<br>
Could you provide a reproducer ?<br>
<br>
Could you give us some context ?<br>
<br>
Thanks<br>
<br>
<div class="moz-cite-prefix">On 2016-03-02 02:07 PM, Jeffrey Chen wrote:<br>
</div>
<blockquote type="cite">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi:</p>
<p><br>
</p>
<p>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.<br>
</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset> <br>
<pre>_______________________________________________
lttng-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lttng-dev@lists.lttng.org">lttng-dev@lists.lttng.org</a>
<a title="Ctrl+Click or tap to follow the link" class="moz-txt-link-freetext" href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jonathan R. Julien
Efficios</pre>
</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jonathan R. Julien
Efficios</pre>
</div>
</div>
</div>
</body>
</html>