Date: Wed, 13 Sep 2006 19:00:43 GMT From: Anders Nordby <anders@fupp.net> To: freebsd-threads@FreeBSD.org Subject: Re: threads/103127: Kernel panic while using thread features in Squid 2.6 Message-ID: <200609131900.k8DJ0hkR019043@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/103127; it has been noted by GNATS. From: Anders Nordby <anders@fupp.net> To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-threads@FreeBSD.org Cc: Suleiman Souhlal <ssouhlal@FreeBSD.org>, Pawel Worach <pawel.worach@gmail.com>, Thomas-Martin Seck <tmseck@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@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?200609131900.k8DJ0hkR019043>