Bug 75935

Summary: systemd-nspawn: mknod() for /dev/console failed: Operation not permitted
Product: systemd Reporter: Joel Teichroeb <joel>
Component: generalAssignee: systemd-bugs
Status: RESOLVED FIXED QA Contact: systemd-bugs
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Proposed patch that seems to fix the issue

Description Joel Teichroeb 2014-03-09 02:16:41 UTC
When I run

systemd-nspawn -D /var/lib/archbuild/extra-x86_64/joel

It often returns
mknod() for /dev/console failed: Operation not permitted

But, it doesn't always return this.

If I add a usleep(10000); at nspawn.c:1822 in version 210, it always fails, but if I instead add it at 2131 it never fails.

I assume there is some kind of race condition happening here. I'll see if I can narrow it down a little more.
Comment 1 Joel Teichroeb 2014-03-09 20:46:55 UTC
Created attachment 95430 [details] [review]
Proposed patch that seems to fix the issue

This patch fixes the issue for me. I've never used eventfds before, so I'm not sure I did it right. I don't see a way to do bidirectional synchronization using a single eventfd, so I created a second one.
Comment 2 Lennart Poettering 2014-03-10 21:10:53 UTC
Fixed in git (as discussed on the ML).

Thanks for the patch!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.