Skip to contentSkip to conversation

run_init: Fork:: No such file or directory

DISCUSSION Antoine Martin 3 participants 5 messages Oct 22, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi,

I've been running a system with SELinux enforcing mode for some time (Gentoo x86), but since yesterday I can't seem to use run_init to start daemons, it fails with:
Fork:: No such file or directory

When I straced it, I found that it is failing to open /dev/ptmx|pty?? :
open("/dev/ptmx", O_RDWR) = -1 EIO (Input/output error)
open("/dev/ptyp0", O_RDWR) = -1 ENXIO (No such device or
address)
open("/dev/ptyp1", O_RDWR) = -1 ENXIO (No such device or
address)
(...)
open("/dev/ptyef", O_RDWR) = -1 ENXIO (No such device or
address)

dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
brk(0)                                  = 0x804b000
brk(0x806c000)                          = 0x806c000

fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f17000
_llseek(3, 0, 0xbfc256e4, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "Fork:: No such file or directory"..., 33Fork:: No such file or directory
) = 33

close(3)                                = 0
munmap(0xb7f17000, 4096)                = 0
exit_group(71)                          = ?

Obviously, the devices are there and I'm not using devfs (kernel 2.6.13.4) /dev is static on ext3 /.
I am really stumped. I've tried rebuilding it, rebuilding the libraries it depends on, switched to non-enforcing mode, etc.. No luck Any ideas would be much appreciated.

Thanks
Antoine

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#1 lore raw

Next time, I'll wait before posting...
I can't explain why that fixed it, but I rebooted, relabeled and now everything works ok. I've had issues with ttys/ptys before, I guess this is what has happened here.
Not understanding the problem or the fix makes me nervous though.

Thanks
Antoine

Quoted 42 lines · Antoine Martin

Hi,

I've been running a system with SELinux enforcing mode for some time (Gentoo x86), but since yesterday I can't seem to use run_init to start daemons, it fails with:
Fork:: No such file or directory

When I straced it, I found that it is failing to open /dev/ptmx|pty?? :
open("/dev/ptmx", O_RDWR) = -1 EIO (Input/output error)
open("/dev/ptyp0", O_RDWR) = -1 ENXIO (No such device or
address)
open("/dev/ptyp1", O_RDWR) = -1 ENXIO (No such device or
address)
(...)
open("/dev/ptyef", O_RDWR) = -1 ENXIO (No such device or
address)

dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
brk(0)                                  = 0x804b000
brk(0x806c000)                          = 0x806c000

fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f17000
_llseek(3, 0, 0xbfc256e4, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "Fork:: No such file or directory"..., 33Fork:: No such file or directory
) = 33

close(3)                                = 0
munmap(0xb7f17000, 4096)                = 0
exit_group(71)                          = ?

Obviously, the devices are there and I'm not using devfs (kernel 2.6.13.4) /dev is static on ext3 /.
I am really stumped. I've tried rebuilding it, rebuilding the libraries it depends on, switched to non-enforcing mode, etc.. No luck Any ideas would be much appreciated.

Thanks
Antoine

Quoted 4 lines

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
Quoted 5 lines · Antoine Martin

Next time, I'll wait before posting...
I can't explain why that fixed it, but I rebooted, relabeled and now everything works ok. I've had issues with ttys/ptys before, I guess this is what has happened here.
Not understanding the problem or the fix makes me nervous though.

it is a quite common problem that is happening since around ~ 2.6.9. sometimes even ssh logins are impossible because of this bug ("can't open pty" error IIRC).

for me the only way to unlock the situation is to close all open ssh terminals left open toward that server. once that done, everything (including run_init behavior) returns to normal.

bye,
peter

Quoted 42 lines

Thanks
Antoine

Quoted 36 lines · Antoine Martin

Hi,

I've been running a system with SELinux enforcing mode for some time (Gentoo x86), but since yesterday I can't seem to use run_init to start daemons, it fails with:
Fork:: No such file or directory

When I straced it, I found that it is failing to open /dev/ptmx|pty?? :
open("/dev/ptmx", O_RDWR) = -1 EIO (Input/output error)
open("/dev/ptyp0", O_RDWR) = -1 ENXIO (No such device or
address)
open("/dev/ptyp1", O_RDWR) = -1 ENXIO (No such device or
address)
(...)
open("/dev/ptyef", O_RDWR) = -1 ENXIO (No such device or
address)

dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x2 (flags O_RDWR)
brk(0)                                  = 0x804b000
brk(0x806c000)                          = 0x806c000

fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f17000
_llseek(3, 0, 0xbfc256e4, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "Fork:: No such file or directory"..., 33Fork:: No such file or directory
) = 33

close(3)                                = 0
munmap(0xb7f17000, 4096)                = 0
exit_group(71)                          = ?

Obviously, the devices are there and I'm not using devfs (kernel 2.6.13.4) /dev is static on ext3 /.
I am really stumped. I've tried rebuilding it, rebuilding the libraries it depends on, switched to non-enforcing mode, etc.. No luck Any ideas would be much appreciated.

Signature · 4 lines
petre rodan
<[email protected]>
Developer,
Hardened Gentoo Linux 
#3 lore raw
In reply to Antoine Martin
Quoted 4 lines · Antoine Martin

I've been running a system with SELinux enforcing mode for some time (Gentoo x86), but since yesterday I can't seem to use run_init to start daemons, it fails with:
Fork:: No such file or directory

This problem should be fixed. As far as I know, the pty/idr_remove problem was only being caused in modules in selinux-base-policy, so make sure you're at least on selinux-base-policy-20050821.

More details:

http://marc.theaimsgroup.com/?l=selinux&m=112419712132326&w=2

Signature · 8 lines
Chris PeBenito
<[email protected]>
Developer,
Hardened Gentoo Linux
Embedded Gentoo Linux
 
Public Key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE6AF9243
Key fingerprint = B0E6 877A 883F A57A 8E6A  CB00 BC8E E42D E6AF 9243
#4 lore raw
Quoted 9 lines · Chris PeBenito
Quoted 4 lines · Antoine Martin

I've been running a system with SELinux enforcing mode for some time (Gentoo x86), but since yesterday I can't seem to use run_init to start daemons, it fails with:
Fork:: No such file or directory

This problem should be fixed. As far as I know, the pty/idr_remove problem was only being caused in modules in selinux-base-policy, so make sure you're at least on selinux-base-policy-20050821.

Yes:

      Latest version installed: 20050821

(as mentioned in another mail, I fixed by rebooting and relabeling)

Thanks
Antoine

Quoted 5 lines

More details:

http://marc.theaimsgroup.com/?l=selinux&m=112419712132326&w=2

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.