<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body>
Hi Jeffrey,<br>
<br>
Could you provide the version for lttng-ust, lttng-tools,
lttng-modules (if installed)?<br>
<br>
Were you able to reproduce the issue on master (git) ?<br>
<br>
What are the exact order of command to reproduce the problem ?<br>
<br>
Thanks<br>
<br>
<div class="moz-cite-prefix">On 2016-03-08 06:43 PM, Jeffrey Chen
wrote:<br>
</div>
<blockquote
cite="mid:DM3PR13MB0782B678A6ECD858863C1A8CC7B20@DM3PR13MB0782.namprd13.prod.outlook.com"
type="cite">
<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>
<div id="divtagdefaultwrapper"
style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi LTTng community:</p>
<p><br>
</p>
<p>We are using LTTng for our production environment. We have
been noticing segfault problem when our process exit. We think
the problem is due to the background thread continue to write
traces, while LTTng cleanup its memory. We do not know how to
fix this issue without changing LTTng code base. I have
written a very simple app that could repro the problem. Most
of my codes are copy pasted from the LTTng doc sample. Is
there any fix that the LTTng side could do?</p>
<p><br>
</p>
<p><br>
</p>
<p><b><u>hello.c</u></b><br>
</p>
<p>#include <stdio.h><br>
#include "hello-tp.h"<br>
#include <pthread.h><br>
<br>
<br>
void* doSomeThing(void *arg)<br>
{<br>
int x;<br>
for (x = 0; x < 100000; ++x) {<br>
tracepoint(hello_world, my_first_tracepoint, x,
"test");<br>
}<br>
}<br>
<br>
int main(int argc, char *argv[])<br>
{<br>
int x;<br>
<br>
getchar();<br>
<br>
pthread_t inc_x_thread;<br>
<br>
if(pthread_create(&inc_x_thread, NULL, doSomeThing,
NULL)) {<br>
<br>
fprintf(stderr, "Error creating thread\n");<br>
return 1;<br>
}<br>
<br>
tracepoint(hello_world, my_first_tracepoint, 23, "hi
there!");<br>
<br>
return 0;<br>
}</p>
<p><br>
</p>
<p><b><u>hello-tp.c</u></b><br>
</p>
<p>#define TRACEPOINT_CREATE_PROBES<br>
#define TRACEPOINT_DEFINE<br>
<br>
#include "hello-tp.h"<br>
</p>
<p><br>
</p>
<p><b><u>hello-tp.h</u></b></p>
<p>#undef TRACEPOINT_PROVIDER<br>
#define TRACEPOINT_PROVIDER hello_world<br>
<br>
#undef TRACEPOINT_INCLUDE<br>
#define TRACEPOINT_INCLUDE "./hello-tp.h"<br>
<br>
#if !defined(_HELLO_TP_H) ||
defined(TRACEPOINT_HEADER_MULTI_READ)<br>
#define _HELLO_TP_H<br>
<br>
#include <lttng/tracepoint.h><br>
<br>
TRACEPOINT_EVENT(<br>
hello_world,<br>
my_first_tracepoint,<br>
TP_ARGS(<br>
int, my_integer_arg,<br>
char*, my_string_arg<br>
),<br>
TP_FIELDS(<br>
ctf_string(my_string_field, my_string_arg)<br>
ctf_integer(int, my_integer_field, my_integer_arg)<br>
)<br>
)<br>
<br>
#endif /* _HELLO_TP_H */<br>
<br>
#include <lttng/tracepoint-event.h><br>
</p>
<p><br>
</p>
<p><b><u>Compile</u></b></p>
<p>gcc -c -I. hello-tp.c<br>
gcc -c hello.c<br>
gcc -o hello hello.o hello-tp.o -llttng-ust -ldl -lpthread<br>
<br>
</p>
<p><br>
</p>
<p><br>
</p>
<p><br>
</p>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
lttng-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:lttng-dev@lists.lttng.org">lttng-dev@lists.lttng.org</a>
<a 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>
</body>
</html>