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

lx: mkfifo blocks forever in Gentoo LX zone #967

Open
ismell opened this issue Dec 11, 2020 · 1 comment
Open

lx: mkfifo blocks forever in Gentoo LX zone #967

ismell opened this issue Dec 11, 2020 · 1 comment

Comments

@ismell
Copy link

ismell commented Dec 11, 2020

SmartOS version: 20201118T153314Z

Install the gentoo lx zone from here: https://github.com/ismell/gentoo-lx-brand-image-builder

Then try the following:

mkfifo -m 600 /tmp/foo3

The command will block forever.

Using truss we can see the brand call that blocks:

# /native/usr/bin/truss mkfifo -m 600 /tmp/foo3
...

lwp_sigmask(SIG_SETMASK, 0x00000000, 0x00000000, 0x00000000, 0x00000000) = 0xFFBFFEFF [0xFFFFFFFF]
mmap(0x00000000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, 4294967295, 0) = 0x7FFFEF0D0000
getcontext(0x7FFFEF0D0040)
sysconfig(_CONFIG_STACK_PROT)			= 3
mmap(0x00000000, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, 4294967295, 0) = 0x7FFFEF08F000
brand(147, 0x7FFFEF0CF000, 0x7FFFEF392E80, 0xFFFFFFFF, 0x00000000) = 0
getcontext(0x7FFFFFEFEE60)
brand(139, 0x7FFFFFEFEE60, 0x00000000, 0x00000000, 0x000003FF) = 0
mknod("/tmp/foo9", 010600, 0x00000000)		= 0
brand(130, 0x7FFFEF0CECA0, 0x00000085, 0x00000000, 0x00000000) = 0
@jasonbking
Copy link
Contributor

Currently, mknod() in LX is a no-op (since most stuff shouldn't need to be talking to drivers directly). That's almost certainly part of the problem. I suspect it wouldn't be too difficult to allow FIFOs, and either ignore or error for other types of devices.

That LX mknod doesn't return an error today leads me to believe there's probably software out there that do try to create explicit device nodes that will fail if it returns an error, but otherwise seems to ignore it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants