Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Jun 2008 07:53:35 GMT
From:      Jian Qiu <swordqiu@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   i386/124544: kernel panic in kern_lockf.c line 294
Message-ID:  <200806130753.m5D7rZr7026859@www.freebsd.org>
Resent-Message-ID: <200806130800.m5D80995032241@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         124544
>Category:       i386
>Synopsis:       kernel panic in kern_lockf.c line 294
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-i386
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 13 08:00:09 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Jian Qiu
>Release:        7.0-RELEASE
>Organization:
Huawei Corp.
>Environment:
FreeBSD routerOS12 7.0-RELEASE FreeBSD 7.0-RELEASE #5: Fri Jun 13 14:53:00 CST 2008     qj@routerOS12:/usr/obj/usr/src/sys/KERN_ULE  i386

>Description:
I wrote a program to test the multi-process multi-threading performance of FreeBSD and libthr. In the program, I used two file locks to synchronize the processes and a mmap shared memory to do IPC. However, the program can cause kernel panic randomly. I used kgdb to check the resuling core dump. It showed kernel was trapped in kern_lockf.c line 294, where it apparently refers to a NULL pointer. Here is the code around line 294:

292:     waitblock = (struct lockf *)td->td_wchan;
293:     /* Get the owner of the blocking lock */
294:     waitblock = waitblock->lf_next;
295:     if ((waitblock->lf_flags & F_POSIX) == 0)
296:          break;
297:     nproc = (struct proc *)waitblock->lf_id;

>How-To-Repeat:
Run my program repeatedly. Sometimes, it will cause kernel panic.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806130753.m5D7rZr7026859>