From nobody@FreeBSD.org  Tue Dec 12 08:27:20 2000
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id A266B37B402
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Dec 2000 08:27:20 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id eBCGRK722272;
	Tue, 12 Dec 2000 08:27:20 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200012121627.eBCGRK722272@freefall.freebsd.org>
Date: Tue, 12 Dec 2000 08:27:20 -0800 (PST)
From: sdrew@home.com
Sender: nobody@FreeBSD.org
To: freebsd-gnats-submit@FreeBSD.org
Subject: processes die with SIGPROF, usually under heavy network load.
X-Send-Pr-Version: www-1.0

>Number:         23505
>Category:       kern
>Synopsis:       processes die with SIGPROF, usually under heavy network load.
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 12 08:30:01 PST 2000
>Closed-Date:    Sun Nov 18 08:49:51 PST 2001
>Last-Modified:  Tue Jan 15 09:50:00 PST 2002
>Originator:     Steve Drew
>Release:        4.1-RELEASE
>Organization:
>Environment:
FreeBSD devbox.cghh1.ab.wave.home.com 4.1-RELEASE FreeBSD 4.1-RELEASE #0: Thu Jul 27 04:44:16 GMT 2000     root@usw4.freebsd.org:/usr/src/sys/compile/GENERIC  i386


>Description:
Setting up freebsd firewalls and have noticed on multiple systems that natd and other processes simply disappear. After adding signal trapping code into natd and other processes it was revealed that they are being sent signal 27 (SIGPROF) by the kernel. This happens on multiple systems and has been seen on 3.4-STABLE and 4.0 and 4.1-RELEASE (every version that I have tried).
>How-To-Repeat:
The only way that I have found is to run a stress tool like Microsofts Web Stress tool simulating many clients web browsing through the FreeBSD firewall. After about 1 hour natd usually dies, sometimes named, sometimes syslog, etc..
>Fix:
I've added signal(SIGPROF,SIG_IGN) to natd, named etc and then they no longer die. This must be a kernel problem, ie kernel corruption of some sort. I have read at least one other problem report of someone having to remove the psignal(SIGPROF) in the (mp_machdep.c)/kernel to workaround this problem.

>Release-Note:
>Audit-Trail:

From: "Steve Drew" <sdrew@home.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <sdrew@home.com>
Cc:  
Subject: Re: kern/23505: processes die with SIGPROF, usually under heavy network load.
Date: Mon, 1 Jan 2001 11:04:58 -0700

 Correction, it was actually kern_clock.c I modifed to prevent processes from
 being killed off.
 
 /usr/src/sys/kern >diff kern_clock.c kern_clock.c.orig
 224,225c224
 <                       printf("attempted to send SIGPROF to pid
 %d\n",p->p_pid)
 ;
 <                       /*psignal(p, SIGPROF); */
 ---
 >                       psignal(p, SIGPROF);
 
 
 After making this change about a week later the following hits was observed
 in the syslog
 
 /var/log/syslog.log:Dec 30 09:49:15 firewall /kernel: attempted to send
 SIGPROF to pid 55305
 /var/log/syslog.log:Dec 30 22:43:25 firewall /kernel: attempted to send
 SIGPROF to pid 64583
 /var/log/syslog.log:Dec 31 09:33:28 firewall /kernel: attempted to send
 SIGPROF to pid 50306
 
 Like I mentioned I have seen this bug on at least 4 different freebsd
 machines.
 
 There must be other people also having this problem and just not knowing why
 they have processes disappearing. It is very intermittent, in my case it
 took over a week and then I got these 3 hits.
 
 Steve Drew.
 
 
State-Changed-From-To: open->closed 
State-Changed-By: iedowse 
State-Changed-When: Sun Nov 18 08:49:51 PST 2001 
State-Changed-Why:  

This is almost certainly the result of a per-process kernel stack 
overflow. The size of this stack was increased recently, so updating 
to a recent stable should solve to problem. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=23505 

From: "Drew, Steve" <Steve.Drew@Compaq.com>
To: <freebsd-gnats-submit@FreeBSD.org>, <sdrew@home.com>
Cc:  
Subject: Re: kern/23505: processes die with SIGPROF, usually under heavy network load.
Date: Tue, 15 Jan 2002 12:49:35 -0500

 This is a multi-part message in MIME format.
 
 ------_=_NextPart_001_01C19DEC.FECD87DC
 Content-Type: text/plain;
 	charset="US-ASCII"
 Content-Transfer-Encoding: quoted-printable
 
 FYI,
 =20
 Even with the UPAGES=3D2 on 4.5-PRE-RELEASE this problem still ocurrs.
 Although maybe only once or twice per week.
 =20
 I have modified kern_clock.c to record whenever it sends a SIGPROF, and
 it's sent a couple over a week, killing off the processes (nat, snort).
 =20
 Steve.
 =20
 
 ------_=_NextPart_001_01C19DEC.FECD87DC
 Content-Type: text/html;
 	charset="US-ASCII"
 Content-Transfer-Encoding: quoted-printable
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <HTML><HEAD><TITLE>Message</TITLE>
 <META http-equiv=3DContent-Type content=3D"text/html; =
 charset=3Dus-ascii">
 <META content=3D"MSHTML 5.50.4616.200" name=3DGENERATOR></HEAD>
 <BODY>
 <DIV><FONT face=3DArial size=3D2><SPAN=20
 class=3D802293917-15012002>FYI,</SPAN></FONT></DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN=20
 class=3D802293917-15012002></SPAN></FONT>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN class=3D802293917-15012002>Even =
 with the=20
 UPAGES=3D2 on 4.5-PRE-RELEASE this problem still ocurrs. Although maybe =
 only once=20
 or twice&nbsp;per week.</SPAN></FONT></DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN=20
 class=3D802293917-15012002></SPAN></FONT>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN class=3D802293917-15012002>I have =
 modified=20
 kern_clock.c to record whenever it sends a SIGPROF, and it's sent a =
 couple over=20
 a week, killing off the processes (nat, snort).</SPAN></FONT></DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN=20
 class=3D802293917-15012002></SPAN></FONT>&nbsp;</DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN=20
 class=3D802293917-15012002>Steve.</SPAN></FONT></DIV>
 <DIV><FONT face=3DArial size=3D2><SPAN=20
 class=3D802293917-15012002></SPAN></FONT>&nbsp;</DIV></BODY></HTML>
 =00
 ------_=_NextPart_001_01C19DEC.FECD87DC--
>Unformatted:
