From owner-freebsd-questions@FreeBSD.ORG Tue Jan 19 18:35:14 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A65651065696 for ; Tue, 19 Jan 2010 18:35:14 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from asmtpout027.mac.com (asmtpout027.mac.com [17.148.16.102]) by mx1.freebsd.org (Postfix) with ESMTP id 8EF288FC1D for ; Tue, 19 Jan 2010 18:35:14 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii Received: from cswiger1.apple.com ([17.227.140.124]) by asmtp027.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KWI00EVNBMDZU60@asmtp027.mac.com> for questions@freebsd.org; Tue, 19 Jan 2010 10:35:02 -0800 (PST) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-1001190145 From: Chuck Swiger X-Priority: 3 (Normal) In-reply-to: Date: Tue, 19 Jan 2010 10:35:00 -0800 Message-id: <6C738BD4-71EE-4F34-8DB5-ABDB45A06C89@mac.com> References: To: Doug Poland X-Mailer: Apple Mail (2.1077) Cc: questions Questions Subject: Re: Trouble getting a core dump from clamd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2010 18:35:14 -0000 Hi-- On Jan 19, 2010, at 10:04 AM, Doug Poland wrote: > No joy. > > # sysctl kern.corefile=/var/crash/clamd.core > # /usr/local/etc/rc.d/clamav-clamd start > Starting clamav_clamd. > Segmentation fault > # ll /var/crash > total 2 > -rw-r--r-- 1 root wheel 5 Apr 10 2005 minfree Please see "man 5 core"; in particular, clamd changes userid: By default, a process that changes user or group credentials whether real or effective will not create a corefile. This behaviour can be changed to generate a core dump by setting the sysctl(8) variable kern.sugid_coredump to 1. ...so you will need to toggle that sysctl also. I'd suggest doing something more like: mkdir /cores chmod 1777 /cores sysctl kern.sugid_coredump=1 sysctl kern.corefile=/cores/%N.%P.core ...but adjust the path to be under /var or /usr if free diskspace makes doing so necessary. Regards, -- -Chuck