From owner-freebsd-ports@FreeBSD.ORG Fri Aug 27 18:35:24 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 C90F61065698 for ; Fri, 27 Aug 2010 18:35:24 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6EBB18FC12 for ; Fri, 27 Aug 2010 18:35:24 +0000 (UTC) Received: by vws7 with SMTP id 7so3650166vws.13 for ; Fri, 27 Aug 2010 11:35:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=YQ35tRlJBNXmbP15zuTqY83ypCGoqO5CJBBC09Oyg0Q=; b=Zm5Y/xJmTkpx2SEkIZ7/KZHWseWrRMHu4qqV8P1Oadg6g383nt9AzwBrdI+6mtW0NU +RzKGXl0w1WIAqFvHXUp0xRDL/o7UAax9yemrExQML7tmNDAD/Ox9UlQAFlzakkKcg9n bMdsfRv29EsDJS9aE5RePVW0B4YAWr2rdLOwA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=K+obvaoHdaWIyWn5YckJvvIKEhe/7SL3jyTmr1THud4To7KB1UGnBRkwgleSN5WDf9 fzdfnASSV8lulR6k1Yt6U8GmGPvupA1AGm4MXZtMZ25fKxCKHGjjKFqcsHBnl3Z3Anz8 1a358/nD8onFFnFVqZEM8TLRsxsek+KzjVsm4= Received: by 10.220.122.31 with SMTP id j31mr676940vcr.271.1282934118042; Fri, 27 Aug 2010 11:35:18 -0700 (PDT) Received: from schism.local (173-161-130-225-Philadelphia.hfc.comcastbusiness.net [173.161.130.225]) by mx.google.com with ESMTPS id i23sm1779041vcr.10.2010.08.27.11.35.15 (version=SSLv3 cipher=RC4-MD5); Fri, 27 Aug 2010 11:35:15 -0700 (PDT) Message-ID: <4C780562.3050509@gmail.com> Date: Fri, 27 Aug 2010 14:35:14 -0400 From: Glen Barber User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 MIME-Version: 1.0 To: Jeremy Chadwick References: <4C77DB15.5010501@gmail.com> <20100827163310.GD67795@home.opsec.eu> <4C77EBF8.9020405@gmail.com> <20100827165423.GA32102@icarus.home.lan> <4C77F0A9.6030807@gmail.com> <20100827173210.GA33018@icarus.home.lan> <4C77FCC1.9070906@gmail.com> <20100827182030.GA34525@icarus.home.lan> In-Reply-To: <20100827182030.GA34525@icarus.home.lan> X-Enigmail-Version: 1.1.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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 18:35:24 -0000 On 8/27/10 2:20 PM, Jeremy Chadwick wrote: >> To be honest, this is the first non-base software I've had an issue with >> in a mixed-arch environment. > > Okay, so it's sort of what I thought. Your system has a series of > include files on it that are for amd64 (64-bit), but clamav, when built > within a 32-bit jail on that system, is (probably -- no proof, but it's > an educated guess based on what's happening) detecting some 64-bit > pieces through include files and making some incorrect assumptions about > the size of some types. > > I'd really need to set up a testbed system/VM and get full instructions > from start to finish on how to set up a 32-bit jail and so on, given > that I've never done it. Otherwise, you're probably going to need to > find someone who has a similar setup and can reproduce the problem, or > give a developer root-level access to your system. > I've also posted to the clamav-users@ list (but it was the backtrace before -DWITH_DEBUG was set), but haven't had a reply. Unfortunately, this particular setup, I can't provide root access, however I might be able to do so on one of my personal machines. It will be some time before I get everything set up properly though. [snip] > > I'm not sure how to explain this in a way that's easily understandable > (I'm assuming you're not a programmer. :-) ). My guess is that during > compile-time, the compiler is kicking out some code that's based on > sizeof(int) == 8 (64-bit), when that shouldn't be the case in a 32-bit > environment. Include files could cause this problem too. > Not a C programmer. :-) > There may be some "black magic" in the ports infrastructure (maybe even > on a per-port basis) to work around this problem that the clamav port > isn't making use of. I really don't know. > > Sorry I can't be of more help. I'm one of those guys who if he needs a > 32-bit and 64-bit system, buys two physical systems. > No problem. I appreciate you taking the time to look at it this far. Cheers, -- Glen Barber