Bug 12371 - df & mount return nothing in Docker containers
Summary: df & mount return nothing in Docker containers
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.25.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-28 13:23 UTC by Adrien
Modified: 2019-11-28 13:23 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien 2019-11-28 13:23:16 UTC
Hi,

When using Busybox in a container, under certain conditions `df` and `mount` return nothing.

I have the problem with the last Alpine release (`alpine:3.10.3`) as well as the Busybox one (`busybox:1.31.1-musl`).

I tried some old Busybox releases and it works with `busybox:1.24.2-musl` but no more starting with `busybox:1.25.0-musl`.


Here is a simple example:
```dockerfile
FROM busybox:1.25.0-musl

RUN mkdir /test0
RUN mkdir /test1
RUN mkdir /test2
RUN mkdir /test3
RUN mkdir /test4
RUN mkdir /test5
RUN mkdir /test6
RUN mkdir /test7
RUN mkdir /test8
RUN mkdir /test9
RUN mkdir /test10
RUN mkdir /test11
RUN mkdir /test12
```

Running this container gives that:
```bash
/ # mount
/ # df
Filesystem                Size      Used Available Use% Mounted on
/ #
```

But if I remove one `mkdir`, `mount` and `df` work.

With mkdir repeated 12 times:
```
# grep overlay /proc/mounts | wc -c
1006
```

With mkdir repeated 13 times:
```
# grep overlay /proc/mounts | wc -c
1060
```

I think it is related to the fact that the overlay line is more than 1024 characters.


Note that I think it is related to this issues too:
- https://gitlab.alpinelinux.org/alpine/aports/issues/5703
- https://gitlab.alpinelinux.org/alpine/aports/issues/7093

Best,
Adrien