rootfs removed when opening a socket

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I'm working on a minimal embedded system where I intend to use the
initramfs as rootfs with /init implementing the entire system. I have
no need to mount another file system as rootfs.

Yesterday I noticed that the rootfs was removed about 10 minutes after
power on. It was just gone. After a few hours of debugging I noticed
that inodes started to be evicted at the same time as the rootfs was
removed. It turned out that my application periodically opens sockets
which are never closed, and as each socket allocates an inode, the
system eventually runs out of inodes (I think) and starts evicting old
ones to be able to open another socket. Now, as I understand it, the
evicted inodes were used by the rootfs, which could explain why the
rootfs was removed.

I am a bit surprised that opening a socket can result in removing the
rootfs. Is this the intended behavior?

I'm using kernel 5.5.7 with a minimal configuration on X86_64 QEMU.
The configuration can be found here:
https://github.com/eerimoq/monolinux-example-project/blob/master/app/linux-x86_64.config

/ Erik



[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux