From mboxrd@z Thu Jan 1 00:00:00 1970 From: ing. Federico Fuga Date: Thu, 15 Nov 2007 16:20:18 +0100 Subject: [Buildroot] [PATCH] udev inotify problem (illegal instruction in arm) Message-ID: <473C63B2.4070308@studiofuga.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net 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=, argv=, envp=) at udev_sysdeps.h:116 (gdb) we see in that file: /* needed until /usr/include/sys/inotify.h is working */ #ifdef __UCLIBC__ #include #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