From owner-freebsd-ports@FreeBSD.ORG Fri Aug 27 17:07:42 2010 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2DEC010656BB for ; Fri, 27 Aug 2010 17:07:42 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta04.westchester.pa.mail.comcast.net (qmta04.westchester.pa.mail.comcast.net [76.96.62.40]) by mx1.freebsd.org (Postfix) with ESMTP id E25268FC19 for ; Fri, 27 Aug 2010 17:07:41 +0000 (UTC) Received: from omta15.westchester.pa.mail.comcast.net ([76.96.62.87]) by qmta04.westchester.pa.mail.comcast.net with comcast id zPTE1e0081swQuc54UuSBT; Fri, 27 Aug 2010 16:54:26 +0000 Received: from koitsu.dyndns.org ([98.248.41.155]) by omta15.westchester.pa.mail.comcast.net with comcast id zUuQ1e00J3LrwQ23bUuQRR; Fri, 27 Aug 2010 16:54:26 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 2AA609B425; Fri, 27 Aug 2010 09:54:23 -0700 (PDT) Date: Fri, 27 Aug 2010 09:54:23 -0700 From: Jeremy Chadwick To: Glen Barber Message-ID: <20100827165423.GA32102@icarus.home.lan> References: <4C77DB15.5010501@gmail.com> <20100827163310.GD67795@home.opsec.eu> <4C77EBF8.9020405@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C77EBF8.9020405@gmail.com> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: ports@freebsd.org, Kurt Jaeger Subject: Re: security/clamav: Segmentation fault when running clamav in a 32-bit jail on a 64-bit host X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Aug 2010 17:07:42 -0000 On Fri, Aug 27, 2010 at 12:46:48PM -0400, Glen Barber wrote: > On 8/27/10 12:33 PM, Kurt Jaeger wrote: > > Hi! > > > >> I have a few clamav instances running in jails on 32-bit hosts without > >> any issues. A few days ago one of these jails was migrated to a 64-bit > >> host (8.1-RELEASE), where I noticed clamd (0.96.2_1) segfaults when queried. > >> > >> The issue seems specific to 32bit/64bit compatibility. I have a gdb > >> session available here: http://gist.github.com/549964 > >> > >> Any thoughts on if this is possible? > > > > Try > > > > Bytecode no > > > > in clamd.conf ? > > > > It was set to 'yes' initially. I thought it was disabled with building > without JIT. At any rate, no, it still segfaults with the same backtrace. 1) Is clamd built with debugging symbols enabled? If not, you might want to rebuild it with such, else it might be difficult to debug the problem. Also, if the segfault happens after performing the above, can you provide output from "bt full" instead of just "bt"? 2) Was the software rebuilt from source after the upgrade from i386 to amd64, or are you expecting the software to work without any hitches running on amd64 with lib32 (32-bit compatibility libaries)? The latter is not always possible/the case. I have no familiarity with the software or functions in question, but an initial guess would be that some piece of the code is making assumptions about the size of pointers (expecting 4 (32-bit) rather than 8 (64-bit)). Speculative on my part, but I ponder such when seeing code like somefunc(sizeof(int)). -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |