From owner-freebsd-questions@freebsd.org Thu Jun 10 00:50:18 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 657206570D3 for ; Thu, 10 Jun 2021 00:50:18 +0000 (UTC) (envelope-from jkeenan@pobox.com) Received: from pb-smtp21.pobox.com (pb-smtp21.pobox.com [173.228.157.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4G0lkd1r0fz4XBG for ; Thu, 10 Jun 2021 00:50:16 +0000 (UTC) (envelope-from jkeenan@pobox.com) Received: from pb-smtp21.pobox.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 863D913DFD8 for ; Wed, 9 Jun 2021 20:50:15 -0400 (EDT) (envelope-from jkeenan@pobox.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=pobox.com; h=to:from :subject:message-id:date:mime-version:content-type :content-transfer-encoding; s=sasl; bh=T67oUpm4FssmnNsGEJ5iM2txl Rwupdgxbip13KNKHSk=; b=ubOB16ZoTfuXm9v0egZJVwIyOMXnpGdcvFduVbhxD hO1Yy3eOnLLQ6D4j2CUuRbyumnnmDzu/85PdTjFAya+KXU4EYUtCs1X28+CByF+e HWOscJht6IQ7nw7nhz8fWadNOQTsPEKjntrk2uY5+skOkgRmkK59njXJEH8aZT57 YQ= Received: from pb-smtp21.sea.icgroup.com (unknown [127.0.0.1]) by pb-smtp21.pobox.com (Postfix) with ESMTP id 8039F13DFD7 for ; Wed, 9 Jun 2021 20:50:15 -0400 (EDT) (envelope-from jkeenan@pobox.com) Received: from [192.168.1.4] (unknown [24.185.115.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pb-smtp21.pobox.com (Postfix) with ESMTPSA id F1D7413DFD6 for ; Wed, 9 Jun 2021 20:50:12 -0400 (EDT) (envelope-from jkeenan@pobox.com) To: freebsd-questions@freebsd.org From: James E Keenan Subject: Can I avoid logging a message in /var/log/messages when testing core dumps? Message-ID: Date: Wed, 9 Jun 2021 20:50:11 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Pobox-Relay-ID: D08E7ADA-C985-11EB-8751-FA9E2DDBB1FC-57062903!pb-smtp21.pobox.com X-Rspamd-Queue-Id: 4G0lkd1r0fz4XBG X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=pobox.com header.s=sasl header.b=ubOB16Zo; dmarc=pass (policy=none) header.from=pobox.com; spf=pass (mx1.freebsd.org: domain of jkeenan@pobox.com designates 173.228.157.53 as permitted sender) smtp.mailfrom=jkeenan@pobox.com X-Spamd-Result: default: False [-1.10 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:173.228.157.0/24]; TO_DN_NONE(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_TRACE(0.00)[pobox.com:+]; DMARC_POLICY_ALLOW(-0.50)[pobox.com,none]; NEURAL_HAM_SHORT(-1.00)[-0.999]; RCVD_IN_DNSWL_LOW(-0.10)[173.228.157.53:from]; SUBJECT_ENDS_QUESTION(1.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[173.228.157.53:from]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[pobox.com:dkim]; RCVD_TLS_LAST(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[pobox.com:s=sasl]; RECEIVED_SPAMHAUS_PBL(0.00)[24.185.115.142:received]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:11403, ipnet:173.228.157.0/24, country:US]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[173.228.157.53:from:127.0.2.255]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 00:50:18 -0000 I am writing to try to understand a difference in logging behavior between FreeBSD on the one hand and other OSes such as Linux and OpenBSD on the other. Context: Smoke-testing of commits to the development branch of the Perl 5 core distribution. File: t/op/dump.t (https://github.com/Perl/perl5/blob/d8ff3e95e0f2357b6f26f5a94c52c46231fb1a74/t/op/dump.t) Problem: When this test file is run on FreeBSD, core is dumped -- which is intended -- and a message is logged to /var/log/messages -- which is not intended. When the test file is run on either Linux or OpenBSD, core is dumped but no message is logged to /var/log/messages. This fills up the smoke-tester's log with messages that do not, for the purpose of testing, need to be logged. Reproduce: In one terminal, 'tail -f /var/log/messages`. In another terminal, run the following program. ##### $ cat coredump.pl ++$|; my $pid = fork; die "fork: $!\n" unless defined $pid; if ($pid) { # parent waitpid($pid, 0); } else { print qq(A); CORE::dump foo; foo: print qq(B); } ##### On FreeBSD, a record like the following is added to /var/log/messages: ##### Jun 10 00:35:18 perlmonger kernel: pid 58220 (perl), jid 0, uid 1002: exited on signal 6 (core dumped) ##### Since the message is spurious from the point of view of smoke-testing, we would like to be able to suppress it. Is there a FreeBSD-specific rationale for this logging? Is there any way to suppress this log message? Thank you very much. Jim Keenan