From owner-freebsd-emulation@FreeBSD.ORG Fri Jul 25 08:36:11 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7487106567F for ; Fri, 25 Jul 2008 08:36:11 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: from mu-out-0910.google.com (mu-out-0910.google.com [209.85.134.188]) by mx1.freebsd.org (Postfix) with ESMTP id 4B2BA8FC1A for ; Fri, 25 Jul 2008 08:36:11 +0000 (UTC) (envelope-from chagin.dmitry@gmail.com) Received: by mu-out-0910.google.com with SMTP id i2so2246223mue.3 for ; Fri, 25 Jul 2008 01:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:to:cc:subject :in-reply-to:message-id:references:user-agent:mime-version :content-type:from; bh=bWqq0miCMDmPboexzvYyFqFrFJMrCcqFLWHxBiEP/MY=; b=f9f7ic7MYhaHY3mLAtBCvj+UQwu01vEXL3Tl5ZoyyAf9w3FWvk5A2X3NU/mEp/li78 LfRaxpOhHomHiBQx3JyfL+/uls9GB5sF9EmRywuDOcCDVQc0KF79RMM+O+N8qF2DAZ23 Qrlxd+ddDimAH359buIGWV9kVXyyGmCx1PGm0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:to:cc:subject:in-reply-to:message-id:references:user-agent :mime-version:content-type:from; b=JwUIAxNQtzoGfNd1qaVbqnNyiucQKv+c0NLVThRRw8aAQzbiMCcwSEVnL2zw6LFpzU FB3HAY8nvS7mXJ4kw90354bB+0Q1OFrx/o2/tWOZEeUvTTSQnwhcBBY8+vOwOpvNfjhy vpTt+3HGGjvAQODCuZKRutkUz17PESTQn6FTI= Received: by 10.103.137.5 with SMTP id p5mr821183mun.114.1216974969439; Fri, 25 Jul 2008 01:36:09 -0700 (PDT) Received: from ora.chd.net ( [78.107.232.239]) by mx.google.com with ESMTPS id i5sm66888404mue.2.2008.07.25.01.36.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 25 Jul 2008 01:36:08 -0700 (PDT) Date: Fri, 25 Jul 2008 12:36:34 +0400 (MSD) To: Roman Divacky In-Reply-To: <20080725083122.GA42835@freebsd.org> Message-ID: References: <20080723184450.GA25356@freebsd.org> <20080725082156.GA41887@freebsd.org> <20080725083122.GA42835@freebsd.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed From: Chagin Dmitry Cc: freebsd-emulation@freebsd.org, Chagin Dmitry Subject: Re: kern/122318 (CMake core dumping, chroot exiting) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2008 08:36:11 -0000 On Fri, 25 Jul 2008, Roman Divacky wrote: > On Fri, Jul 25, 2008 at 10:21:56AM +0200, Roman Divacky wrote: >> On Wed, Jul 23, 2008 at 04:19:16PM -0500, Sean C. Farley wrote: >>> On Thu, 24 Jul 2008, Chagin Dmitry wrote: >>> >>>> On Wed, 23 Jul 2008, Sean C. Farley wrote: >>>>> On Wed, 23 Jul 2008, Roman Divacky wrote: >>>>>> On Wed, Jul 23, 2008 at 12:50:51PM -0500, Sean C. Farley wrote: >>>>>>> I am seeing if anyone has any insight on this PR (kern/122318[1]). >>>>>>> It would be nice to once again build using cmake within a Linux >>>>>>> chroot. :) >>>>>>> >>>>>>> Basically, the bug is that not only that cmake is dumping core; it >>>>>>> is also forcing the user out of the chroot environment. Here is >>>>>>> the command used to start the chroot: >>>>>>> /compat/linux/usr/sbin/chroot su - >>>>>>> >>>>>>> 1. http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/122318 >>>>>> >>>>>> looking at the trace you provided I guess this is what's going on: >>>>>> >>>>>> cmake forks/execs gcc and waits to be notified about the success of >>>>>> the command it tried, the notification comes (the SIGCHLD) the >>>>>> handler tries do something and then returns and now something is >>>>>> wrong and it receives the SIGSEGV.. >>>>>> >>>>>> or am I wrong and linux_ktrace does not translate signals and the >>>>>> SIGCHLD is in fact SIGTSTP? >>>>>> >>>>>> what is the fd 3 and 4? can you provide full ktrace.out? >>>>> >>>>> I have the full output of the execution here using ktrace -d: >>>>> http://www.farley.org/freebsd/tmp/cmake-kdump.txt >>>> >>>> hi! >>>> >>>> Please, can you run ktrace with -i flag? >>>> >>>> thnx! >>> >>> No problem. Same URL. The countless meetings this week are destroying >>> my mind; I was thinking -d did what -i actually does. :) >> >> the cmake opens: >> >> 18279 ld CALL linux_open(0x7fffffffe5b4,0,0x1b6) >> 18279 ld NAMI "/usr/lib/crtend.o" >> 18279 ld RET linux_open 3 >> >> which is obviously wrong and probably causes the regression.. how is this possible I dont >> know. >> >> anyway, the trace is all strange... >> >> 1) it uses getpmsg/putpmsg which are unimplemented (hows that it work? does it >> work or just pretends to?) >> >> 2) what is this? >> >> 18267 gmake CALL [417](0x7fffffffcf90) >> 18267 gmake RET [417] JUSTRETURN >> 18267 gmake CALL linux_waitpid(0xffffffff,0x7fffffffd3f4,0,0) >> 18267 gmake RET linux_waitpid 18277/0x4765 >> 18267 gmake CALL [340](0x1,0x529d90,0) >> 18267 gmake RET [340] 0 >> 18267 gmake CALL [340](0x3,0x7fffffffd3c0,0) >> 18267 gmake RET [340] 0 >> >> >> anyway, try to investigate why the cmake does not open crtend.o under /compat but uses >> fbsd one, that should fix the proble I believe > > erm... all wrong :) the gmake is a fbsd binary so its ok to open that file... > yes, but I remember it was a question about chroot... Sean, can you provide full command which you run? -- Have fun! chd