Skip to content
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

EINVAL on access(sys/fs/cgroup/systemd) since 2.0.0.rc8 #107

Closed
sts opened this issue Apr 20, 2016 · 6 comments
Closed

EINVAL on access(sys/fs/cgroup/systemd) since 2.0.0.rc8 #107

sts opened this issue Apr 20, 2016 · 6 comments

Comments

@sts
Copy link

sts commented Apr 20, 2016

Since lxcfs 2.0.0.rc8 the lxcfs fuse module overrides the access method and erroneously returns EINVAL when systemd in Debian/Jessie (215-17) tries to check access for /sys/fs/cgroup/systemd: This prevents successful startup of systemd:

access("/sys/fs/cgroup/systemd", F_OK) = -1 EINVAL (Invalid argument)

I'm attaching a strace of systemd during startup before it gets stuck at pause().

strace_systemd_215-17_lxcfs_2.0.0.rc8.txt

@sts
Copy link
Author

sts commented Apr 20, 2016

@hallyn committed a patch yesterday, changing the return value to EACCES, but after testing it did not resolve our issue.

Again, attached is a strace of systemd during startup before it gets stuck at pause():

strace_systemd_215-17_lxcfs_575316c4706e5600f3935e8245027f7de6222656.txt

@sts
Copy link
Author

sts commented Apr 20, 2016

I'm also attaching an strace of sytemd 215-17 during a successful startup with lxcfs 2.0.0.rc7! access() seems to return 0.

strace_systemd_215-17_lxcfs_2.0.0.rc7.txt

@hallyn hallyn closed this as completed in 3f441bc Apr 20, 2016
@sts
Copy link
Author

sts commented Apr 20, 2016

@hallyn sorry, the fix still did not resolve the issue. Its still returning:

access("/sys/fs/cgroup/systemd", F_OK)  = -1 EACCES (Permission denied)

@hallyn
Copy link
Member

hallyn commented Apr 20, 2016

Odd. It works for me here. can you strace lxcfs itself, do the access, and show the strace output here?

@hallyn hallyn reopened this Apr 20, 2016
@hallyn
Copy link
Member

hallyn commented Apr 20, 2016

Ok, I guess strace isn't very helpful. Better would be to run it in gdb and trace through the cg_attach() function to see where it returns the EACCESS.

@sts
Copy link
Author

sts commented Apr 20, 2016

Sorry there was a issue when applying the patch to our Debian package build. Commit 3f441bc actually already fixed it!

@sts sts closed this as completed Apr 20, 2016
stgraber pushed a commit that referenced this issue May 11, 2016
The previous patch actually didn't handle those, but only
/cgroup itself.

Closes #107

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants