Return-Path: X-Original-To: apmail-trafficserver-dev-archive@www.apache.org Delivered-To: apmail-trafficserver-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 77E56713E for ; Sat, 27 Aug 2011 15:01:46 +0000 (UTC) Received: (qmail 63389 invoked by uid 500); 27 Aug 2011 15:01:46 -0000 Delivered-To: apmail-trafficserver-dev-archive@trafficserver.apache.org Received: (qmail 63281 invoked by uid 500); 27 Aug 2011 15:01:45 -0000 Mailing-List: contact dev-help@trafficserver.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@trafficserver.apache.org Delivered-To: mailing list dev@trafficserver.apache.org Received: (qmail 63273 invoked by uid 99); 27 Aug 2011 15:01:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Aug 2011 15:01:45 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of raysonlogin@gmail.com designates 209.85.210.46 as permitted sender) Received: from [209.85.210.46] (HELO mail-pz0-f46.google.com) (209.85.210.46) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 Aug 2011 15:01:39 +0000 Received: by pzk32 with SMTP id 32so6483828pzk.19 for ; Sat, 27 Aug 2011 08:01:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=bPFFlBXu8lZthF5W3sNiHS30vOFkrCoYoiazqtmLkQA=; b=xuT/2tfb/PV0BZXELLFcn34CoeoQwaHyhocNwzd8EYbuhQvGMXa9WgFm99zzuO3aMW kgqPT7NyAmTZ3mmTCfKZ3bTuMNAJhQd1Zglt912pirB3AZzVDCfQvm2HvUIi522cWuok PG5JOqlI0/LSvnep9B8p/Jn++HhZJN+JuTceI= MIME-Version: 1.0 Received: by 10.142.204.1 with SMTP id b1mr1267432wfg.15.1314457279629; Sat, 27 Aug 2011 08:01:19 -0700 (PDT) Received: by 10.142.103.1 with HTTP; Sat, 27 Aug 2011 08:01:19 -0700 (PDT) In-Reply-To: <4E58FE02.2070609@ogre.com> References: <1034914993.20110827003232@network-geographics.com> <4E58FE02.2070609@ogre.com> Date: Sat, 27 Aug 2011 11:01:19 -0400 Message-ID: Subject: Re: Getting traffic_server to dump core From: Rayson Ho To: dev@trafficserver.apache.org Content-Type: text/plain; charset=ISO-8859-1 There's also the setuid(2)/seteuid(2)/setguid(2)/seteguid(2) issue on Linux (the kernel does not dump core setXid programs). There are a few places that trafficserver calls those system calls (eg. in runAsUser()). There are 2 ways of working around this: 1) In Sun Grid Engine (now the commercial Oracle Grid Engine and the Open-Source Grid Engine project called Open Grid Scheduler) we use an LD_PRELOAD wrapper to reset the core-dump bit after those system calls are called. You might want to take a look at our wrapper: http://gridscheduler.sourceforge.net/patches/libcore.c % gcc -D_GNU_SOURCE -fPIC -c libcore.c % gcc -shared -o libcore.so libcore.o -lpthread Then LD_PRELOAD libcore.so into the application to enable core dump. 2) There is also a easier (but a bit less secure way), and enabling it could cause sensitive data to be dumped to disk as it is a system-wide setting: # sysctl -w kernel.core_setuid_ok=1 Rayson On Sat, Aug 27, 2011 at 10:24 AM, Leif Hedstrom wrote: > On 08/26/2011 11:32 PM, Alan M. Carroll wrote: >> >> I want to have traffic_server leave behind a core file when it crashes but >> can't seem to make it happen. I have >> >> * Used ulimit -c >> * Set the core limit high in /etc/security/limits.conf >> * Set proxy.config.core_limit to -1 >> * Verified that setrlimit is being called with a very large limit. >> * Set the permissions to 777 on INSTALL and INSTALL/bin. >> > > > Did you specify where it's should core dump? There's a sysctl for that. > > -- Leif > > ================================================== Open Grid Scheduler - The Official Open Source Grid Engine http://gridscheduler.sourceforge.net/