* [Buildroot] [PATCH] udev inotify problem (illegal instruction in arm)
@ 2007-11-15 15:20 ing. Federico Fuga
0 siblings, 0 replies; only message in thread
From: ing. Federico Fuga @ 2007-11-15 15:20 UTC (permalink / raw)
To: buildroot
Hi,
I finnally traced the problem I had with udev on an em-x270 board, that caused the udevd to crash when executed with an illegal instruction exception.
When executed, udevd crashes in udev_sysdeps.h line 116 (see the gdb dump)
Core was generated by `./udevd'.
Program terminated with signal 4, Illegal instruction.
#0 0x40016cc0 in syscall () from /lib/libc.so.0
(gdb) bt
#0 0x40016cc0 in syscall () from /lib/libc.so.0
#1 0x0000a9b4 in main (argc=<value optimized out>,
argv=<value optimized out>, envp=<value optimized out>)
at udev_sysdeps.h:116
(gdb)
we see in that file:
/* needed until /usr/include/sys/inotify.h is working */
#ifdef __UCLIBC__
#include <sys/inotify.h>
#else
static inline int inotify_init(void)
{
return syscall(__NR_inotify_init);
}
static inline int inotify_add_watch(int fd, const char *name, uint32_t mask)
{
return syscall(__NR_inotify_add_watch, fd, name, mask);
}
#endif /* __GLIBC__ */
As we can see from the comment, the call through the syscall is needed since glibc is (probably) broken on defining the inotify_init and add_watch function.
But under uclibc it seems to work, (sorry, just few test made), so I propose to change the #ifndef GLIBC to an #ifdef UCLIBC.
So the attached patch.
I will keep you informed about the tests, but at least now udevd doesn't crash anymore.
Regard,
ing. Federico Fuga
-------------- next part --------------
A non-text attachment was scrubbed...
Name: udev-inotify-uclibc.patch
Type: text/x-patch
Size: 315 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20071115/b80044f7/attachment.bin
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-15 15:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-15 15:20 [Buildroot] [PATCH] udev inotify problem (illegal instruction in arm) ing. Federico Fuga
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.