Bug 75935 - systemd-nspawn: mknod() for /dev/console failed: Operation not permitted
Summary: systemd-nspawn: mknod() for /dev/console failed: Operation not permitted
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-09 02:16 UTC by Joel Teichroeb
Modified: 2014-03-10 21:10 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Proposed patch that seems to fix the issue (2.32 KB, patch)
2014-03-09 20:46 UTC, Joel Teichroeb
Details | Splinter Review

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.