threads/103127: Kernel panic while using thread features in
Squid 2.6
Anders Nordby
anders at fupp.net
Wed Sep 13 12:00:50 PDT 2006
The following reply was made to PR kern/103127; it has been noted by GNATS.
From: Anders Nordby <anders at fupp.net>
To: FreeBSD-gnats-submit at FreeBSD.org, freebsd-threads at FreeBSD.org
Cc: Suleiman Souhlal <ssouhlal at FreeBSD.org>,
Pawel Worach <pawel.worach at gmail.com>,
Thomas-Martin Seck <tmseck at netcologne.de>
Subject: Re: threads/103127: Kernel panic while using thread features in Squid 2.6
Date: Wed, 13 Sep 2006 20:58:03 +0200
--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 at cache3:~# pgrep -l squid
547 squid
root at cache3:~# kill -9 547
root at 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--
More information about the freebsd-threads
mailing list