From owner-freebsd-bugs Wed Feb 19 06:50:08 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA26200 for bugs-outgoing; Wed, 19 Feb 1997 06:50:08 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA26193; Wed, 19 Feb 1997 06:50:03 -0800 (PST) Resent-Date: Wed, 19 Feb 1997 06:50:03 -0800 (PST) Resent-Message-Id: <199702191450.GAA26193@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, j@ida.interface-business.de 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 ; 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 ; 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 Reply-To: j@ida.interface-business.de To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/2768: ktrace(1) -i dumps corrupted trace data Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2768 >Category: kern >Synopsis: ktrace(1) -i dumps corrupted trace data >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Feb 19 06:50:02 PST 1997 >Last-Modified: >Originator: J Wunsch >Organization: interface business GmbH, Dresden >Release: FreeBSD 2.2-GAMMA i386 >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. >Audit-Trail: >Unformatted: