Bug 12371

Summary: df & mount return nothing in Docker containers
Product: Busybox Reporter: Adrien <busybox>
Component: OtherAssignee: unassigned
Status: NEW ---    
Severity: normal CC: busybox-cvs
Priority: P5    
Version: 1.25.x   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

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