[lttng-dev] SIGSEGV __event_probe, C++ application (static linking)
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Fri Jul 17 10:39:36 EDT 2015
OK (re-adding lttng-dev)
----- On Jul 17, 2015, at 9:09 AM, Dilong Zheng <Dilong.Zheng at mitel.com> wrote:
> I was using lttng-ust 2.5.4 but now I'm moving up to lttng-ust 2.5.5 (which
> should be the latest 2.5 version)
> Thanks,
> Dilong
> From: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
> Sent: Thursday, July 16, 2015 12:00 AM
> To: Dilong Zheng
> Cc: lttng-dev
> Subject: Re: [lttng-dev] SIGSEGV __event_probe, C++ application (static linking)
> ----- On Jul 13, 2015, at 4:37 PM, Dilong Zheng <Dilong.Zheng at mitel.com> wrote:
>> Hi,
>> I have instrumented a C++ application with user space tracepoints. When I run
>> the application and do a: "lttng list -u" command, I am able to see all my
>> available tracepoints for the application. However when I enable those user
>> space tracepoints and then start the trace, a core gets dumped and examining
>> the core file in gdb I see the following error:
>> Program terminated with signal SIGSEGV, Segmentation fault.
>> #0 0x00000000 in ?? ()
>> ...
>> (gdb) bt
>> #0 0x00000000 in ?? ()
>> #1 0x08dd1088 in __event_probe__mike___sem_wait_entry (__tp_data=0xef92d818)
>> at /localhome/zhengd/override_mcd/System/SS_Inc/./sem_wrapper.h:67
>> #2 0x08dd44d9 in __tracepoint_cb_mike___sem_wait_entry () at
>> /localhome/zhengd/override_mc /System/SS_Inc/sem_wrapper.h:67
>> #3 __wrap_sem_wait (sem=0xf43014c8) at
>> /localhome/zhengd/override_mcd/System/System_Services/SysServices_Linux/SystemLinux.cpp:1877
>> Contextual Information: I would like to trace all calls to sem_wait() in my
>> application. I am simply using a wrapper sem_wait function where I can place
>> tracepoint() calls. Here's what the sem_wait wrapper looks like:
>> extern "C" int __real_sem_wait(sem_t*);
>> extern "C" int __wrap_sem_wait(sem_t* sem)
>> {
>> tracepoint(mike, sem_wait_entry);
>> int ret = __real_sem_wait(sem);
>> tracepoint(mike, sem_wait_exit, ret);
>> return ret;
>> }
>> Here is the TRACEPOINT_EVENT macro found in my tracepoint provider header file
>> (which was generated using lttng-gen-tp command line utility):
>> TRACEPOINT_EVENT(mike,
>> sem_wait_entry,
>> TP_ARGS(),
>> TP_FIELDS()
>> )
>> And I am statically linking by using an existing CPP file (file with the
>> __wrap_sem_wait() function) to create probes. I would just like to know any
>> possible reasons why this error may be happening given the above mentioned
>> circumstances and what I may be able to try in order to fix this.
> Which UST version do you use ? Make sure you upgrade to latest,
> since we have fixed a similar segfault issue with probes compiled in
> C++ not so long ago.
> Thanks,
> Mathieu
>> Thanks,
>> Dilong
>> _______________________________________________
>> lttng-dev mailing list
>> lttng-dev at lists.lttng.org
>> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150717/bf69041f/attachment.html>
More information about the lttng-dev
mailing list