From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 23 22:07:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BA6D16A4CE for ; Thu, 23 Dec 2004 22:07:51 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A1C643D2F for ; Thu, 23 Dec 2004 22:07:50 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1Chb7d-0000lb-00; Thu, 23 Dec 2004 23:07:49 +0100 Received: from [217.83.10.149] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1Chb7d-0005sj-00; Thu, 23 Dec 2004 23:07:49 +0100 From: Max Laier To: freebsd-hackers@freebsd.org Date: Thu, 23 Dec 2004 23:07:33 +0100 User-Agent: KMail/1.7.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2831018.LNFbnJmc60"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200412232307.41735.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 Subject: Re: Kernel crash w/o reason X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Dec 2004 22:07:51 -0000 --nextPart2831018.LNFbnJmc60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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= =20 crashdump/panic string. When you do kernel programming you should always ru= n=20 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=20 easier. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart2831018.LNFbnJmc60 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBy0GtXyyEoT62BG0RAvmqAJ0dkjwxj8IIWUz1OOD3R2UBKi4W2QCfc/Fz KCmwnFhQVyEQVQAZbFZfiuc= =W+jG -----END PGP SIGNATURE----- --nextPart2831018.LNFbnJmc60--