<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><span id="zwchr" data-marker="__DIVIDER__">----- On Aug 17, 2015, at 5:50 PM, Jeremie Galarneau <jeremie.galarneau@efficios.com> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 17, 2015 at 7:53 PM, Mathieu Desnoyers <span dir="ltr"><<a href="mailto:mathieu.desnoyers@efficios.com" target="_blank">mathieu.desnoyers@efficios.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We can get metadata when still in the trace open functions, in which<br>
case the ctf trace is now allocated nor available yet. This fixes a<br></blockquote><br><div>Do you mean "is neither allocated nor available yet"?</div></div></div></div></blockquote><div><br></div><div>yes, sorry.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Mathieu<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
segmentation fault in stress-test.<br><br>
Signed-off-by: Mathieu Desnoyers <<a href="mailto:mathieu.desnoyers@efficios.com" target="_blank">mathieu.desnoyers@efficios.com</a>><br>
---<br>
formats/lttng-live/lttng-live-comm.c | 5 +++++<br>
1 file changed, 5 insertions(+)<br><br>
diff --git a/formats/lttng-live/lttng-live-comm.c b/formats/lttng-live/lttng-live-comm.c<br>
index 9b409bc..57586a1 100644<br>
--- a/formats/lttng-live/lttng-live-comm.c<br>
+++ b/formats/lttng-live/lttng-live-comm.c<br>
@@ -600,6 +600,11 @@ int append_metadata(struct lttng_live_ctx *ctx,<br>
struct lttng_live_viewer_stream *metadata;<br>
char *metadata_buf = NULL;<br><br>
+ if (!viewer_stream->ctf_trace->handle) {<br></blockquote><br><div>If the ctf_trace can be unallocated, shouldn't we check for:</div><br><div>if (!viewer_stream->ctf_trace) ?</div><br><div>Jérémie</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ printf_verbose("append_metadata: trace handle not ready yet.\n");<br>
+ return 0;<br>
+ }<br>
+<br>
printf_verbose("get_next_index: new metadata needed\n");<br>
ret = get_new_metadata(ctx, viewer_stream, &metadata_buf);<br>
if (ret < 0) {<br><span class="HOEnZb"><span style="color: #888888;" data-mce-style="color: #888888;" color="#888888">--<br>
2.1.4<br>
<br>
</span></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Jérémie Galarneau<br>EfficiOS Inc.<br><a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a><br data-mce-bogus="1"></div></div></div><br></blockquote></div><div><br></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>