[lxc-users] LXCFS - dash read builtin behavior oddity?

Robert Pendell shinji at elite-systems.org
Tue Jun 9 03:56:14 UTC 2015


I have filed it as requested.  I added a link to a strace of dash when
running the command for comparison sake.
Robert Pendell
shinji at elite-systems.org
A perfect world is one of chaos.
Keybase: http://keybase.io/shinji257


On Mon, Jun 8, 2015 at 11:25 AM, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> Interesting!  I can reproduce it trivially.
>
> This is most likely a result of the change to using direct io.  This causes a
> stat to return size 0.  Would you mind filing an issue at
> github.com/lxc/lxcfs/issues ?  I expect that a quick look at the cat and dash
> sources will show us whether dash needs a patch or whether lxcfs should be
> providing anohter hint about the fact that its /proc files should be read to
> get the full size.
>
> Quoting Robert Pendell (shinji at elite-systems.org):
>> Ok.  I'm left scratching a little.  When running under 0.9 (latest
>> code compiled from git) dash behaves in a weird way inside the
>> container.  This behavior is non reproducable on 0.7.  When doing the
>> same experiment using bash instead it does not reproduce so this is
>> application specific from what I can tell. Running strace on lxcfs did
>> give some interesting insight into this.
>>
>> While running this: read b c < /proc/uptime
>> from dash inside the container 0.7 gives appropriate data where 0.9
>> returns /0 for unknown reasons.
>> Using cat from dash works as expected.  Running that same command
>> above from within bash also gives the expected results.
>>
>> This discovery was made while using byobu since I had it reporting
>> uptime and after updating the binary it started reporting "s" for
>> uptime.
>>
>> Robert Pendell
>> shinji at elite-systems.org
>> A perfect world is one of chaos.
>> Keybase: http://keybase.io/shinji257
>> _______________________________________________
>> lxc-users mailing list
>> lxc-users at lists.linuxcontainers.org
>> http://lists.linuxcontainers.org/listinfo/lxc-users
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users


More information about the lxc-users mailing list