[lttng-dev] Crash on first run of target using liblttng-ust-cyg-profile.so, but subsequent runs succeed

Michael Jeanson mjeanson at efficios.com
Wed Mar 2 17:45:49 UTC 2016


Hi Sean,

As mentioned by Mathieu this is caused by the docker default seccomp profile
blocking the "restart_syscall" syscall. This problem only happens on host
systems where docker 0.10.2 and up was built against libseccomp 2.2.1 and up.

Hopefully docker will add this syscall to their default whitelist but in the
meantime, you can simply get the json profile [1] from git and add this :

  {
    "name": "restart_syscall",
    "action": "SCMP_ACT_ALLOW",
     "args": []
  }

Then start your container with "--security-opt seccomp:/path/to/myprofile.json".

Hope it helps,

Michael


[1] https://github.com/docker/docker/blob/master/profiles/seccomp/default.json


----- On Feb 11, 2016, at 9:01 AM, Sean Heelan seanheelan at gmail.com wrote:

> Hi all,
> 
> I am running a target within a Docker instance, and tracing function execution
> using the latest LTTng release (2.7). The commands I am issuing look as
> follows:
> 
> ----
> lttng create cc_session -o bla
> lttng enable-event --userspace lttng_ust_cyg_profile:func_entry
> lttng start
> 
> LD_PRELOAD=liblttng-ust-cyg-profile.so target
> 
> lttng stop
> lttng destroy
> ----
> 
> When the target is executed it aborts with the following error:
> 
> ----
> php: lttng-ust-comm.c:1582: lttng_ust_init: Assertion `!ret' failed.
> ----
> 
> If I rerun the command it then works fine. In fact, simply doing the following
> within the Docker container demonstrates the issue:
> 
> ----
> LD_PRELOAD=liblttng-ust-cyg-profile.so ls
> LD_PRELOAD=liblttng-ust-cyg-profile.so ls
> ----
> 
> The first 'ls' will fail at the same point mentioned above, while the second
> will succeed. Off the top of my head I'm struggling to come up with an
> explanation as to what impact the first execution using LD_PRELOAD would have
> on the second. Does it impact a shared lib cache in some way, which I'm unaware
> of?
> 
> Any assistance would be appreciated!
> 
> Sean
> 
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



More information about the lttng-dev mailing list