From: ing. Federico Fuga <fuga@studiofuga.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] udev inotify problem (illegal instruction in arm)
Date: Thu, 15 Nov 2007 16:20:18 +0100 [thread overview]
Message-ID: <473C63B2.4070308@studiofuga.com> (raw)
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
reply other threads:[~2007-11-15 15:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=473C63B2.4070308@studiofuga.com \
--to=fuga@studiofuga.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox