From j@ida.interface-business.de  Wed Feb 19 06:43:22 1997
Received: from innocence.interface-business.de (innocence.interface-business.de [193.101.57.202])
          by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id GAA25958
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 1997 06:43:20 -0800 (PST)
Received: from ida.interface-business.de (ida.interface-business.de [193.101.57.203]) by innocence.interface-business.de (8.6.11/8.6.9) with SMTP id PAA17105 for <FreeBSD-gnats-submit@freebsd.org>; Wed, 19 Feb 1997 15:39:22 +0100
Received: (from j@localhost) by ida.interface-business.de (8.8.5/8.7.3) id PAA01363; Wed, 19 Feb 1997 15:43:12 +0100 (MET)
Message-Id: <199702191443.PAA01363@ida.interface-business.de>
Date: Wed, 19 Feb 1997 15:43:12 +0100 (MET)
From: J Wunsch <j@ida.interface-business.de>
Reply-To: j@ida.interface-business.de
To: FreeBSD-gnats-submit@freebsd.org
Subject: ktrace(1) -i dumps corrupted trace data
X-Send-Pr-Version: 3.2

>Number:         2768
>Category:       kern
>Synopsis:       ktrace(1) -i dumps corrupted trace data
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gabor
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 19 06:50:02 PST 1997
>Closed-Date:    Tue Jan 09 13:12:43 GMT 2007
>Last-Modified:  Tue Jan 09 13:12:43 GMT 2007
>Originator:     J Wunsch
>Release:        FreeBSD 2.2-GAMMA i386
>Organization:
interface business GmbH, Dresden
>Environment:

FreeBSD 2.2-GAMMA, probably any other version as well.

>Description:

Running ktrace -i on a process that becomes a daemon and then heavily
forks off children causes parts of the ktrace.out file being
corrupted.  In my case, the ktrace file started with 25160 NUL bytes
before the first usable entry could be found, and the behaviour to
sprinkle the trace file with odd numbers of NUL bytes continued
throughout the entire trace.  No useful pattern could be guessed where
it happens, but i suspect it is related to process switching.  By
manually deleting the junk, i've been able to reveal some usable
entries, but judging from the data contents of the dump it seems the
NUL bytes have been clobbering valid entries (as opposed to being put
in there in excess of the other dump data).


>How-To-Repeat:

Run ktrace -i on something that often forks off children.  In my case,
it's been syslogd with the (yet inofficial) log-to-pipe extensions,
but i assume something similar would happen e.g. for inetd.

A typical symptom is:

j@ida 142% kdump -f /tmp/syslogd.trace 
1937075797 ed
kdump: Cannot allocate memory.
at-7            207/udp    #AppleTal@ UNKNOWN(27745)  j@ida 143% 


>Fix:

Not known.  Maybe a VM problem?  However, 25160 ain't a mulitple of
the page size either.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: johan 
State-Changed-When: Fri Oct 27 12:35:11 PDT 2000 
State-Changed-Why:  
Hi 

Is this still a problem in more recent releases of FreeBSD 
(for example 4.1-RELEASE)? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=2768 

From: Bruce Evans <bde@zeta.org.au>
To: johan@FreeBSD.ORG
Cc: j@ida.interface-business.de, freebsd-gnats-submit@FreeBSD.ORG
Subject: Re: kern/2768: ktrace(1) -i dumps corrupted trace data
Date: Sat, 28 Oct 2000 16:39:53 +1100 (EST)

 > Is this still a problem in more recent releases of FreeBSD
 > (for example 4.1-RELEASE)?
 
 I don't know what caused it in PR 2768, but I have seen it in -current
 when the ktrace output is written to an nfs filesystem.  It seemed to
 be caused by rev.1.37 of kern_ktrace.c.  ktrwrite() needs to write the
 header and the record atomically, but doesn't.
 
 Bruce
 
 
State-Changed-From-To: feedback->open 
State-Changed-By: johan 
State-Changed-When: Sat Oct 28 02:40:10 PDT 2000 
State-Changed-Why:  
According to Bruce this is still a problem in 
5-Current. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=2768 
State-Changed-From-To: open->feedback 
State-Changed-By: gabor 
State-Changed-When: Mon Dec 25 21:11:45 UTC 2006 
State-Changed-Why:  
Dear Submitter, 

could you please confirm if this issue still exists in a recent 
FreeBSD release? 

Regards, 
Gabor Kovesdan 


Responsible-Changed-From-To: freebsd-bugs->gabor 
Responsible-Changed-By: gabor 
Responsible-Changed-When: Mon Dec 25 21:11:45 UTC 2006 
Responsible-Changed-Why:  
Dear Submitter, 

could you please confirm if this issue still exists in a recent 
FreeBSD release? 

Regards, 
Gabor Kovesdan 

http://www.freebsd.org/cgi/query-pr.cgi?pr=2768 
State-Changed-From-To: feedback->closed 
State-Changed-By: gabor 
State-Changed-When: Tue Jan 9 13:12:30 UTC 2007 
State-Changed-Why:  
Fedback timeout. If this problem shows up again, please feel 
free to submit a follow-up to this PR ticket, so that we can re-open it 
and find a solution for the problem. 

Regards, 
Gabor Kovesdan 

http://www.freebsd.org/cgi/query-pr.cgi?pr=2768 
>Unformatted:
