New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inside openvz 2.6.32 simfs container everything is always changed #28

haegar opened this Issue Jun 3, 2016 · 1 comment


2 participants

haegar commented Jun 3, 2016


Inside an openvz/virtuozzo container (here using their 2.6.32-042stab115.2 kernel), Debian Jessie as the system in the host, and Debian Unstable with needrestart 2.8-1 (same problem with the old jessie version) every service is always detected as using obsolet libs.

This is because between the real ext4 filesystem and the clients inside the container there is a virtual simfs filesystem providing some directory-tree-to-quota abstraction.

The stat() function call in this case returns the real inode number, but the device number of the virtual filesystem, which is an anonymous number using major number 0:

haegar@blackhole:~$ stat /bin/bash
File: ‘/bin/bash’
Size: 1105840 Blocks: 2160 IO Block: 4096 regular file
Device: f3h/243d Inode: 20461424 Links: 1

(The device number is different in each container, but always from special major number 0, same like proc or a tmpfs)

But the content of /proc/$pid/maps contains the real device number:

haegar@blackhole:~$ grep bash /proc/$$/maps
08048000-08151000 r-xp 00000000 fd:03 20461424 /bin/bash

With the attached dirty hack I was able to make needrestart work correctly inside (and outside) such containers, but it may not work correctly besides linux, as it is based on their major/minor split.


Openvz containers based on their newer "ploop" loopback mounting of a big image file instead of a directory tree do not need this change, but you loose a lot of diskspace.

@liske liske added the bug label Jun 4, 2016

@liske liske self-assigned this Jun 4, 2016

liske added a commit that referenced this issue Aug 25, 2016


This comment has been minimized.


liske commented Aug 25, 2016


I've revised and applied your patch, thanks!


@liske liske closed this Aug 25, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment