Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2008 12:57:20 -0500 (CDT)
From:      "Sean C. Farley" <scf@FreeBSD.org>
To:        Chagin Dmitry <chagin.dmitry@gmail.com>
Cc:        Roman Divacky <rdivacky@FreeBSD.org>, freebsd-emulation@FreeBSD.org
Subject:   Re: kern/122318 (CMake core dumping, chroot exiting)
Message-ID:  <alpine.BSF.1.10.0807251231050.30805@thor.farley.org>
In-Reply-To: <alpine.BSF.1.10.0807251233470.1710@ora.chd.net>
References:  <alpine.BSF.1.10.0807231236140.12600@thor.farley.org> <20080723184450.GA25356@freebsd.org> <alpine.BSF.1.10.0807231459030.12600@thor.farley.org> <alpine.BSF.1.10.0807240016340.28898@ora.chd.net> <alpine.BSF.1.10.0807231616570.12600@thor.farley.org> <20080725082156.GA41887@freebsd.org> <20080725083122.GA42835@freebsd.org> <alpine.BSF.1.10.0807251233470.1710@ora.chd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 25 Jul 2008, Chagin Dmitry wrote:

> 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 <chroot path> su - <build user>
>>>>>>>>
>>>>>>>>  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.
>>>> :)

*snip of all that is wrong :)*

>> 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...

I have the trouble in and out of the chroot (FC2-based) but also with
linux_base-f{c4,c6,8}.  I just ran it outside of the chroot to get the
ktrace much more easily.  This is on a FreeBSD 7 amd64 system running a
32-bit chroot.

> Sean, can you provide full command which you run?

Steps to recreate:
mkdir a
cd a
touch CMakeLists.txt
/home/sfarley/chroot/usr/bin/cmake .

System setup for 7-STABLE as of July 14th:
compat.ia32.maxvmem: 0
compat.ia32.maxssiz: 67108864
compat.ia32.maxdsiz: 536870912
compat.linux.oss_version: 198144
compat.linux.osrelease: 2.6.16
compat.linux.osname: Linux
compat.linux32.maxvmem: 0
compat.linux32.maxssiz: 67108864
compat.linux32.maxdsiz: 536870912

BTW, switching to compat.linux.osrelease=2.4.2, running some Linux
applications and switching back to 2.6.16 does not leave Linux emulation
in a happy state.  Simple Linux applications such as uname start core
dumping.

Sean
-- 
scf@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.1.10.0807251231050.30805>