From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 08:08:18 2007 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 9052316A4E2 for ; Sun, 28 Oct 2007 08:08:18 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from darklight.org.ru (unknown [IPv6:2001:470:1f06:84::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6A25613C4A3 for ; Sun, 28 Oct 2007 08:08:17 +0000 (UTC) (envelope-from yuri.pankov@gmail.com) Received: from darklight.org.ru (yuri@darklight.org.ru [IPv6:::1]) by darklight.org.ru (8.14.1/8.14.1) with ESMTP id l9S87NVe068074; Sun, 28 Oct 2007 11:07:24 +0300 (MSK) (envelope-from yuri.pankov@gmail.com) Received: (from yuri@localhost) by darklight.org.ru (8.14.1/8.14.1/Submit) id l9S87Mqf068069; Sun, 28 Oct 2007 11:07:22 +0300 (MSK) (envelope-from yuri.pankov@gmail.com) X-Authentication-Warning: darklight.org.ru: yuri set sender to yuri.pankov@gmail.com using -f From: Yuri Pankov To: "Valery V.Chikalov" In-Reply-To: <4723A8D6.6020002@chikalov.dp.ua> References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Sun, 28 Oct 2007 11:07:22 +0300 Message-Id: <1193558842.60549.2.camel@darklight.org.ru> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 FreeBSD GNOME Team Port Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 08:08:18 -0000 On Sun, 2007-10-28 at 00:08 +0300, Valery V.Chikalov wrote: > Ivan Voras wrote: > > Valery V.Chikalov wrote: > >> Hi, list. > > > >> Now being inspired the great performance improvements on multiprocessors > >> configurations I am trying to switch to FreeBSD 7.0 version, moreover on > >> AMD64 architecture. Must I expect some regression in support old Linux > >> application here? Are some theoretical obstacles exists that linux > >> application which successfully worked on FreeBSD from 5.0 up to 6.2 > >> can not be running on 7.0 AMD64? > > > > AFAIK Linux emulation on AMD64 works only for 32-bit code, so you have > > practically two emulation layers: linux-freebsd and 32-64. There's all > > kinds of things that might go wrong. > > > > This is a "generic" answer, I don't really know the exact answer to your > > question. > > > > > Hi, Ivan. > > Thank you for your answer. > > Yes I know that Linux emulation is 32 bit ever on AMD64 FreeBSD and that > exactly what I need as I own old 32bit 9.0.1 Oracle server. > > I have investigated this problem little more. > > Oracle(+ rh7) can be successfully started on FreeBSD 7.0 (i386) > SMP capable kernel, SHED_ULE, Core2Duo and so on... > > I fond this: http://wiki.freebsd.org/linux-kernel/ltp > I don't know how actual this info now, it seems little bit old. > > I did: > > grep UNIMPL /sys/amd64/linux32/syscalls.master > amd64.unimpl.txt > grep UNIMPL /sys/i386/linux/syscalls.master > i386.unimpl.txt > > diff i386.unimpl.txt amd64.unimpl.txt > > 6d5 > < 28 AUE_FSTAT UNIMPL fstat > 14d12 > < 86 AUE_USELIB UNIMPL linux_uselib > 16d13 > < 101 AUE_NULL UNIMPL ioperm > 18,19d14 > < 113 AUE_NULL UNIMPL vm86old > < 123 AUE_NULL UNIMPL modify_ldt > 21d15 > < 166 AUE_NULL UNIMPL vm86 > 29d22 > < 244 AUE_NULL UNIMPL linux_get_thread_area > > So there is some regression between i386 and AMD64 in a number of system > calls emulated. > > But Oracle not dumping core with signal 12(non-existent system call) > It's saying: > ========== > 27122, 00000, "unable to protect memory" > // *Cause: mprotect() call failed > ========== > > and than dumps core with signal 11. > > I instrumented mprotect(2) system call in linux32_machdep.c with > > -return (mprotect(td, &bsd_args)); > > +ret = mprotect(td, &bsd_args); > +printf("mprotect addr:%lx, return %d\n", uap->addr, ret); > +return ret; > > and got something like: > > Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 > Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 > Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 > > where 13 is EACCES. > > So, I think we have some regression in supporting old linux binaries on > AMD64 and possibly not connected with missing system calls. > Don't know where to move from here. > > BTW, ktrace don't usable for me on FreeBSD 7.0 any arch, > kdump dumping core on freebsd6_mmap system call. > > Thanks. > Valery. Hi, Valery. Are you using linux_kdump (devel/linux_kdump or, much faster, with pkg_add -r)? Yuri From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 08:15:06 2007 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 808BD16A528 for ; Sun, 28 Oct 2007 08:15:06 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 045A413C481 for ; Sun, 28 Oct 2007 08:15:05 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (unknown [77.109.22.63]) by halik.com.ua (Postfix) with ESMTP id 40E405C07E; Sun, 28 Oct 2007 10:14:59 +0200 (EET) Message-ID: <47245307.4030306@chikalov.dp.ua> Date: Sun, 28 Oct 2007 11:14:47 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Yuri Pankov References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <1193558842.60549.2.camel@darklight.org.ru> In-Reply-To: <1193558842.60549.2.camel@darklight.org.ru> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 08:15:06 -0000 Yuri Pankov wrote: > On Sun, 2007-10-28 at 00:08 +0300, Valery V.Chikalov wrote: >> Ivan Voras wrote: >>> Valery V.Chikalov wrote: >>>> Hi, list. >>>> Now being inspired the great performance improvements on multiprocessors >>>> configurations I am trying to switch to FreeBSD 7.0 version, moreover on >>>> AMD64 architecture. Must I expect some regression in support old Linux >>>> application here? Are some theoretical obstacles exists that linux >>>> application which successfully worked on FreeBSD from 5.0 up to 6.2 >>>> can not be running on 7.0 AMD64? >>> AFAIK Linux emulation on AMD64 works only for 32-bit code, so you have >>> practically two emulation layers: linux-freebsd and 32-64. There's all >>> kinds of things that might go wrong. >>> >>> This is a "generic" answer, I don't really know the exact answer to your >>> question. >>> >>> >> Hi, Ivan. >> >> Thank you for your answer. >> >> Yes I know that Linux emulation is 32 bit ever on AMD64 FreeBSD and that >> exactly what I need as I own old 32bit 9.0.1 Oracle server. >> >> I have investigated this problem little more. >> >> Oracle(+ rh7) can be successfully started on FreeBSD 7.0 (i386) >> SMP capable kernel, SHED_ULE, Core2Duo and so on... >> >> I fond this: http://wiki.freebsd.org/linux-kernel/ltp >> I don't know how actual this info now, it seems little bit old. >> >> I did: >> >> grep UNIMPL /sys/amd64/linux32/syscalls.master > amd64.unimpl.txt >> grep UNIMPL /sys/i386/linux/syscalls.master > i386.unimpl.txt >> >> diff i386.unimpl.txt amd64.unimpl.txt >> >> 6d5 >> < 28 AUE_FSTAT UNIMPL fstat >> 14d12 >> < 86 AUE_USELIB UNIMPL linux_uselib >> 16d13 >> < 101 AUE_NULL UNIMPL ioperm >> 18,19d14 >> < 113 AUE_NULL UNIMPL vm86old >> < 123 AUE_NULL UNIMPL modify_ldt >> 21d15 >> < 166 AUE_NULL UNIMPL vm86 >> 29d22 >> < 244 AUE_NULL UNIMPL linux_get_thread_area >> >> So there is some regression between i386 and AMD64 in a number of system >> calls emulated. >> >> But Oracle not dumping core with signal 12(non-existent system call) >> It's saying: >> ========== >> 27122, 00000, "unable to protect memory" >> // *Cause: mprotect() call failed >> ========== >> >> and than dumps core with signal 11. >> >> I instrumented mprotect(2) system call in linux32_machdep.c with >> >> -return (mprotect(td, &bsd_args)); >> >> +ret = mprotect(td, &bsd_args); >> +printf("mprotect addr:%lx, return %d\n", uap->addr, ret); >> +return ret; >> >> and got something like: >> >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 >> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 >> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 >> >> where 13 is EACCES. >> >> So, I think we have some regression in supporting old linux binaries on >> AMD64 and possibly not connected with missing system calls. >> Don't know where to move from here. >> >> BTW, ktrace don't usable for me on FreeBSD 7.0 any arch, >> kdump dumping core on freebsd6_mmap system call. >> >> Thanks. >> Valery. > > Hi, Valery. > > Are you using linux_kdump (devel/linux_kdump or, much faster, with > pkg_add -r)? > no, I have not known about it, possibly because ktrace/kdump from base perfectly worked for me on FreeBSD - 6.* ever on linux apps. Thank you for hint, I will try it. Valery. > > Yuri From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 11:29:15 2007 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 BF66816A420 for ; Sun, 28 Oct 2007 11:29:15 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 38B6913C4C6 for ; Sun, 28 Oct 2007 11:29:14 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 5864A66985C; Sun, 28 Oct 2007 12:29:13 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WFw3ppRZwj8y; Sun, 28 Oct 2007 12:29:10 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id B76B766985A; Sun, 28 Oct 2007 12:29:10 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l9SBTAfr084892; Sun, 28 Oct 2007 12:29:10 +0100 (CET) (envelope-from rdivacky) Date: Sun, 28 Oct 2007 12:29:10 +0100 From: Roman Divacky To: "Valery V.Chikalov" Message-ID: <20071028112910.GA84830@freebsd.org> References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4723A8D6.6020002@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org, Ivan Voras Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 11:29:15 -0000 > exactly what I need as I own old 32bit 9.0.1 Oracle server. > > I have investigated this problem little more. > > Oracle(+ rh7) can be successfully started on FreeBSD 7.0 (i386) > SMP capable kernel, SHED_ULE, Core2Duo and so on... > > I fond this: http://wiki.freebsd.org/linux-kernel/ltp > I don't know how actual this info now, it seems little bit old. its quite accurate... > I did: > > grep UNIMPL /sys/amd64/linux32/syscalls.master > amd64.unimpl.txt > grep UNIMPL /sys/i386/linux/syscalls.master > i386.unimpl.txt > > diff i386.unimpl.txt amd64.unimpl.txt > > 6d5 > < 28 AUE_FSTAT UNIMPL fstat > 14d12 > < 86 AUE_USELIB UNIMPL linux_uselib > 16d13 > < 101 AUE_NULL UNIMPL ioperm > 18,19d14 > < 113 AUE_NULL UNIMPL vm86old > < 123 AUE_NULL UNIMPL modify_ldt > 21d15 > < 166 AUE_NULL UNIMPL vm86 > 29d22 > < 244 AUE_NULL UNIMPL linux_get_thread_area most of this are either unused by new linux apps or irrelevant > So there is some regression between i386 and AMD64 in a number of system > calls emulated. > > But Oracle not dumping core with signal 12(non-existent system call) > It's saying: > ========== > 27122, 00000, "unable to protect memory" > // *Cause: mprotect() call failed > ========== > > and than dumps core with signal 11. > > I instrumented mprotect(2) system call in linux32_machdep.c with > > -return (mprotect(td, &bsd_args)); > > +ret = mprotect(td, &bsd_args); > +printf("mprotect addr:%lx, return %d\n", uap->addr, ret); > +return ret; > > and got something like: > > Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 > Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 > Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 > > where 13 is EACCES. can you show what are the "prot" and "len" arguments? From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 16:50:20 2007 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 887D316A468; Sun, 28 Oct 2007 16:50:20 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 308EB13C491; Sun, 28 Oct 2007 16:50:19 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (77-109-18-135.dynamic.peoplenet.ua [77.109.18.135]) by halik.com.ua (Postfix) with ESMTP id 3CB745C07D; Sun, 28 Oct 2007 18:50:13 +0200 (EET) Message-ID: <4724CBCA.30500@chikalov.dp.ua> Date: Sun, 28 Oct 2007 19:50:02 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Roman Divacky References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> In-Reply-To: <20071028112910.GA84830@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org, Ivan Voras Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 16:50:20 -0000 Roman Divacky wrote: >> >> and got something like: >> >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 >> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 >> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 >> >> where 13 is EACCES. > > can you show what are the "prot" and "len" arguments? > Sure: Oct 28 19:47:57 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, return 0 Oct 28 19:47:57 tiger kernel: mprotect addr:2a27d000, len:3682304, prot:3, return 0 Oct 28 19:47:57 tiger kernel: mprotect addr:2a27d000, len:3682304, prot:5, return 0 Oct 28 19:47:58 tiger kernel: pid 1878 (sqlplus), uid 1002: exited on signal 11 (core dumped) Oct 28 19:47:58 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, return 13 Oct 28 19:47:58 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, return 13 Thank you. Valery. From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 17:49:13 2007 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 F21E816A4A1; Sun, 28 Oct 2007 17:49:12 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id EEA6D13C481; Sun, 28 Oct 2007 17:49:11 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (77-109-18-135.dynamic.peoplenet.ua [77.109.18.135]) by halik.com.ua (Postfix) with ESMTP id D624C5C07E; Sun, 28 Oct 2007 19:49:04 +0200 (EET) Message-ID: <4724D99C.3080105@chikalov.dp.ua> Date: Sun, 28 Oct 2007 20:49:00 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Roman Divacky References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> In-Reply-To: <4724CBCA.30500@chikalov.dp.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 17:49:13 -0000 Valery V.Chikalov wrote: > Roman Divacky wrote: >>> >>> and got something like: >>> >>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 >>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 >>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 >>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 >>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 >>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 >>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 >>> >>> where 13 is EACCES. >> >> can you show what are the "prot" and "len" arguments? >> > > Sure: > > Oct 28 19:47:57 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, > return 0 > Oct 28 19:47:57 tiger kernel: mprotect addr:2a27d000, len:3682304, > prot:3, return 0 > Oct 28 19:47:57 tiger kernel: mprotect addr:2a27d000, len:3682304, > prot:5, return 0 > Oct 28 19:47:58 tiger kernel: pid 1878 (sqlplus), uid 1002: exited on > signal 11 (core dumped) > Oct 28 19:47:58 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, > return 13 > Oct 28 19:47:58 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, > return 13 > and again: Oct 28 20:35:03 tiger kernel: mprotect addr:2a657000, len:29304, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a27d000, len:3682304, prot:3, bsdprot: 7, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a27d000, len:3682304, prot:5, bsdprot: 5, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, bsdprot: 5, return 13 Oct 28 20:35:03 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, bsdprot: 5, return 13 Oct 28 20:35:03 tiger kernel: mprotect addr:2a7c1000, len:4720, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, bsdprot: 5, return 13 Oct 28 20:35:03 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, bsdprot: 5, return 13 Oct 28 20:35:03 tiger kernel: mprotect addr:2a279000, len:3400, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a27c000, len:980, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a600000, len:131672, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a623000, len:4340, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a647000, len:3892, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a657000, len:29304, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, bsdprot: 0, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a27d000, len:3682304, prot:3, bsdprot: 7, return 0 Oct 28 20:35:03 tiger kernel: mprotect addr:2a27d000, len:3682304, prot:5, bsdprot: 5, return 0 Oct 28 20:35:03 tiger kernel: pid 2102 (sqlplus), uid 1002: exited on signal 11 (core dumped) Oct 28 20:35:04 tiger kernel: pid 2121 (oracle), uid 1002: exited on signal 11 (core dumped) now I did: +// if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) +// bsd_args.prot |= PROT_READ | PROT_EXEC; and get: Oct 28 20:41:14 tiger kernel: mprotect addr:2a27c000, len:980, prot:0, bsdprot: 0, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:2a600000, len:131672, prot:0, bsdprot: 0, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:2a623000, len:4340, prot:0, bsdprot: 0, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:2a647000, len:3892, prot:0, bsdprot: 0, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:2a657000, len:29304, prot:0, bsdprot: 0, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:2a78b000, len:38376, prot:0, bsdprot: 0, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:2a27d000, len:3682304, prot:3, bsdprot: 3, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:2a27d000, len:3682304, prot:5, bsdprot: 5, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, bsdprot: 1, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, bsdprot: 1, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:2a7c1000, len:4720, prot:0, bsdprot: 0, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:55c00000, len:4096, prot:1, bsdprot: 1, return 0 Oct 28 20:41:14 tiger kernel: mprotect addr:55c81000, len:4096, prot:1, bsdprot: 1, return 0 Oct 28 20:41:14 tiger kernel: pid 2192 (sqlplus), uid 1002: exited on signal 11 (core dumped) Oct 28 20:41:14 tiger kernel: pid 2176 (sqlplus), uid 1002: exited on signal 11 (core dumped) Oct 28 20:41:14 tiger kernel: pid 2158 (bash), uid 1002: exited on signal 11 (core dumped) So, if prot argument leaves unchanged mprotect don't failing. But the result don't became better. Thank you. Valery. From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 18:43:27 2007 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 8879A16A41A for ; Sun, 28 Oct 2007 18:43:27 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id BA14413C4C6 for ; Sun, 28 Oct 2007 18:43:23 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id A42CD669519; Sun, 28 Oct 2007 19:43:20 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Qz2NbHJJKhO8; Sun, 28 Oct 2007 19:43:19 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 5AF54669518; Sun, 28 Oct 2007 19:43:19 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l9SIhJ0U057317; Sun, 28 Oct 2007 19:43:19 +0100 (CET) (envelope-from rdivacky) Date: Sun, 28 Oct 2007 19:43:18 +0100 From: Roman Divacky To: "Valery V.Chikalov" Message-ID: <20071028184318.GA57240@freebsd.org> References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> <4724D99C.3080105@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4724D99C.3080105@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 18:43:27 -0000 On Sun, Oct 28, 2007 at 08:49:00PM +0200, Valery V.Chikalov wrote: > Valery V.Chikalov wrote: > >Roman Divacky wrote: > >>> > >>>and got something like: > >>> > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 > >>>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 > >>>Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 > >>>Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 > >>> > >>>where 13 is EACCES. > >> > >>can you show what are the "prot" and "len" arguments? Index: linux_machdep.c =================================================================== RCS file: /home/ncvs/src/sys/i386/linux/linux_machdep.c,v retrieving revision 1.78 diff -u -r1.78 linux_machdep.c --- linux_machdep.c 20 Jul 2007 08:35:18 -0000 1.78 +++ linux_machdep.c 28 Oct 2007 18:42:15 -0000 @@ -803,8 +803,10 @@ bsd_args.addr = uap->addr; bsd_args.len = uap->len; bsd_args.prot = uap->prot; +#if 0 if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; +#endif return (mprotect(td, &bsd_args)); } does this help? From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 20:01:11 2007 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 F054216A421; Sun, 28 Oct 2007 20:01:11 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id A9AFC13C4B8; Sun, 28 Oct 2007 20:01:11 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from [127.0.0.1] (77-109-17-107.dynamic.peoplenet.ua [77.109.17.107]) by halik.com.ua (Postfix) with ESMTP id 36F955C07D; Sun, 28 Oct 2007 22:01:07 +0200 (EET) Message-ID: <4724EA7B.3010103@chikalov.dp.ua> Date: Sun, 28 Oct 2007 22:00:59 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Roman Divacky References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> <4724D99C.3080105@chikalov.dp.ua> <20071028184318.GA57240@freebsd.org> In-Reply-To: <20071028184318.GA57240@freebsd.org> X-Enigmail-Version: 0.95.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Antivirus: avast! (VPS 071028-0, 28.10.2007), Outbound message X-Antivirus-Status: Clean Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 20:01:12 -0000 Roman Divacky пишет: > On Sun, Oct 28, 2007 at 08:49:00PM +0200, Valery V.Chikalov wrote: >> Valery V.Chikalov wrote: >>> Roman Divacky wrote: >>>>> and got something like: >>>>> >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 >>>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 >>>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 >>>>> >>>>> where 13 is EACCES. >>>> can you show what are the "prot" and "len" arguments? > > Index: linux_machdep.c > =================================================================== > RCS file: /home/ncvs/src/sys/i386/linux/linux_machdep.c,v > retrieving revision 1.78 > diff -u -r1.78 linux_machdep.c > --- linux_machdep.c 20 Jul 2007 08:35:18 -0000 1.78 > +++ linux_machdep.c 28 Oct 2007 18:42:15 -0000 > @@ -803,8 +803,10 @@ > bsd_args.addr = uap->addr; > bsd_args.len = uap->len; > bsd_args.prot = uap->prot; > +#if 0 > if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) > bsd_args.prot |= PROT_READ | PROT_EXEC; > +#endif > return (mprotect(td, &bsd_args)); > } > > > does this help? Unfortunately, no. Just for the record: this make mprottect return success, but oracle coredumps nevertheless. (Sorry for rhyme :-) Definitely you have missed two my another mails: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=16240+0+current/freebsd-emulation http://docs.freebsd.org/cgi/getmsg.cgi?fetch=19497+0+current/freebsd-emulation Thank you for the help. Valery. From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 20:59:54 2007 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 0A26F16A418; Sun, 28 Oct 2007 20:59:54 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 97C6313C480; Sun, 28 Oct 2007 20:59:53 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (77-109-17-130.dynamic.peoplenet.ua [77.109.17.130]) by halik.com.ua (Postfix) with ESMTP id F327F5C07D; Sun, 28 Oct 2007 22:59:47 +0200 (EET) Message-ID: <4724F83F.30503@chikalov.dp.ua> Date: Sun, 28 Oct 2007 22:59:43 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Roman Divacky References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> <4724D99C.3080105@chikalov.dp.ua> <20071028184318.GA57240@freebsd.org> <4724EA7B.3010103@chikalov.dp.ua> In-Reply-To: <4724EA7B.3010103@chikalov.dp.ua> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 20:59:54 -0000 Valery V.Chikalov wrote: > Roman Divacky пишет: >> On Sun, Oct 28, 2007 at 08:49:00PM +0200, Valery V.Chikalov wrote: >>> Valery V.Chikalov wrote: >>>> Roman Divacky wrote: >>>>>> and got something like: >>>>>> >>>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 >>>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 >>>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 >>>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 >>>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 >>>>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 >>>>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 >>>>>> >>>>>> where 13 is EACCES. >>>>> can you show what are the "prot" and "len" arguments? >> Index: linux_machdep.c >> =================================================================== >> RCS file: /home/ncvs/src/sys/i386/linux/linux_machdep.c,v >> retrieving revision 1.78 >> diff -u -r1.78 linux_machdep.c >> --- linux_machdep.c 20 Jul 2007 08:35:18 -0000 1.78 >> +++ linux_machdep.c 28 Oct 2007 18:42:15 -0000 >> @@ -803,8 +803,10 @@ >> bsd_args.addr = uap->addr; >> bsd_args.len = uap->len; >> bsd_args.prot = uap->prot; >> +#if 0 >> if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) >> bsd_args.prot |= PROT_READ | PROT_EXEC; >> +#endif >> return (mprotect(td, &bsd_args)); >> } >> >> >> does this help? > > Unfortunately, no. > > Just for the record: this make mprottect return success, > but oracle coredumps nevertheless. (Sorry for rhyme :-) > But despite of this is a step forward! Oracle server itself is running! Only sqlplus(oracle control utility) and connected client oracle process are coredumping. So now I can start oracle server and ever generate new database. Now I am trying to understand the reasons of this coredumps. They are occurring rather accidental, and for example I must several times try to start oracle to achieve the result. Moreover after some time successful running and serving queries oracle server dump core and stop working too. To make things clear: on this hardware the same oracle and FreeBSD-7.0 (i386) are running perfectly stable. The Linux in both cases the same RedHat-7 (from ports of FreeBSD-5.*). Do I need to use some "linux version" of gdb? Gdb from the base saying me: ===================== bash-2.04$ gdb -c oracle.core `which oracle` GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... warning: A handler for the OS ABI "GNU/Linux" is not built into this ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ is this harmful? Is it possible to fix this? configuration of GDB. Attempting to continue with the default i386 settings. ======================== And "bt" are not looking reasonable. Thank you for the help. Valery. From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 21:07:11 2007 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 946B116A41B for ; Sun, 28 Oct 2007 21:07:11 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id ED6BB13C4A5 for ; Sun, 28 Oct 2007 21:07:10 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 9D2E2669862; Sun, 28 Oct 2007 22:07:07 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bj1A-gXvjakl; Sun, 28 Oct 2007 22:07:06 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 78184669859; Sun, 28 Oct 2007 22:07:06 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l9SL76Gj060732; Sun, 28 Oct 2007 22:07:06 +0100 (CET) (envelope-from rdivacky) Date: Sun, 28 Oct 2007 22:07:06 +0100 From: Roman Divacky To: "Valery V.Chikalov" Message-ID: <20071028210706.GA60615@freebsd.org> References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> <4724D99C.3080105@chikalov.dp.ua> <20071028184318.GA57240@freebsd.org> <4724EA7B.3010103@chikalov.dp.ua> <4724F83F.30503@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4724F83F.30503@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 21:07:11 -0000 > >Just for the record: this make mprottect return success, > >but oracle coredumps nevertheless. (Sorry for rhyme :-) > > > > But despite of this is a step forward! > Oracle server itself is running! > Only sqlplus(oracle control utility) and connected client oracle process > are coredumping. So now I can start oracle server and ever generate new > database. > > Now I am trying to understand the reasons of this coredumps. They are > occurring rather accidental, and for example I must several times try to > start oracle to achieve the result. Moreover after some time successful > running and serving queries oracle server dump core and stop working too. I think its quite obvious... oracle expects some memory is executable and tries to execute something in it but freebsd has non-exec bit set on that memory hence core dump... do you see any obvious flaw in this thought? > To make things clear: on this hardware the same oracle and FreeBSD-7.0 > (i386) are running perfectly stable. The Linux in both cases the same > RedHat-7 (from ports of FreeBSD-5.*). > > Do I need to use some "linux version" of gdb? > Gdb from the base saying me: > > ===================== > bash-2.04$ gdb -c oracle.core `which oracle` > GNU gdb 6.1.1 [FreeBSD] > Copyright 2004 Free Software Foundation, Inc. > GDB is free software, covered by the GNU General Public License, and you are > welcome to change it and/or distribute copies of it under certain > conditions. > Type "show copying" to see the conditions. > There is absolutely no warranty for GDB. Type "show warranty" for details. > This GDB was configured as "amd64-marcel-freebsd"... > warning: A handler for the OS ABI "GNU/Linux" is not built into this > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > is this harmful? Is it possible to fix this? the coredump should contain some memory dump of intstructions there were executing when the coredump happened. those instructions are i386 maybe you need to set it somewhere/somehow > configuration > of GDB. Attempting to continue with the default i386 settings. > ======================== > > And "bt" are not looking reasonable. try to "disas" memory before the IP when the coredump happened. you might disas memory in the middle of instruction so try to increase/decrease by 1 the memory location... roman From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 21:30:03 2007 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 0A0B216A418; Sun, 28 Oct 2007 21:30:03 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 7A0A513C4B0; Sun, 28 Oct 2007 21:30:02 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (77-109-17-130.dynamic.peoplenet.ua [77.109.17.130]) by halik.com.ua (Postfix) with ESMTP id 722765C07D; Sun, 28 Oct 2007 23:29:58 +0200 (EET) Message-ID: <4724FF52.7090304@chikalov.dp.ua> Date: Sun, 28 Oct 2007 23:29:54 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Roman Divacky References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> <4724D99C.3080105@chikalov.dp.ua> <20071028184318.GA57240@freebsd.org> <4724EA7B.3010103@chikalov.dp.ua> <4724F83F.30503@chikalov.dp.ua> <20071028210706.GA60615@freebsd.org> In-Reply-To: <20071028210706.GA60615@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 21:30:03 -0000 Roman Divacky wrote: >>> Just for the record: this make mprottect return success, >>> but oracle coredumps nevertheless. (Sorry for rhyme :-) >>> >> But despite of this is a step forward! >> Oracle server itself is running! >> Only sqlplus(oracle control utility) and connected client oracle process >> are coredumping. So now I can start oracle server and ever generate new >> database. >> >> Now I am trying to understand the reasons of this coredumps. They are >> occurring rather accidental, and for example I must several times try to >> start oracle to achieve the result. Moreover after some time successful >> running and serving queries oracle server dump core and stop working too. > > I think its quite obvious... oracle expects some memory is executable > and tries to execute something in it but freebsd has non-exec bit set > on that memory hence core dump... > > do you see any obvious flaw in this thought? One and half(IMHO). This occurs accidentally, as I have said I can sometimes start server, ask him about something and only after some time find him dead. Sometimes I ever cant start it. I think in your scenario it must be absolutely deterministic. There are no AMD64 specific in your reasoning. Its working in i386 mode. Do you have some ideas about this?. >> >> And "bt" are not looking reasonable. > > try to "disas" memory before the IP when the coredump happened. you > might disas memory in the middle of instruction so try to increase/decrease > by 1 the memory location... I will try. Thank you. Valery. > > roman From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 21:33:39 2007 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 9000C16A469 for ; Sun, 28 Oct 2007 21:33:39 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 26D0613C4AC for ; Sun, 28 Oct 2007 21:33:38 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 4538366951C; Sun, 28 Oct 2007 22:33:37 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 93czhwEAJUHB; Sun, 28 Oct 2007 22:33:36 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 477C38C26A9; Sun, 28 Oct 2007 22:33:36 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l9SLXaPO061779; Sun, 28 Oct 2007 22:33:36 +0100 (CET) (envelope-from rdivacky) Date: Sun, 28 Oct 2007 22:33:36 +0100 From: Roman Divacky To: "Valery V.Chikalov" Message-ID: <20071028213336.GA61710@freebsd.org> References: <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> <4724D99C.3080105@chikalov.dp.ua> <20071028184318.GA57240@freebsd.org> <4724EA7B.3010103@chikalov.dp.ua> <4724F83F.30503@chikalov.dp.ua> <20071028210706.GA60615@freebsd.org> <4724FF52.7090304@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4724FF52.7090304@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 21:33:39 -0000 > >do you see any obvious flaw in this thought? > > One and half(IMHO). > > This occurs accidentally, as I have said I can sometimes start server, > ask him about something and only after some time find him dead. > Sometimes I ever cant start it. I think in your scenario it must be > absolutely deterministic. yes.. if only everything could be explained with logic :) it can be something like "if (some_random_condition) run_optimizer()" ie. it's quite random or something.. I tend to believe that Oracle DBMS is tuned with AI-like things > There are no AMD64 specific in your reasoning. Its working in i386 mode. > Do you have some ideas about this?. I was talking about the gdb thing.. you are using native gdb (built for amd64) right? From owner-freebsd-emulation@FreeBSD.ORG Sun Oct 28 21:47:19 2007 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 588F116A417; Sun, 28 Oct 2007 21:47:19 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id 134FB13C4BE; Sun, 28 Oct 2007 21:47:19 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (77-109-17-130.dynamic.peoplenet.ua [77.109.17.130]) by halik.com.ua (Postfix) with ESMTP id 2D1855C07D; Sun, 28 Oct 2007 23:47:12 +0200 (EET) Message-ID: <47250359.5070102@chikalov.dp.ua> Date: Sun, 28 Oct 2007 23:47:05 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Roman Divacky References: <4723A8D6.6020002@chikalov.dp.ua> <20071028112910.GA84830@freebsd.org> <4724CBCA.30500@chikalov.dp.ua> <4724D99C.3080105@chikalov.dp.ua> <20071028184318.GA57240@freebsd.org> <4724EA7B.3010103@chikalov.dp.ua> <4724F83F.30503@chikalov.dp.ua> <20071028210706.GA60615@freebsd.org> <4724FF52.7090304@chikalov.dp.ua> <20071028213336.GA61710@freebsd.org> In-Reply-To: <20071028213336.GA61710@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sun, 28 Oct 2007 21:47:19 -0000 Roman Divacky wrote: >>> do you see any obvious flaw in this thought? >> One and half(IMHO). >> >> This occurs accidentally, as I have said I can sometimes start server, >> ask him about something and only after some time find him dead. >> Sometimes I ever cant start it. I think in your scenario it must be >> absolutely deterministic. > > yes.. if only everything could be explained with logic :) it can be something > like "if (some_random_condition) run_optimizer()" ie. it's quite random or > something.. I tend to believe that Oracle DBMS is tuned with AI-like things I think you overdemonising Oracle :-) > >> There are no AMD64 specific in your reasoning. Its working in i386 mode. >> Do you have some ideas about this?. > > I was talking about the gdb thing.. you are using native gdb (built for amd64) > right? Yes right. But my sentence was not connected to gdb but was answer to your explanation of coredumps nature. Obviously I express my minds not clear, sorry for my English. Valery. From owner-freebsd-emulation@FreeBSD.ORG Mon Oct 29 02:02:19 2007 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 BD14916A4C9 for ; Mon, 29 Oct 2007 02:02:19 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 422A613C4C4 for ; Mon, 29 Oct 2007 02:00:50 +0000 (UTC) (envelope-from freebsd-emulation@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ImJve-00017n-JK for freebsd-emulation@freebsd.org; Mon, 29 Oct 2007 02:00:34 +0000 Received: from c-71-193-243-110.hsd1.or.comcast.net ([71.193.243.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Oct 2007 02:00:34 +0000 Received: from zephiris by c-71-193-243-110.hsd1.or.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Oct 2007 02:00:34 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-emulation@freebsd.org From: Zephiris Date: Sun, 28 Oct 2007 19:00:20 -0700 Lines: 280 Message-ID: References: <66147675@ipt.ru> <98294959@ipt.ru> <19713641@serv3.int.kfs.ru> <44625948@srv.sem.ipt.ru> <62540272@srv.sem.ipt.ru> <98203547@srv.sem.ipt.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-193-243-110.hsd1.or.comcast.net User-Agent: KNode/0.10.5 Sender: news Subject: Re: Nvidia LibGL and RELENG_7 linuxulator 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: Mon, 29 Oct 2007 02:02:19 -0000 Boris Samorodov wrote: > On Fri, 26 Oct 2007 18:46:49 -0700 Zephiris wrote: >> Boris Samorodov wrote: >> > On Fri, 26 Oct 2007 03:45:54 -0700 Zephiris wrote: >> >> Boris Samorodov wrote: >> >> > On Thu, 25 Oct 2007 23:31:44 -0700 Zephiris wrote: >> >> >> Boris Samorodov wrote: >> >> >> > On Sat, 20 Oct 2007 16:44:12 -0700 Zephiris wrote: >> >> >> > >> >> >> >> >> >> I've been getting a rather strange issue between Nvidia >> >> >> >> >> >> driver and the linux compatibility. >> >> >> >> >> > >> >> >> >> >> >> I've tried this with default Fedora Core 4 libraries, >> >> >> >> >> >> default 2.4 version emulation, 2.6.16, FC6, F7, and now >> >> >> >> >> >> Gentoo. With older Linux X11 libraries >> >> >> >> >> > >> >> >> >> >> > As of 2.6.16: did you follow instructions from >> >> >> >> >> > /usr/ports/UPDATING while upgrade to 2.6.16? >> >> >> >> > >> >> >> >> >> I just tried it again explicitly following those >> >> >> >> >> instructions from the start, identical results. >> >> >> >> > >> >> >> >> >> >> (eg, those from ports), anything trying to use Nvidia's >> >> >> >> >> >> libGL that installs into the linux compat area will crash >> >> >> >> >> >> immediately. To get this >> >> >> >> >> > >> >> >> >> >> > Crash... Did you ugrade your system and may be forgot to >> >> >> >> >> > upgrade the port? Or did you upgrade the OS without >> >> >> >> >> > reinstalling ports? >> >> >> >> > >> >> >> >> >> This was a pretty fresh installation from CURRENT, not a >> >> >> >> >> long upgrade chain or from 6.x. Everything's up to date. Via >> >> >> >> >> ports itself, there's no way to get newer X11 libraries than >> >> >> >> >> 6.8 itself, correct? >> >> >> >> > >> >> >> >> > If you mean linux libraries then yes. >> >> >> >> > >> >> >> >> > OK. can you describe in details how do you install >> >> >> >> > ports/options/etc to populate /compat/linux from scratch? And >> >> >> >> > which options do you use for nvidia-driver port and other >> >> >> >> > *GL* ports? >> >> >> > >> >> >> >> I install in order emulators/linux_base-fc6, >> >> >> >> x11/linux-xorg-libs, x11/nvidia-driver (with ACPI and LINUX >> >> >> >> flags), x11-toolkits/linux-gtk2, then x11-toolkits/linux-gtk. >> >> >> >> It's enough to test a number of things. >> >> >> > >> >> >> > So far so good. Did you try to use a linux-app here? Acrobat >> >> >> > Reader or else? >> >> > >> >> > Nobody can help you if you don't want to. >> > >> >> Other non-GL apps work alright when everything is installed via >> >> ports, including X11 and otherwise. Acrobat Reader works, >> >> linux-firefox works, linux-opera works, etc. >> > >> > OK, good. Thanks for the answer. >> > >> >> >> >> >> ldd glxinfo >> >> >> >> >> glxinfo: >> >> >> >> >> libGLU.so.1 => /usr/X11R6/lib/libGLU.so.1 (0x2806a000) >> >> >> >> >> libGL.so.1 => /usr/lib/libGL.so.1 (0x280eb000) >> >> >> >> > >> >> >> >> > That is very strange. This library should be at least at >> >> >> >> > /usr/local/lib directory. Can you show an output of >> >> >> >> > "pkg_info -W /usr/lib/libGL.so.1"? > > I'd like to get an answer for this question. [2] pkg_info -W /usr/lib/libGL.so.1 pkg_info: /usr/lib/libGL.so.1: file cannot be found > >> >> >> >> That's for a linux glxinfo. >> >> >> > >> >> >> > Don't understand you answer. Is it from ports? Or does you >> >> >> > installed it by hand? >> >> >> It's from linux_dri, so put there by hand, >> >> > >> >> > Can't follow you: "It's from ports, so put it somewhere by hand..." >> > >> >> Okay, a different example then. Neverwinter Night's nwmain installed >> >> from ports (against regular FC6 and everything else specifically via >> >> ports): >> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> > Seems you are misleading yourself. Take a look at [1]. Those libraries >> > do not belong to the base system. > >> No, that's why they're installed via ports? Pretty clear? > > Fair enough. But you didn't prove it (give an answer for [2]) and > still show that libraries from ports got installed to /usr/lib. > If you don't change a default configuration they should go either to > /usr/local or /compat/linux. If not then the port is broken and it's > worth a PR. Running ldd on a linux binary doesn't prepend /compat/linux/ to the output. Nothing's actually in /usr/lib. > >> Why would any of >> the linux compatibility libraries be installed as "part of the base >> system"? > > This is just the question I wanted to ask you. ;-) > With the default configuration they shouldn't. > >> >> nwmain: >> >> libm.so.6 => /lib/libm.so.6 (0x28642000) >> >> libpthread.so.0 => /lib/libpthread.so.0 (0x2866a000) >> >> libGL.so.1 => /usr/lib/libGL.so.1 (0x28680000) >> > ^^^^^^^^^^^^^^^^^^^ [1] > > Seconded [2] and do you really have /usr/lib/libGL.so.1 (a file or a > link etc.)? Or is a linuxbase (/compat/linux) is somehow got stripped? > So far seems that it is a main question. 'cause this file can be at > /usr/local/lib, /usr/X11R6/lib, /compat/linux/ but not at /usr/lib. I don't know why ldd doesn't add /compat/linux, but it's pretty obvious via the output when something's a FreeBSD binary vs. a Linux one. > >> >> libGLU.so.1 => /usr/X11R6/lib/libGLU.so.1 (0x28716000) >> >> libmss.so.6 => not found >> >> libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x28796000) >> > ^^^^^^^^^^^^^^^^^^^^^^^^ [1] >> >> libc.so.6 => /lib/libc.so.6 (0x2881c000) >> >> /lib/ld-linux.so.2 (0x28623000) >> >> libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0x28960000) >> > ^^^^^^^^^^^^^^^^^^^^^^^ [1] >> >> libnvidia-tls.so.1 => /usr/lib/libnvidia-tls.so.1 >> >> (0x292f8000) >> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [1] >> >> libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x292fa000) >> >> libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x29309000) >> >> libdl.so.2 => /lib/libdl.so.2 (0x293dc000) >> >> libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x293e1000) >> >> libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x294ca000) >> > >> >> > Anyway this configuration is not supported by the FreeBSD-emulation >> >> > team. >> > >> >> Alright, switching back over to ports everything again, >> > >> > Hope, it's clear to you that you didn't succeed in it. > >> /compat/linux/usr/lib/libSDL-1.2.so.0 was installed by package >> linux-sdl-1.2.10,1 >> /compat/linux/usr/lib/libGL.so.100.14.19 was installed by package >> nvidia-driver-100.14.19 >> /compat/linux/usr/lib/libGLcore.so.100.14.19 was installed by package >> nvidia-driver-100.14.19 >> /compat/linux/usr/lib/libnvidia-tls.so.100.14.19 was installed by >> package nvidia-driver-100.14.19 > > That's good. > >> (the respective Nvidia libraries are symlinks to the longer versioned >> ones) > > And this is not clear. Symlinked to where? As far as I can see to > /usr/lib which shouldn't happen.' > lrwxr-xr-x 1 root wheel 18B Oct 26 01:31 /compat/linux/usr/lib/libGL.so.1 -> libGL.so.100.14.19 Etc. >> >> the issues of >> >> everything that tries to load OpenGL crashing still persist. Running >> >> ktrace+linux_kdump doesn't appear to yield any pattern of behavior or >> >> calls before the segfault. >> > >> > Actually you get a system which may fault any time (I mean >> > linuxulator). You don't have a control over your system now. >> > Linux (and may be other) libraries are spread here and there. >> > >> > I'd recommend you reinstalling the system from scratch, sorry. > >> As I've said, I've done that several times already. You suggested that >> before, and I did it again then. > > If you give answers to some questions and leave alone others -- I have > to deal with it. Hence I may give wrong recommendations, sorry. > >> Did it change the result? No. Everything >> in /compat/linux/ right now is only what's there installed via >> ports. > > Everithing in /compat/linux was never a question at this thread. But > /usr/lib has been. > >> I'm >> not mixing and matching or spreading around anything. > > OK, there is enough questions at this letter to prove your point. > >> Again, the only things there right now are official ports, hence no >> libglut or glxinfo now, either. > > BTW, about glx. I installed it at a test host (without nvidia stuff) > and here it is: > ----- > # uname -srm > FreeBSD 7.0-BETA1 i386 > # ldd `which glxinfo` > /usr/local/bin/glxinfo: > libglut.so.4 => /usr/local/lib/libglut.so.4 (0x28080000) > libGLU.so.1 => /usr/local/lib/libGLU.so.1 (0x280b7000) > libGL.so.1 => /usr/local/lib/libGL.so.1 (0x28134000) > libXext.so.6 => /usr/local/lib/libXext.so.6 (0x28195000) > libXmu.so.6 => /usr/local/lib/libXmu.so.6 (0x281a3000) > libXi.so.6 => /usr/local/lib/libXi.so.6 (0x281b8000) > libX11.so.6 => /usr/local/lib/libX11.so.6 (0x281c0000) > libm.so.5 => /lib/libm.so.5 (0x282ac000) > libthr.so.3 => /lib/libthr.so.3 (0x282c1000) > libc.so.7 => /lib/libc.so.7 (0x282d4000) > libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x283d1000) > libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x284bb000) > libXxf86vm.so.1 => /usr/local/lib/libXxf86vm.so.1 (0x284c6000) > libXdamage.so.1 => /usr/local/lib/libXdamage.so.1 (0x284cb000) > libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0x284ce000) > libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0x284d3000) > libXau.so.6 => /usr/local/lib/libXau.so.6 (0x284e2000) > libXt.so.6 => /usr/local/lib/libXt.so.6 (0x284e5000) > libSM.so.6 => /usr/local/lib/libSM.so.6 (0x28535000) > libICE.so.6 => /usr/local/lib/libICE.so.6 (0x2853d000) > libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x28554000) > librpcsvc.so.4 => /usr/lib/librpcsvc.so.4 (0x28559000) > ----- > > Libraries from ports and base system are at the designed directories. That's a FreeBSD binary, though. ldd `which glxinfo` /usr/local/bin/glxinfo: libglut.so.4 => /usr/local/lib/libglut.so.4 (0x2807f000) libGLU.so.1 => /usr/local/lib/libGLU.so.1 (0x280b5000) libGL.so.1 => /usr/local/lib/libGL.so.1 (0x28130000) libXext.so.6 => /usr/local/lib/libXext.so.6 (0x281d1000) libXmu.so.6 => /usr/local/lib/libXmu.so.6 (0x281df000) libXi.so.6 => /usr/local/lib/libXi.so.6 (0x281f5000) libX11.so.6 => /usr/local/lib/libX11.so.6 (0x281fd000) libm.so.5 => /lib/libm.so.5 (0x282e8000) libthr.so.3 => /lib/libthr.so.3 (0x282fd000) libc.so.7 => /lib/libc.so.7 (0x2830f000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x28408000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x284f0000) libGLcore.so.1 => /usr/local/lib/libGLcore.so.1 (0x28503000) libnvidia-tls.so.1 => /usr/local/lib/libnvidia-tls.so.1 (0x28e54000) libXau.so.6 => /usr/local/lib/libXau.so.6 (0x28e56000) libXt.so.6 => /usr/local/lib/libXt.so.6 (0x28e59000) libSM.so.6 => /usr/local/lib/libSM.so.6 (0x28ea8000) libICE.so.6 => /usr/local/lib/libICE.so.6 (0x28eb0000) libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x28ec7000) librpcsvc.so.4 => /usr/lib/librpcsvc.so.4 (0x28ecc000) > >> The only thing thus far which doesn't work as >> expected is accelerated OpenGL. That's why I'm trying hard to get it >> working, and have suggested alternatives, but with everything at >> suggested and stated defaults, all linux apps will apparently do is >> crash once they try to load libGL.so.1. If I knew why or had been able >> to find an answer, I'd include it. That's why I suggested that >> specifically might just be an interaction with the older X11 libraries, >> too, but I'm not the expert. > > All you use (but linux_base-fc6) is a default configuration. It should > work. Let's find out why it doesn't. > > > WBR From owner-freebsd-emulation@FreeBSD.ORG Mon Oct 29 11:07:03 2007 Return-Path: Delivered-To: freebsd-emulation@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE8AE16A4A6 for ; Mon, 29 Oct 2007 11:07:00 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id BDE6313C4AA for ; Mon, 29 Oct 2007 11:07:00 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9TB70pm090068 for ; Mon, 29 Oct 2007 11:07:00 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l9TB70Ms090064 for freebsd-emulation@FreeBSD.org; Mon, 29 Oct 2007 11:07:00 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 29 Oct 2007 11:07:00 GMT Message-Id: <200710291107.l9TB70Ms090064@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-emulation@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-emulation@FreeBSD.org 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: Mon, 29 Oct 2007 11:07:04 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/21463 emulation [linux] Linux compatability mode should not allow setu o kern/97326 emulation [linux] file descriptor leakage in linux emulation o kern/102956 emulation [linux] [patch] Add partial support for SO_PEERCRED in o kern/117010 emulation [linuxolator] linux_getdents() get something like buff o ports/117350 emulation compile error in emulators/vmware3 5 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 o kern/29698 emulation [linux] [patch] linux ipcs doesn'work o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/41543 emulation [patch] feature request: easier wine/w23 support o kern/55835 emulation [linux] [patch] Linux IPC emulation missing SETALL sys a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/73777 emulation [linux] [patch] linux emulation: root dir special hand o kern/91293 emulation [svr4] [patch] *Experimental* Update to the SVR4 emula 8 problems total. From owner-freebsd-emulation@FreeBSD.ORG Mon Oct 29 17:59:03 2007 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 5FF0D16A477 for ; Mon, 29 Oct 2007 17:59:03 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from mail.ipt.ru (mail.ipt.ru [194.62.233.102]) by mx1.freebsd.org (Postfix) with ESMTP id 0D92313C4AC for ; Mon, 29 Oct 2007 17:59:00 +0000 (UTC) (envelope-from bsam@ipt.ru) Received: from sp34.ipt.ru ([194.62.233.107] helo=bs1.sp34.ru) by mail.ipt.ru with esmtp (Exim 4.62 (FreeBSD)) (envelope-from ) id 1ImRsU-000Hzd-Mz; Mon, 29 Oct 2007 13:29:50 +0300 Received: from bsam by bs1.sp34.ru with local (Exim 4.63 (FreeBSD)) (envelope-from ) id 1ImRud-0001iL-86; Mon, 29 Oct 2007 13:32:03 +0300 To: Zephiris References: <66147675@ipt.ru> <98294959@ipt.ru> <19713641@serv3.int.kfs.ru> <44625948@srv.sem.ipt.ru> <62540272@srv.sem.ipt.ru> <98203547@srv.sem.ipt.ru> From: Boris Samorodov Date: Mon, 29 Oct 2007 13:32:03 +0300 In-Reply-To: (zephiris@gmail.com's message of "Sun, 28 Oct 2007 19:00:20 -0700") Message-ID: <32103420@bs1.sp34.ru> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-emulation@freebsd.org Subject: Re: Nvidia LibGL and RELENG_7 linuxulator 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: Mon, 29 Oct 2007 17:59:03 -0000 On Sun, 28 Oct 2007 19:00:20 -0700 Zephiris wrote: > That's a FreeBSD binary, though. Got it. Can you test if net/skype with nvidia works or not for you? If not it's time for a PR. When filing a PR please don't strip actual commands from the email you prepair (it will help better understanding what's going on). WBR -- Boris Samorodov (bsam) Research Engineer, http://www.ipt.ru Telephone & Internet SP FreeBSD committer, http://www.FreeBSD.org The Power To Serve From owner-freebsd-emulation@FreeBSD.ORG Tue Oct 30 19:47:27 2007 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 B1A8616A417; Tue, 30 Oct 2007 19:47:27 +0000 (UTC) (envelope-from cwt@networks.cwu.edu) Received: from nsc0.cwu.edu (nsc0.cwu.edu [198.104.69.44]) by mx1.freebsd.org (Postfix) with ESMTP id 752DA13C4C2; Tue, 30 Oct 2007 19:47:27 +0000 (UTC) (envelope-from cwt@networks.cwu.edu) Received: from n.cwu.edu (n.cwu.edu [198.104.69.57]) by nsc0.cwu.edu (8.14.1/8.14.1) with ESMTP id l9UJaSsH028265; Tue, 30 Oct 2007 12:36:29 -0700 (PDT) (envelope-from cwt@networks.cwu.edu) Received: from n.cwu.edu (localhost [127.0.0.1]) by n.cwu.edu (8.13.3/8.13.3) with ESMTP id l9UJaSBH008874; Tue, 30 Oct 2007 12:36:28 -0700 (PDT) (envelope-from cwt@networks.cwu.edu) Received: from localhost (cwt@localhost) by n.cwu.edu (8.13.3/8.13.1/Submit) with ESMTP id l9UJaSjR008871; Tue, 30 Oct 2007 12:36:28 -0700 (PDT) (envelope-from cwt@networks.cwu.edu) X-Authentication-Warning: n.cwu.edu: cwt owned process doing -bs Date: Tue, 30 Oct 2007 12:36:28 -0700 (PDT) From: Chris Timmons X-X-Sender: cwt@n.cwu.edu To: Tim Clewlow In-Reply-To: <252027.47184.qm@web50312.mail.re2.yahoo.com> Message-ID: <20071030122533.B5634@n.cwu.edu> References: <252027.47184.qm@web50312.mail.re2.yahoo.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-3.0 (nsc0.cwu.edu [198.104.69.44]); Tue, 30 Oct 2007 12:36:29 -0700 (PDT) Cc: jylefort@freebsd.org, freebsd-emulation@freebsd.org Subject: Re: Which "linux emulation" works with which programs or the inverse? 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: Tue, 30 Oct 2007 19:47:27 -0000 Thanks; this works really well. I was also able to get graphics/linux-adobesvg working with a couple of minor adjustments: LICENSE.txt is put by the port into /usr/local/share/doc/linux-adobesvg, but the plugin will look for it in /usr/local/lib/linux-adobesvg. It needs to be manually copied in order for the plugin to prompt you to accept the license. nspluginwrapper -v -i /usr/local/lib/linux-adobesvg/libNPSVG3.so Regards, -Chris On Wed, 24 Oct 2007, Tim Clewlow wrote: > Hi there, I have native firefox with flash 7 working fine on FreeBSD 6.2, with > java and adobe reader. I am guessing it should be pretty much the same for FBSD > 7. > > # Short and sweet summary: > > install www/firefox > install print/acroread7 > install java/diablo-jdk15 > install www/linux-flashplugin7 > kldload linux > echo "none /compat/linux/proc linprocfs rw 0 > 0" >> /etc/fstab > mount -a > echo "linux_enable=\"YES\"" >> /etc/rc.conf > nspluginwrapper -v -a -i > > Hope this at least gives pointers as to what to do in FreeBSD 7. > > Regards, Tim. From owner-freebsd-emulation@FreeBSD.ORG Wed Oct 31 19:44:06 2007 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 A9C5116A419; Wed, 31 Oct 2007 19:44:06 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id 3BEDF13C4B6; Wed, 31 Oct 2007 19:44:05 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by koef.zs64.net (8.14.1/8.14.1) with ESMTP id l9VI6eSN093703; Wed, 31 Oct 2007 19:06:40 +0100 (CET) (envelope-from cracauer@koef.zs64.net) Received: (from cracauer@localhost) by koef.zs64.net (8.14.1/8.14.1/Submit) id l9VI6ewn093702; Wed, 31 Oct 2007 14:06:40 -0400 (EDT) (envelope-from cracauer) Date: Wed, 31 Oct 2007 14:06:40 -0400 From: Martin Cracauer To: "Valery V.Chikalov" Message-ID: <20071031180639.GA93259@cons.org> References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4723A8D6.6020002@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i Cc: freebsd-emulation@freebsd.org, Ivan Voras Subject: Re: Linux emulation on FreeBSD AMD64 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: Wed, 31 Oct 2007 19:44:06 -0000 Valery V.Chikalov wrote on Sun, Oct 28, 2007 at 12:08:38AM +0300: > Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 > Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 > Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 > Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 You need to check whether these is anything mapped there in the first place and what the permissions are. This is probably best done by changing your debugging code in the Linuxulator to print amessage, then sleep for 10 seconds giving you time to copy the memory map to a safe place, then look up what the mapping at the position was. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/ From owner-freebsd-emulation@FreeBSD.ORG Thu Nov 1 08:33:06 2007 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 BB2BC16A417 for ; Thu, 1 Nov 2007 08:33:06 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from ns.novakom.com.ua (novakom.com.ua [213.154.219.248]) by mx1.freebsd.org (Postfix) with ESMTP id 5FC8F13C494 for ; Thu, 1 Nov 2007 08:33:06 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from novakom.com.ua (post [192.168.1.254]) by ns.novakom.com.ua (Postfix) with SMTP id A7D4517374 for ; Thu, 1 Nov 2007 10:32:17 +0200 (EET) Received: (qmail 56173 invoked by uid 0); 1 Nov 2007 08:32:17 -0000 Received: from 192.168.1.210 by post.novakom.dp.ua (envelope-from , uid 82) with qmail-scanner-1.25 (clamdscan: devel-20051128/1195. Clear:RC:1(192.168.1.210):. Processed in 0.025282 secs); 01 Nov 2007 08:32:17 -0000 X-Qmail-Scanner-Mail-From: valera@chikalov.dp.ua via post.novakom.dp.ua X-Qmail-Scanner: 1.25 (Clear:RC:1(192.168.1.210):. Processed in 0.025282 secs) Received: from goliath.novakom.dp.ua (192.168.1.210) by post.novakom.dp.ua with SMTP; 1 Nov 2007 08:32:17 -0000 Message-ID: <47298F10.4050301@chikalov.dp.ua> Date: Thu, 01 Nov 2007 10:32:16 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070921) MIME-Version: 1.0 To: Martin Cracauer References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071031180639.GA93259@cons.org> In-Reply-To: <20071031180639.GA93259@cons.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Thu, 01 Nov 2007 08:33:06 -0000 Martin Cracauer wrote: > Valery V.Chikalov wrote on Sun, Oct 28, 2007 at 12:08:38AM +0300: >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 >> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 >> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 >> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 > > You need to check whether these is anything mapped there in the first > place and what the permissions are. > > This is probably best done by changing your debugging code in the > Linuxulator to print amessage, then sleep for 10 seconds giving you > time to copy the memory map to a safe place, then look up what the > mapping at the position was. > > Martin Hi, Martin. Thank you for the hint. But I'm not sure that I understanding you right. I'm not a kernel hacker, just C-programmer with ability to read documentation. :-) Do the "memory map" about you told is some C-struct I can deal with and which can be accessed by some system call, or that task ("copy the memory map") can be achieved by some userland utility like "ipcs" or "vmstat -m". I already have tried to understand which memory(in Shared Memory) and how Oracle uses but don't know how to make it ever on "macro" level. This is little different problem, but while we are here. "ipcs -m" is always showing only one piece of memory like that: Shared Memory: T ID KEY MODE OWNER GROUP m 131072 -976851172 --rw-rw---- oracle oracle I'm doubt that Oracle uses only this one. I'm ever don't know how to detect size of memory used by Oracle (from operation system point of view, oracle has it's own "show sga" command). "ipcs -M" give me only min/max limits. "vmstat -m" don't contains a mention about oracle. Definitely I'm missing something obvious, will be glad to hear what exactly. :-) Thanks. Valery. From owner-freebsd-emulation@FreeBSD.ORG Thu Nov 1 15:26:24 2007 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 5D64D16A469 for ; Thu, 1 Nov 2007 15:26:24 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by mx1.freebsd.org (Postfix) with ESMTP id CDBC013C4B8 for ; Thu, 1 Nov 2007 15:26:23 +0000 (UTC) (envelope-from cracauer@koef.zs64.net) Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by koef.zs64.net (8.14.1/8.14.1) with ESMTP id lA1FPoQj011081; Thu, 1 Nov 2007 16:25:50 +0100 (CET) (envelope-from cracauer@koef.zs64.net) Received: (from cracauer@localhost) by koef.zs64.net (8.14.1/8.14.1/Submit) id lA1FPoax011080; Thu, 1 Nov 2007 11:25:50 -0400 (EDT) (envelope-from cracauer) Date: Thu, 1 Nov 2007 11:25:50 -0400 From: Martin Cracauer To: "Valery V.Chikalov" Message-ID: <20071101152550.GA10868@cons.org> References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071031180639.GA93259@cons.org> <47298F10.4050301@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47298F10.4050301@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i Cc: Martin Cracauer , freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Thu, 01 Nov 2007 15:26:24 -0000 Valery V.Chikalov wrote on Thu, Nov 01, 2007 at 10:32:16AM +0200: > Martin Cracauer wrote: > >Valery V.Chikalov wrote on Sun, Oct 28, 2007 at 12:08:38AM +0300: > >>Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 > >>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 > >>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 > >>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 > >>Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 > >>Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 > >>Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 > > > >You need to check whether these is anything mapped there in the first > >place and what the permissions are. > > > >This is probably best done by changing your debugging code in the > >Linuxulator to print amessage, then sleep for 10 seconds giving you > >time to copy the memory map to a safe place, then look up what the > >mapping at the position was. > > > >Martin > > Hi, Martin. > > Thank you for the hint. > But I'm not sure that I understanding you right. > I'm not a kernel hacker, just C-programmer with ability to read > documentation. :-) > Do the "memory map" about you told is some C-struct I can deal with and > which can be accessed by some system call, or that task ("copy the > memory map") can be achieved by some userland utility like "ipcs" or > "vmstat -m". No, you need the contents of /proc//map and /compat/linux/proc//maps This is why you hack up the kernel to wait a while, before the syscall is actually executed you want the time to grab both these files for the process and save them somewhere (cp /proc... /tmp/ is sufficient). I suspect the difference between Linux and FreeBSD here is what kind of existing mapping you are allowed to change in permissions. Should be reasonably easy to fix once we know both side, what permissions you had before (from the maps) and where you want to go (from the syscall arguments). Might be more hairy if some special kind of memory is involved but we'll see. Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ FreeBSD - where you want to go, today. http://www.freebsd.org/ From owner-freebsd-emulation@FreeBSD.ORG Fri Nov 2 11:05:31 2007 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 2AF1E16A417 for ; Fri, 2 Nov 2007 11:05:31 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from ns.novakom.com.ua (novakom.com.ua [213.154.219.248]) by mx1.freebsd.org (Postfix) with ESMTP id 2E11913C494 for ; Fri, 2 Nov 2007 11:05:29 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from novakom.com.ua (post [192.168.1.254]) by ns.novakom.com.ua (Postfix) with SMTP id 6838F17880 for ; Fri, 2 Nov 2007 13:04:53 +0200 (EET) Received: (qmail 1771 invoked by uid 0); 2 Nov 2007 11:04:53 -0000 Received: from 192.168.1.210 by post.novakom.dp.ua (envelope-from , uid 82) with qmail-scanner-1.25 (clamdscan: devel-20051128/1195. Clear:RC:1(192.168.1.210):. Processed in 0.447525 secs); 02 Nov 2007 11:04:53 -0000 X-Qmail-Scanner-Mail-From: valera@chikalov.dp.ua via post.novakom.dp.ua X-Qmail-Scanner: 1.25 (Clear:RC:1(192.168.1.210):. Processed in 0.447525 secs) Received: from goliath.novakom.dp.ua (192.168.1.210) by post.novakom.dp.ua with SMTP; 2 Nov 2007 11:04:52 -0000 Message-ID: <472B0454.9040408@chikalov.dp.ua> Date: Fri, 02 Nov 2007 13:04:52 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070921) MIME-Version: 1.0 To: Martin Cracauer References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071031180639.GA93259@cons.org> <47298F10.4050301@chikalov.dp.ua> <20071101152550.GA10868@cons.org> In-Reply-To: <20071101152550.GA10868@cons.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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, 02 Nov 2007 11:05:31 -0000 Martin Cracauer wrote: > Valery V.Chikalov wrote on Thu, Nov 01, 2007 at 10:32:16AM +0200: >> Martin Cracauer wrote: >>> Valery V.Chikalov wrote on Sun, Oct 28, 2007 at 12:08:38AM +0300: >>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 >>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 >>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 >>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 >>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 >>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 >>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 >>> You need to check whether these is anything mapped there in the first >>> place and what the permissions are. >>> >>> This is probably best done by changing your debugging code in the >>> Linuxulator to print amessage, then sleep for 10 seconds giving you >>> time to copy the memory map to a safe place, then look up what the >>> mapping at the position was. >>> >>> Martin >> Hi, Martin. >> >> Thank you for the hint. >> But I'm not sure that I understanding you right. >> I'm not a kernel hacker, just C-programmer with ability to read >> documentation. :-) >> Do the "memory map" about you told is some C-struct I can deal with and >> which can be accessed by some system call, or that task ("copy the >> memory map") can be achieved by some userland utility like "ipcs" or >> "vmstat -m". > > No, you need the contents of > /proc//map > and > /compat/linux/proc//maps > Hi, Martin. Thank you for help. You have reminded me about the /proc, which I have stopped using a long time ago as "deprecated" in favor of sysctl. In this case it is really useful. > This is why you hack up the kernel to wait a while, before the syscall > is actually executed you want the time to grab both these files for > the process and save them somewhere (cp /proc... /tmp/ is sufficient). > I can use a little simpler method as I have perfectly running exemplar of Oracle on another computer on FreeBSD in i386 mode. So in first place I'm getting: oerr ORA 27122 27122, 00000, "unable to protect memory" // *Cause: mprotect() call failed After the diagnostic patch proposed by rdivacky@ to linux_machdep.c +#if 0 if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) bsd_args.prot |= PROT_READ | PROT_EXEC; +#endif I got started oracle and see expected difference between /compat/linux/proc//maps: (i386) 2a846000-2a849000 rwxp 00003000 00:00 0 50000000-60000000 rwxp 10083000 00:00 0 60000000-60001000 r-xp 10083000 00:00 0 60001000-60081000 rwxp 10083000 00:00 0 60081000-60082000 r-xp 10083000 00:00 0 60082000-60083000 rwxp 10083000 00:00 0 bf7e0000-bf800000 rwxp 00020000 00:00 0 (AMD64) 2a7c3000-2a804000 rwxp 00041000 00:00 0 50000000-55c00000 rw-p 05c83000 00:00 0 55c00000-55c01000 r--p 05c83000 00:00 0 55c01000-55c81000 rw-p 05c83000 00:00 0 55c81000-55c82000 r--p 05c83000 00:00 0 55c82000-55c83000 rw-p 05c83000 00:00 0 fffdf000-fffff000 rwxp 00020000 00:00 0 Note absence of the execution bit. And then after some time Oracle coredumps quotation from rdivacky@ mail: >I think its quite obvious... oracle expects some memory is executable >and tries to execute something in it but freebsd has non-exec bit set >on that memory hence core dump... I tend to agree, but see below... > I suspect the difference between Linux and FreeBSD here is what kind My point is that we must look for the difference not between Linux and FreeBSD, but between FreeBSD(i386) and FreeBSD(AMD64), or between Linux and Linux emulation on FreeBSD *AMD64* and any explanations of this artifact must contain an AMD64 specific. > of existing mapping you are allowed to change in permissions. Should > be reasonably easy to fix once we know both side, what permissions you > had before (from the maps) and where you want to go (from the > syscall arguments). Might be more hairy if some special kind of > memory is involved but we'll see. Thanks. Valery. > > Martin From owner-freebsd-emulation@FreeBSD.ORG Fri Nov 2 21:58:09 2007 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 6E0DA16A420 for ; Fri, 2 Nov 2007 21:58:09 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id B90C313C4B7 for ; Fri, 2 Nov 2007 21:58:08 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id 8476D5C034; Fri, 2 Nov 2007 23:57:41 +0200 (EET) Message-ID: <472B9CD1.1010607@chikalov.dp.ua> Date: Fri, 02 Nov 2007 23:55:29 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Martin Cracauer References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071031180639.GA93259@cons.org> <47298F10.4050301@chikalov.dp.ua> <20071101152550.GA10868@cons.org> <472B0454.9040408@chikalov.dp.ua> In-Reply-To: <472B0454.9040408@chikalov.dp.ua> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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, 02 Nov 2007 21:58:09 -0000 Valery V.Chikalov wrote: > Martin Cracauer wrote: >> Valery V.Chikalov wrote on Thu, Nov 01, 2007 at 10:32:16AM +0200: >>> Martin Cracauer wrote: >>>> Valery V.Chikalov wrote on Sun, Oct 28, 2007 at 12:08:38AM +0300: >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a27d000, return 0 >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7c1000, return 0 >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7cd000, return 0 >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7e2000, return 0 >>>>> Oct 27 19:42:59 tiger kernel: mprotect addr:2a7ef000, return 0 >>>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c00000, return 13 >>>>> Oct 27 19:43:09 tiger kernel: mprotect addr:55c81000, return 13 >>>> You need to check whether these is anything mapped there in the first >>>> place and what the permissions are. >>>> >>>> This is probably best done by changing your debugging code in the >>>> Linuxulator to print amessage, then sleep for 10 seconds giving you >>>> time to copy the memory map to a safe place, then look up what the >>>> mapping at the position was. >>>> >>>> Martin >>> Hi, Martin. >>> >>> Thank you for the hint. >>> But I'm not sure that I understanding you right. >>> I'm not a kernel hacker, just C-programmer with ability to read >>> documentation. :-) >>> Do the "memory map" about you told is some C-struct I can deal with >>> and which can be accessed by some system call, or that task ("copy >>> the memory map") can be achieved by some userland utility like "ipcs" >>> or "vmstat -m". >> >> No, you need the contents of /proc//map >> and >> /compat/linux/proc//maps >> > > Hi, Martin. > > Thank you for help. > You have reminded me about the /proc, which I have stopped using a long > time ago as "deprecated" in favor of sysctl. In this case it is really > useful. > >> This is why you hack up the kernel to wait a while, before the syscall >> is actually executed you want the time to grab both these files for >> the process and save them somewhere (cp /proc... /tmp/ is sufficient). >> > > I can use a little simpler method as I have perfectly running exemplar > of Oracle on another computer on FreeBSD in i386 mode. > > So in first place I'm getting: > > oerr ORA 27122 > 27122, 00000, "unable to protect memory" > // *Cause: mprotect() call failed > > After the diagnostic patch proposed by rdivacky@ to linux_machdep.c > > +#if 0 > if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC)) > bsd_args.prot |= PROT_READ | PROT_EXEC; > +#endif > > I got started oracle and see expected difference between > /compat/linux/proc//maps: > (i386) > 2a846000-2a849000 rwxp 00003000 00:00 0 > 50000000-60000000 rwxp 10083000 00:00 0 > 60000000-60001000 r-xp 10083000 00:00 0 > 60001000-60081000 rwxp 10083000 00:00 0 > 60081000-60082000 r-xp 10083000 00:00 0 > 60082000-60083000 rwxp 10083000 00:00 0 > bf7e0000-bf800000 rwxp 00020000 00:00 0 > (AMD64) > 2a7c3000-2a804000 rwxp 00041000 00:00 0 > 50000000-55c00000 rw-p 05c83000 00:00 0 > 55c00000-55c01000 r--p 05c83000 00:00 0 > 55c01000-55c81000 rw-p 05c83000 00:00 0 > 55c81000-55c82000 r--p 05c83000 00:00 0 > 55c82000-55c83000 rw-p 05c83000 00:00 0 > fffdf000-fffff000 rwxp 00020000 00:00 0 > > Note absence of the execution bit. > > And then after some time Oracle coredumps > > quotation from rdivacky@ mail: > > >I think its quite obvious... oracle expects some memory is executable > >and tries to execute something in it but freebsd has non-exec bit set > >on that memory hence core dump... > > I tend to agree, but see below... > >> I suspect the difference between Linux and FreeBSD here is what kind > > My point is that we must look for the difference not between Linux and > FreeBSD, but between FreeBSD(i386) and FreeBSD(AMD64), or between Linux > and Linux emulation on FreeBSD *AMD64* and any explanations of this > artifact must contain an AMD64 specific. > > > of existing mapping you are allowed to change in permissions. Should > > be reasonably easy to fix once we know both side, what permissions you > > had before (from the maps) and where you want to go (from the > > syscall arguments). Might be more hairy if some special kind of > > memory is involved but we'll see. Ok, I have fond what is so special with this memory. Oracle uses SYSV shared memory, and comparing output from "ipcs -mb" and /compat/linux/proc//maps it's became clear that that suspiciously looking too high addresses of memory chunks with missed execution bit are SYSV shared memory areas. > 50000000-55c00000 rw-p 05c83000 00:00 0 - this is main chunk which can be seen in output of "show sga" sqlplus command > 55c00000-55c01000 r--p 05c83000 00:00 0 > 55c01000-55c81000 rw-p 05c83000 00:00 0 > 55c81000-55c82000 r--p 05c83000 00:00 0 > 55c82000-55c83000 rw-p 05c83000 00:00 0 - this are adjusted to the end small (4096) pieces So, the question is what is changed in AMD64 arch with respect to SYSV shared memory? Why vm_map_protect from /sys/vm/vm_mmap.c returns KERN_PROTECTION_FAILURE in attempts to change protection of such type of memory? Args are: vm_map_protect:addr:1438646272, addr+size:1438650368, prot:5 Thanks. Valery. > >> >> Martin > > > > _______________________________________________ > freebsd-emulation@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-emulation > To unsubscribe, send any mail to > "freebsd-emulation-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Sat Nov 3 10:52:55 2007 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 C4DFD16A41A for ; Sat, 3 Nov 2007 10:52:55 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 7CACF13C4B6 for ; Sat, 3 Nov 2007 10:52:54 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 1E4EC669A9C; Sat, 3 Nov 2007 10:34:56 +0100 (CET) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B0TMDoe-o5pi; Sat, 3 Nov 2007 10:34:54 +0100 (CET) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 9F0DD669A70; Sat, 3 Nov 2007 10:34:54 +0100 (CET) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id lA39Yr05063122; Sat, 3 Nov 2007 10:34:53 +0100 (CET) (envelope-from rdivacky) Date: Sat, 3 Nov 2007 10:34:53 +0100 From: Roman Divacky To: "Valery V.Chikalov" Message-ID: <20071103093453.GA63079@freebsd.org> References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071031180639.GA93259@cons.org> <47298F10.4050301@chikalov.dp.ua> <20071101152550.GA10868@cons.org> <472B0454.9040408@chikalov.dp.ua> <472B9CD1.1010607@chikalov.dp.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <472B9CD1.1010607@chikalov.dp.ua> User-Agent: Mutt/1.4.2.3i Cc: Martin Cracauer , freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sat, 03 Nov 2007 10:52:55 -0000 > Ok, I have fond what is so special with this memory. Oracle uses SYSV > shared memory, and comparing output from "ipcs -mb" and > /compat/linux/proc//maps it's became clear that that suspiciously > looking too high addresses of memory chunks with missed execution bit > are SYSV shared memory areas. > > > 50000000-55c00000 rw-p 05c83000 00:00 0 - this is main chunk which > can be seen in output of "show sga" sqlplus command > > > 55c00000-55c01000 r--p 05c83000 00:00 0 > > 55c01000-55c81000 rw-p 05c83000 00:00 0 > > 55c81000-55c82000 r--p 05c83000 00:00 0 > > 55c82000-55c83000 rw-p 05c83000 00:00 0 - this are adjusted to the > end small (4096) pieces > > So, the question is what is changed in AMD64 arch with respect to SYSV > shared memory? > Why vm_map_protect from /sys/vm/vm_mmap.c returns > KERN_PROTECTION_FAILURE in attempts to change protection of such type of > memory? please try www.vlakno.cz/~rdivacky/pav.patch, I wrote that some time ago... it might not apply cleanly.. I am sure you'll cope with that :) please report back roman p.s. when replying please dont include WHOLE mail you reply to.. its very hard to read :( From owner-freebsd-emulation@FreeBSD.ORG Sat Nov 3 14:29:01 2007 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 1540A16A421; Sat, 3 Nov 2007 14:29:01 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from halik.com.ua (halik.com.ua [193.178.146.121]) by mx1.freebsd.org (Postfix) with ESMTP id C3CD013C4AA; Sat, 3 Nov 2007 14:29:00 +0000 (UTC) (envelope-from valera@chikalov.dp.ua) Received: from tiger.novakom.dp.ua (unknown [213.227.219.58]) by halik.com.ua (Postfix) with ESMTP id 4FAED5C032; Sat, 3 Nov 2007 16:28:10 +0200 (EET) Message-ID: <472C84F5.5030404@chikalov.dp.ua> Date: Sat, 03 Nov 2007 16:25:57 +0200 From: "Valery V.Chikalov" User-Agent: Thunderbird 2.0.0.6 (X11/20070814) MIME-Version: 1.0 To: Roman Divacky References: <4721AB07.20708@novakom.com.ua> <4723A8D6.6020002@chikalov.dp.ua> <20071031180639.GA93259@cons.org> <47298F10.4050301@chikalov.dp.ua> <20071101152550.GA10868@cons.org> <472B0454.9040408@chikalov.dp.ua> <472B9CD1.1010607@chikalov.dp.ua> <20071103093453.GA63079@freebsd.org> In-Reply-To: <20071103093453.GA63079@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-emulation@freebsd.org Subject: Re: Linux emulation on FreeBSD AMD64 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: Sat, 03 Nov 2007 14:29:01 -0000 Roman Divacky wrote: >> >> So, the question is what is changed in AMD64 arch with respect to SYSV >> shared memory? >> Why vm_map_protect from /sys/vm/vm_mmap.c returns >> KERN_PROTECTION_FAILURE in attempts to change protection of such type of >> memory? > > please try www.vlakno.cz/~rdivacky/pav.patch, I wrote that some time ago... it might > not apply cleanly.. I am sure you'll cope with that :) > Patch has applied cleanly. > please report back Sorry, but nothing has changed. mprotect returning EACCES, vm_map_protect returning KERN_PROTECTION_FAILURE. Thank you for help. Valery.