<div dir="ltr">Is there a workaround/resolution to this?<div><br></div><div style>I had filed a bug <a href="http://sourceforge.net/tracker/?func=detail&aid=3610837&group_id=163076&atid=826303">http://sourceforge.net/tracker/?func=detail&aid=3610837&group_id=163076&atid=826303</a></div>
<div style><br></div><div style><br></div><div style>Thanks,<br>SM.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Apr 15, 2013 at 1:08 PM, Daniel Lezcano <span dir="ltr"><<a href="mailto:daniel.lezcano@free.fr" target="_blank">daniel.lezcano@free.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 04/15/2013 03:26 AM, Serge Hallyn wrote:<br>
> Quoting Somnath Mitra (<a href="mailto:somnath.mitra@xockets.com">somnath.mitra@xockets.com</a>):<br>
>> On Fri, Apr 12, 2013 at 6:53 AM, Serge Hallyn <<a href="mailto:serge.hallyn@ubuntu.com">serge.hallyn@ubuntu.com</a>>wrote:<br>
>><br>
>>> Quoting Somnath Mitra (<a href="mailto:somnath.mitra@xockets.com">somnath.mitra@xockets.com</a>):<br>
>>><br>
>> > Since the container rootfs is shared with host I am confused why it<br>
>>> cannot<br>
>>>> find lxc-init?<br>
>>> Sounds like a compilation/packaging problem. It works for me<br>
>>> here, with ubuntu raring:<br>
>>><br>
>>> cat > lxc.conf << EOF<br>
>>> cat > lxc.conf << EOF<br>
>>> lxc.utsname = beta<br>
>>> lxc.network.type = empty<br>
>>> lxc.rootfs = /<br>
>>> lxc.aa_profile = unconfined<br>
>>> EOF<br>
>>> lxc.utsname = beta<br>
>>> lxc.network.type = empty<br>
>>> lxc.rootfs = /<br>
>>> lxc.aa_profile = unconfined<br>
>>> EOF<br>
>>><br>
>>> sudo lxc-execute -n foobar -f lxc.conf -l info -o outout -- ps -ef<br>
>>> UID PID PPID C STIME TTY TIME CMD<br>
>>> root 1 0 0 08:46 pts/1 00:00:00<br>
>>> /usr/lib/x86_64-linux-gnu/lxc/lxc-init -- ps -ef<br>
>>> root 2 1 0 08:46 pts/1 00:00:00 ps -ef<br>
>>><br>
>>> (an interactive shell doesn't work - just hangs, I don't use<br>
>>> lxc-execute so always forget what is expect to work and what<br>
>>> isn't)<br>
>>><br>
>> Hangs for me too (on the embedded board). Can you comment on possible root<br>
>> cause or workaround so we can investigate. My target application shall need<br>
>> stdin, stdout and, possibly, stderr.<br>
> Hi Daniel,<br>
><br>
> can you comment on this by chance? I frankly don't use lxc-execute, and<br>
> I know you know of all sorts of special circumstances surrounding it...<br>
> For me,<br>
><br>
> cat > lxc.conf << EOF<br>
> lxc.utsname = beta<br>
> lxc.network.type = empty<br>
> lxc.rootfs = /<br>
> lxc.aa_profile = unconfined<br>
> EOF<br>
><br>
> lxc-execute -n foobar -f lxc.conf -- ps -ef<br>
><br>
> works fine, while<br>
><br>
> lxc-execute -n foobar -f lxc.donf -- /bin/sh<br>
><br>
> hangs - some tty session thing?<br>
<br>
</div></div>At the first glance, yes.<br>
<br>
Probably a SIGTTIN / SIGTTOU signal received. Something change with the<br>
pid group/session leader ?<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
>>>> I have already checked that kernel is configured correctly using<br>
>>>> lxc-checkconfig.<br>
>>>><br>
>>>> Pls send a pointer to a simple working configuration for embedded<br>
>>> systems.<br>
>>><br>
>>> Take a look at src/lxc/execute.c:choose_init(). It will look for<br>
>>> lxc-init in three places:<br>
>>><br>
>>> LXCINITDIR "/lxc/lxc-init"<br>
>>> /usr/lib/lxc/lxc-init<br>
>>> /sbin/lxc-init<br>
>>><br>
>>> LXCINITDIR in ubuntu is /usr/lib/x86_64-linux-gnu, and lxc-init is in<br>
>>> fact at /usr/lib/x86_64-linux-gnu/lxc/lxc-init. (You can find your<br>
>>> LXCINITDIR in config.log if you built your own lxc). But the<br>
>>> easier thing might be to just copy lxc-init into /sbin.<br>
>>><br>
>> Yes I had put lxc-* binaries in /usr/bin. Putting them in /sbin solved it.<br>
>><br>
>> Thanks,<br>
>> SM.<br>
<br>
</div></div></blockquote></div><br></div>