Kernel crash w/o reason
Max Laier
max at love2party.net
Thu Dec 23 14:07:51 PST 2004
On Thursday 23 December 2004 22:44, Jan Engelhardt wrote:
> for some reason, the Freebsd (5.3) kernel crashes whenever I do "simple
> operations", in conjunction with a (self-written) kernel module.
>
> I have trimmed the original program down from approx 120 KB to the 7 KB
> (lots of spacing and tabs :) to follow the common advise to find the
> shortest codepiece showing the problem.
> Well, you can retrieve the short prog at
> http://linux01.org/~jengelh/BUG.tbz2 Both files (rpldev.c and rpld.c) seem
> perfectly fine, but ...
> see rpld.c for the details of the crash.
>
> Hope someone can shed some light on this.
1) In kmi_fops.d_open():
| if(!mtx_trylock(&Open_lock)) { return EBUSY; }
| return 0;
this can not work. You cannot return to userland with a lock acquired.
2) If you report a problem, try to provide an error message. In this case a
crashdump/panic string. When you do kernel programming you should always run
in a debug kernel. To debug this specific problem WITNESS is helpful.
3) The details about your specific problem here are insufficient.
4) Why on earth do you use gmake? What's wrong with bsd.*.mk? It's a whole lot
easier.
--
/"\ Best regards, | mlaier at freebsd.org
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier at EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20041223/3d28622f/attachment.bin
More information about the freebsd-hackers
mailing list