Re: Kernel crash w/o reason

From: Daniel Eischen (deischen_at_freebsd.org)
Date: 12/23/04

  • Next message: Jan Engelhardt: "Re: Kernel crash w/o reason"
    Date: Thu, 23 Dec 2004 17:12:06 -0500 (EST)
    To: Jan Engelhardt <jengelh@linux01.gwdg.de>
    
    

    On Thu, 23 Dec 2004, Jan Engelhardt wrote:

    > Hello list,
    >
    >
    > 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.

    I don't think you are suppose to leave the kernel with mutex(es)
    held. A mutex is a short term lock, and at best you are abusing
    it's intended use. Moreover, I don't think you should leave the
    kernel with _any_ kernel synchronization object held. In the case
    of the mutex, the thread performing the close() may not be the
    thread that did the open() and which owns the mutex.

    -- 
    DE
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
    

  • Next message: Jan Engelhardt: "Re: Kernel crash w/o reason"

    Relevant Pages

    • [ANNOUNCE] Linux 2.6 Real Time Kernel - 2 (Mutex Patch)
      ... and the Linux system semaphore. ... +and task preemption latency in the current 2.6 kernel series. ... +- Priority Interiting Kernel Mutex substituting spinlocks in critical regions. ...
      (Linux-Kernel)
    • [PATCH 4/8] adaptive real-time lock support
      ... The Real Time patches to the Linux kernel converts the architecture ... compromising the integrity of critical sections protected by the lock. ... while retaining both the priority inheritance protocol as well as the ... the RT Mutex has been ...
      (Linux-Kernel)
    • Re: Priority Inheritance Test (Real-Time Preemption)
      ... That would indeed demand that the kernel would be Oin a lot of places ... subsystems can be used in real-time applications as well. ... resources with non-real-time applications. ... if the same mechanism is used for a userspace mutex there will be ...
      (Linux-Kernel)
    • [PATCH [RT] 00/14] RFC - adaptive real-time locks
      ... The Real Time patches to the Linux kernel converts the architecture ... inheritance protocol, and priority-ordered wait queues. ... contended lock to be preempted by higher priority tasks without ... the RT Mutex has been modified to busy-wait under ...
      (Linux-Kernel)
    • [patch 00/15] Generic Mutex Subsystem
      ... generic mutex subsystem that we have in the -rt kernel, ... 'simple mutex' code recently posted by David Howells.) ... 'struct mutex' is 16 bytes. ... than the semaphore based kernel, _and_ it also had 2.8 times less CPU ...
      (Linux-Kernel)