https://bugs.lttng.org/https://bugs.lttng.org/themes/lttng/favicon/a.ico?14249722912016-11-28T21:11:18ZLTTng bugs repositoryLTTng-tools - Bug #1078: lttng enable-event throws the error "UST create channel failed"https://bugs.lttng.org/issues/1078?journal_id=31332016-11-28T21:11:18ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<ul></ul><p>Are you running your lttng-sessiond as a simple user or as root ?</p>
<p>If running as a simple user, you are probably running out of file descriptors.</p> LTTng-tools - Bug #1078: lttng enable-event throws the error "UST create channel failed"https://bugs.lttng.org/issues/1078?journal_id=31342016-11-28T21:19:21ZSébastien Boisvertsboisvert@gydle.com
<ul></ul><p>Mathieu Desnoyers wrote:</p>
<blockquote>
<p>Are you running your lttng-sessiond as a simple user or as root ?</p>
<p>If running as a simple user, you are probably running out of file descriptors.</p>
</blockquote>
<p>Simple user.</p>
<p>bolt$ lsof &> lsof.txt<br />bolt$ grep lttng lsof.txt|grep ust-shm-consumer|wc -l<br />4400<br />bolt$ grep lttng lsof.txt|grep ust-shm-consumer|tail<br />lttng-con 28776 28786 sboisvert 725u REG 0,20 660864 129840 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 726u REG 0,20 660864 129841 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 727u REG 0,20 660864 129842 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 728u REG 0,20 660864 129843 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 729u REG 0,20 660864 129844 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 730u REG 0,20 660864 129845 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 731u REG 0,20 660864 129846 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 732u REG 0,20 660864 129847 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 733u REG 0,20 660864 129848 /run/shm/ust-shm-consumer-28776 (deleted)<br />lttng-con 28776 28786 sboisvert 735u REG 0,20 17152 128858 /run/shm/ust-shm-consumer-28776 (deleted)</p> LTTng-tools - Bug #1078: lttng enable-event throws the error "UST create channel failed"https://bugs.lttng.org/issues/1078?journal_id=31352016-11-28T21:21:51ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<ul></ul><p>You should try running lttng-sessiond as root, or increase the max open files ulimit manually.</p>
<p>Thanks,</p>
<p>Mathieu</p> LTTng-tools - Bug #1078: lttng enable-event throws the error "UST create channel failed"https://bugs.lttng.org/issues/1078?journal_id=31362016-11-28T21:26:08ZSébastien Boisvertsboisvert@gydle.com
<ul></ul><p>Mathieu Desnoyers wrote:</p>
<blockquote>
<p>You should try running lttng-sessiond as root, or increase the max open files ulimit manually.</p>
<p>Thanks,</p>
<p>Mathieu</p>
</blockquote>
<p>That solves the problem ("ulimit -n 4096").</p>
<p>Could this be managed automatically, since userspace tracing is done without root access ?</p>
<p>Why are all these open files needed ?</p> LTTng-tools - Bug #1078: lttng enable-event throws the error "UST create channel failed"https://bugs.lttng.org/issues/1078?journal_id=31372016-11-28T21:31:44ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<ul></ul><p>We already bump the ulimit when running as root because we always have to right to do so.</p>
<p>In your situation, what are the limits imposed by the system on your user ?</p>
<p>We need to keep one open file per posix shared memory (one per cpu per channel per session) in the consumer daemon (lttng-consumerd).</p> LTTng-tools - Bug #1078: lttng enable-event throws the error "UST create channel failed"https://bugs.lttng.org/issues/1078?journal_id=31382016-11-28T21:42:18ZSébastien Boisvertsboisvert@gydle.com
<ul></ul><p>Mathieu Desnoyers wrote:</p>
<blockquote>
<p>We already bump the ulimit when running as root because we always have to right to do so.</p>
<p>In your situation, what are the limits imposed by the system on your user ?</p>
<p>We need to keep one open file per posix shared memory (one per cpu per channel per session) in the consumer daemon (lttng-consumerd).</p>
</blockquote>
<p>I don't/need have root access, and I don't have limits that I can't change.</p>
<p>So are these open files kept because a previous session could be restarted (not destroyed yet) ?</p>
<p>I found my problem in the manual of lttng-destroy:</p>
<p>"Destroying a tracing session does not destroy the recorded trace data, if any; it frees resources acquired by the session daemon and tracer side, making sure to flush all trace data."</p>
<p>The problem I see is that there is no continuity: destroy does not destroy the trace data. Sure.<br />But "lttng view" does not work on a destroyed session. One needs to use babeltrace with the full path to the CTF data:</p>
<p>bolt$ lttng destroy alcatraz-trace-2016-11-28T11:36:10,299050169-0500<br />Session alcatraz-trace-2016-11-28T11:36:10,299050169-0500 destroyed</p>
<p>bolt$ lttng view alcatraz-trace-2016-11-28T11:36:10,299050169-0500<br />Session name alcatraz-trace-2016-11-28T11:36:10,299050169-0500 not found<br />Error: Command error</p>
<p>bolt$ lttng view /home/sboisvert/lttng-traces/alcatraz-trace-2016-11-28T11:36:10,299050169-0500-20161128-113610<br />Session name /home/sboisvert/lttng-traces/alcatraz-trace-2016-11-28T11:36:10,299050169-0500-20161128-113610 not found<br />Error: Command error</p>
<p>bolt$ babeltrace /home/sboisvert/lttng-traces/alcatraz-trace-2016-11-28T11:36:10,299050169-0500-20161128-113610|wc -l<br />4200877</p>
<p>That's fine too. I thought that destroy would wipe my trace data.</p> LTTng-tools - Bug #1078: lttng enable-event throws the error "UST create channel failed"https://bugs.lttng.org/issues/1078?journal_id=31392016-11-29T19:55:11ZSébastien Boisvertsboisvert@gydle.com
<ul></ul><p>This can be closed as a WORKSFORME or READTHEMANUAL.</p> LTTng-tools - Bug #1078: lttng enable-event throws the error "UST create channel failed"https://bugs.lttng.org/issues/1078?journal_id=31402016-11-29T21:39:20ZMathieu Desnoyersmathieu.desnoyers@efficios.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Invalid</i></li></ul>