Skip to contentSkip to conversation

inotify_init failed

DISCUSSION Gabor Z. Papp 2 participants 8 messages Nov 11, 2008 – Nov 13, 2008

lore
Share & tools
lore
#0 lore raw

Hello,

with udev 132 I'm getting the error at line 869 in udevd.c:

                err(udev, "inotify_init failed: %m\n");

%m is "file or directory not found"

What for looking inotify_init?

#1 lore raw
Quoted 7 lines · Gabor Z. Papp

with udev 132 I'm getting the error at line 869 in udevd.c:

               err(udev, "inotify_init failed: %m\n");

%m is "file or directory not found"

What for looking inotify_init?

What kernel is it?

What architecture is it?

If you do:
killall udevd
strace /sbin/udevd
/sbin/udevd --daemon

What does the strace print while udevd is the inotify calls? It looks like this here:
...
inotify_init() = 3
inotify_add_watch(3, "/lib/udev/rules.d", ...) = 1 inotify_add_watch(3, "/etc/udev/rules.d", ...) = 2 inotify_add_watch(3, "/dev/.udev/rules.d", ...) = 3
...

Kay

#2 lore raw
In reply to Gabor Z. Papp

* "Kay Sievers" <[email protected]>:

| If you do:
|   killall udevd
|   strace /sbin/udevd
|   /sbin/udevd --daemon
| What does the strace print while udevd is the inotify calls? It looks
| like this here:
|   ...
|   inotify_init()                          = 3
|   inotify_add_watch(3, "/lib/udev/rules.d", ...) = 1
|   inotify_add_watch(3, "/etc/udev/rules.d", ...) = 2
|   inotify_add_watch(3, "/dev/.udev/rules.d", ...) = 3
|   ...

[...]
unlink("/dev/.udev/uevent_seqnum") = -1 ENOENT (No such file or directory)
open("/dev/.udev/queue", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory) open("/sys/kernel/uevent_seqnum", O_RDONLY|O_LARGEFILE) = 8
read(8, "1791\n", 31) = 5
close(8) = 0
stat64("/dev/.udev", {st_mode=S_IFDIR|0755, st_size0, ...}) = 0 open("/dev/.udev/uevent_seqnum", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 8

write(8, "1791\n", 5)                   = 5
close(8)                                = 0
fork()                                  = 2025
close(6)                                = 0
close(7)                                = 0
close(4)                                = 0
close(5)                                = 0
unlink("/dev/.udev/uevent_seqnum")      = 0

open("/dev/.udev/queue", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory) [2025] main: inotify_init failed: No such file or directory
exit_group(0) = ?
...

#3 lore raw
In reply to Gabor Z. Papp
Quoted 32 lines · Gabor Z. Papp

* "Kay Sievers" <[email protected]>:

| If you do:
|   killall udevd
|   strace /sbin/udevd
|   /sbin/udevd --daemon
| What does the strace print while udevd is the inotify calls? It looks
| like this here:
|   ...
|   inotify_init()                          = 3
|   inotify_add_watch(3, "/lib/udev/rules.d", ...) = 1
|   inotify_add_watch(3, "/etc/udev/rules.d", ...) = 2
|   inotify_add_watch(3, "/dev/.udev/rules.d", ...) = 3
|   ...

[...]
unlink("/dev/.udev/uevent_seqnum") = -1 ENOENT (No such file or directory)
open("/dev/.udev/queue", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory) open("/sys/kernel/uevent_seqnum", O_RDONLY|O_LARGEFILE) = 8
read(8, "1791\n", 31) = 5
close(8) = 0
stat64("/dev/.udev", {st_mode=S_IFDIR|0755, st_size0, ...}) = 0 open("/dev/.udev/uevent_seqnum", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0644) = 8

write(8, "1791\n", 5)                   = 5
close(8)                                = 0
fork()                                  = 2025
close(6)                                = 0
close(7)                                = 0
close(4)                                = 0
close(5)                                = 0
unlink("/dev/.udev/uevent_seqnum")      = 0
Quoted 3 lines

open("/dev/.udev/queue", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory) [2025] main: inotify_init failed: No such file or directory
exit_group(0) = ?

Ah, seems inotify headers from glibc have been not available during compilation of udev, and inotify got disabled. You can safely ignore the misleading error message, I fixed the message for the next version.

Thanks,
Kay

#4 lore raw
In reply to Gabor Z. Papp

* "Kay Sievers" <[email protected]>:

| Ah, seems inotify headers from glibc have been not available during
| compilation of udev, and inotify got disabled. You can safely ignore
| the misleading error message, I fixed the message for the next
| version.

GNU C Library stable release version 2.3.6, by Roland McGrath et al.

Which is the minimum required glibc release for compiling udev?

#5 lore raw
In reply to Gabor Z. Papp
Quoted 10 lines · Gabor Z. Papp

* "Kay Sievers" <[email protected]>:

| Ah, seems inotify headers from glibc have been not available during
| compilation of udev, and inotify got disabled. You can safely ignore
| the misleading error message, I fixed the message for the next
| version.

GNU C Library stable release version 2.3.6, by Roland McGrath et al.

Which is the minimum required glibc release for compiling udev?

There is no specific version required, configure checks if inotify is supported and disables if not, that's all. Glibc 2.5 added them, if I remember correctly, not sure, I have only glibc 2.8 installations here.

Kay

#6 lore raw
In reply to Gabor Z. Papp

* "Kay Sievers" <[email protected]>:

| > Which is the minimum required glibc release for compiling udev?

| There is no specific version required, configure checks if inotify is
| supported and disables if not, that's all. Glibc 2.5 added them, if I
| remember correctly, not sure, I have only glibc 2.8 installations
| here.

Should not this be printed somewhere at the end of configure? Thought inotify is an important feature in udev.

#7 lore raw
In reply to Gabor Z. Papp
Quoted 11 lines · Gabor Z. Papp

* "Kay Sievers" <[email protected]>:

| > Which is the minimum required glibc release for compiling udev?

| There is no specific version required, configure checks if inotify is
| supported and disables if not, that's all. Glibc 2.5 added them, if I
| remember correctly, not sure, I have only glibc 2.8 installations
| here.

Should not this be printed somewhere at the end of configure? Thought inotify is an important feature in udev.

It does here:
...
checking for inotify_init2 in -lc... no
configure: WARNING: inotify support disabled
...

Kay