Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Sep 2006 20:58:03 +0200
From:      Anders Nordby <anders@fupp.net>
To:        FreeBSD-gnats-submit@FreeBSD.org, freebsd-threads@FreeBSD.org
Cc:        Thomas-Martin Seck <tmseck@netcologne.de>, Suleiman Souhlal <ssouhlal@FreeBSD.org>
Subject:   Re: threads/103127: Kernel panic while using thread features in Squid 2.6
Message-ID:  <20060913185803.GA27955@totem.fix.no>
In-Reply-To: <20060912195547.GA71462@totem.fix.no>
References:  <20060911075431.D12758D9874@fupp.net> <200609110800.k8B80ie3041853@freefall.freebsd.org> <20060912195547.GA71462@totem.fix.no>

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

--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

After talking with Pawel, I tried the attached patch to get some kqueue
debug info. I just got it:

Sep 13 20:18:56 cache3 kernel: NULL f_event in new kn
Sep 13 20:18:56 cache3 kernel: f_event == NULL

Then Squid stops responding to new requests, and I can not even kill it
with kill -9:

root@cache3:~# pgrep -l squid
547 squid
root@cache3:~# kill -9 547
root@cache3:~# pgrep -l squid
547 squid

Have to reboot to get the system working again, but it seems now it
doesn't panic.

Regards,

-- 
Anders.

--LZvS9be/3tNcYl/X
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="kqueue-debug.patch"

--- sys/kern/kern_event.c.orig	Wed Sep 13 08:44:57 2006
+++ sys/kern/kern_event.c	Wed Sep 13 08:51:03 2006
@@ -900,6 +900,8 @@
 				goto done;
 			}
 			KN_LIST_LOCK(kn);
+			if (kn->kn_fop->f_event == NULL)
+				printf("NULL f_event in new kn\n");
 		} else {
 			/*
 			 * The user may change some filter values after the
@@ -912,6 +914,8 @@
 			kn->kn_sfflags = kev->fflags;
 			kn->kn_sdata = kev->data;
 			kn->kn_kevent.udata = kev->udata;
+			if (kn->kn_fop->f_event == NULL)
+				printf("NULL f_event in existing kn\n");
 		}
 
 		/*
@@ -921,6 +925,12 @@
 		 * is called on a zombie process.  It will call filt_proc
 		 * which will remove it from the list, and NULL kn_knlist.
 		 */
+		if (kn->kn_fop->f_event == NULL) {
+			printf("f_event == NULL\n");
+			KN_LIST_UNLOCK(kn);
+			error = EAGAIN;
+			goto done;
+		}
 		event = kn->kn_fop->f_event(kn, 0);
 		KQ_LOCK(kq);
 		if (event)

--LZvS9be/3tNcYl/X--



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