Re: [Mono-dev] Bug#819711: PPC_64K_PAGES (Re: Running Mono on 32bits-big endian PowerPC)
On Mon, Apr 11, 2016 at 10:27 AM, Jo Shields <direct...@apebox.org> wrote: > > > On 11/04/16 09:18, Mathieu Malaterre wrote: >> # set patch tag at least to get some attention, may need some tweaking >> # since pagesize on buildd machine != user installed one >> Control: tags -1 patch >> >> On Thu, Mar 31, 2016 at 2:37 PM, Mathieu Malaterre <ma...@debian.org> wrote: >>> Dear all, >>> >>> I am currently trying to resurrect Mono debian package on PowerPC (32bits >>> BE). >>> >>> I have two questions: >>> >>> - Is there a released version I should consider to start with if I >>> want to make mono work son PowerPC again ? >>> >>> - I see some big changes here at: >>> 99902cec93dfbc9e18e3fb6fa07b8770a3bd9adc so I am wondering if version >>> 4.2.1.102 (current debian package) is not a bit too old so get things >>> back in shape. >> >> Answering my own post. >> >> So the bug was really within sgen implementation details: >> ARCH_MIN_MS_BLOCK* definitions. >> >> Within debian infrstratucture, our buildd machines are setup using >> default debian kernel, and the default kernel logical page size was >> changed recently: >> >> [debian/config/kernelarch-powerpc/config-arch-64: Set PPC_64K_PAGES.] >> https://anonscm.debian.org/cgit/kernel/linux.git/commit/?id=aed63a56b189d771116f2d4b8fe10bbec528e6a2 >> >> The ppc32 buildd machine is setup on a ppc64 kernel. For some obscure >> details (at least to me), one cannot run a debian ppc32 kernel on >> ppc64 arch. Which means that the basic `mono` compiler is compiled >> using ppc32 user space, but at C# compile time is executed on ppc64 >> kernel. >> >> I am guessing another simple patch would be to run the bootstrap >> process with gc=none and keep the default sgen 4K setting for ppc32 >> machine. >> >> It would be nice that mono detect any incoherence at runtime, this >> would make tracking this bug in the future *so* much easier. > > Is this patch against 4.2.whateversinsid sufficient to get the build > working fine on the porterbox? Answer: no. Since my -crude- patch should be applied after git commit d9a3c39a. Again there is nothing wrong in the mono code base for ppc32. If you pick the right nursery-size you can build it just fine: $ export MONO_GC_PARAMS=nursery-size=64k $ dpkg-buildpackage -rfakeroot -us -uc 64k is silly but it explains the issue. Cheers ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] PPC_64K_PAGES (Re: Running Mono on 32bits-big endian PowerPC)
No. This should be -ideally- a runtime configuration. pagesize setting(s) during compilation is not the pagesize setting(s) during execution. I am hoping someone with better understanding of sgen implementation could comment on a better runtime patch. -M On Mon, Apr 11, 2016 at 10:32 AM, Alex Rønne Petersen <a...@alexrp.com> wrote: > Hi Mathieu, > > So it would be appropriate to change the #if to > > #if defined (TARGET_POWERPC) || defined (TARGET_POWERPC64) > > if I understand the problem correctly? > > Regards, > Alex > > On Mon, Apr 11, 2016 at 10:18 AM, Mathieu Malaterre <ma...@debian.org> wrote: >> # set patch tag at least to get some attention, may need some tweaking >> # since pagesize on buildd machine != user installed one >> Control: tags -1 patch >> >> On Thu, Mar 31, 2016 at 2:37 PM, Mathieu Malaterre <ma...@debian.org> wrote: >>> Dear all, >>> >>> I am currently trying to resurrect Mono debian package on PowerPC (32bits >>> BE). >>> >>> I have two questions: >>> >>> - Is there a released version I should consider to start with if I >>> want to make mono work son PowerPC again ? >>> >>> - I see some big changes here at: >>> 99902cec93dfbc9e18e3fb6fa07b8770a3bd9adc so I am wondering if version >>> 4.2.1.102 (current debian package) is not a bit too old so get things >>> back in shape. >> >> Answering my own post. >> >> So the bug was really within sgen implementation details: >> ARCH_MIN_MS_BLOCK* definitions. >> >> Within debian infrstratucture, our buildd machines are setup using >> default debian kernel, and the default kernel logical page size was >> changed recently: >> >> [debian/config/kernelarch-powerpc/config-arch-64: Set PPC_64K_PAGES.] >> https://anonscm.debian.org/cgit/kernel/linux.git/commit/?id=aed63a56b189d771116f2d4b8fe10bbec528e6a2 >> >> The ppc32 buildd machine is setup on a ppc64 kernel. For some obscure >> details (at least to me), one cannot run a debian ppc32 kernel on >> ppc64 arch. Which means that the basic `mono` compiler is compiled >> using ppc32 user space, but at C# compile time is executed on ppc64 >> kernel. >> >> I am guessing another simple patch would be to run the bootstrap >> process with gc=none and keep the default sgen 4K setting for ppc32 >> machine. >> >> It would be nice that mono detect any incoherence at runtime, this >> would make tracking this bug in the future *so* much easier. >> >> -M >> >> ___ >> Mono-devel-list mailing list >> Mono-devel-list@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/mono-devel-list >> ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] PPC_64K_PAGES (Re: Running Mono on 32bits-big endian PowerPC)
Actually... that should work. Maybe this will put some more stress on some small systems (small memory size). On Mon, Apr 11, 2016 at 10:32 AM, Alex Rønne Petersen <a...@alexrp.com> wrote: > Hi Mathieu, > > So it would be appropriate to change the #if to > > #if defined (TARGET_POWERPC) || defined (TARGET_POWERPC64) > > if I understand the problem correctly? > > Regards, > Alex > > On Mon, Apr 11, 2016 at 10:18 AM, Mathieu Malaterre <ma...@debian.org> wrote: >> # set patch tag at least to get some attention, may need some tweaking >> # since pagesize on buildd machine != user installed one >> Control: tags -1 patch >> >> On Thu, Mar 31, 2016 at 2:37 PM, Mathieu Malaterre <ma...@debian.org> wrote: >>> Dear all, >>> >>> I am currently trying to resurrect Mono debian package on PowerPC (32bits >>> BE). >>> >>> I have two questions: >>> >>> - Is there a released version I should consider to start with if I >>> want to make mono work son PowerPC again ? >>> >>> - I see some big changes here at: >>> 99902cec93dfbc9e18e3fb6fa07b8770a3bd9adc so I am wondering if version >>> 4.2.1.102 (current debian package) is not a bit too old so get things >>> back in shape. >> >> Answering my own post. >> >> So the bug was really within sgen implementation details: >> ARCH_MIN_MS_BLOCK* definitions. >> >> Within debian infrstratucture, our buildd machines are setup using >> default debian kernel, and the default kernel logical page size was >> changed recently: >> >> [debian/config/kernelarch-powerpc/config-arch-64: Set PPC_64K_PAGES.] >> https://anonscm.debian.org/cgit/kernel/linux.git/commit/?id=aed63a56b189d771116f2d4b8fe10bbec528e6a2 >> >> The ppc32 buildd machine is setup on a ppc64 kernel. For some obscure >> details (at least to me), one cannot run a debian ppc32 kernel on >> ppc64 arch. Which means that the basic `mono` compiler is compiled >> using ppc32 user space, but at C# compile time is executed on ppc64 >> kernel. >> >> I am guessing another simple patch would be to run the bootstrap >> process with gc=none and keep the default sgen 4K setting for ppc32 >> machine. >> >> It would be nice that mono detect any incoherence at runtime, this >> would make tracking this bug in the future *so* much easier. >> >> -M >> >> ___ >> Mono-devel-list mailing list >> Mono-devel-list@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/mono-devel-list >> ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] PPC_64K_PAGES (Re: Running Mono on 32bits-big endian PowerPC)
# set patch tag at least to get some attention, may need some tweaking # since pagesize on buildd machine != user installed one Control: tags -1 patch On Thu, Mar 31, 2016 at 2:37 PM, Mathieu Malaterre <ma...@debian.org> wrote: > Dear all, > > I am currently trying to resurrect Mono debian package on PowerPC (32bits BE). > > I have two questions: > > - Is there a released version I should consider to start with if I > want to make mono work son PowerPC again ? > > - I see some big changes here at: > 99902cec93dfbc9e18e3fb6fa07b8770a3bd9adc so I am wondering if version > 4.2.1.102 (current debian package) is not a bit too old so get things > back in shape. Answering my own post. So the bug was really within sgen implementation details: ARCH_MIN_MS_BLOCK* definitions. Within debian infrstratucture, our buildd machines are setup using default debian kernel, and the default kernel logical page size was changed recently: [debian/config/kernelarch-powerpc/config-arch-64: Set PPC_64K_PAGES.] https://anonscm.debian.org/cgit/kernel/linux.git/commit/?id=aed63a56b189d771116f2d4b8fe10bbec528e6a2 The ppc32 buildd machine is setup on a ppc64 kernel. For some obscure details (at least to me), one cannot run a debian ppc32 kernel on ppc64 arch. Which means that the basic `mono` compiler is compiled using ppc32 user space, but at C# compile time is executed on ppc64 kernel. I am guessing another simple patch would be to run the bootstrap process with gc=none and keep the default sgen 4K setting for ppc32 machine. It would be nice that mono detect any incoherence at runtime, this would make tracking this bug in the future *so* much easier. -M ppc32.patch Description: Binary data ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Backtrace stopped: previous frame inner to this frame (corrupt stack?)
Hi all, I am continuing my quest to understand what is going on with mono on SMP PowerPC. I am now looking at the gdb info produced, namely: [...] #19 0x10014c08 in mono_jit_runtime_invoke (method=0xf7de0018 <_rtld_global>, obj=0xffdba150, params=0xffdba1c0, exc=0x10014c08, error=0x1068fe88) at mini-runtime.c:2691 #20 0x101fec00 in mono_method_signature_checked (m=, error=) at loader.c:2633 Backtrace stopped: previous frame inner to this frame (corrupt stack?) = Got a SIGSEGV while executing native code. This usually indicates a fatal error in the mono runtime or one of the native libraries used by your application. = [...] This small value make it as if a bogus function pointer was passed. Is there a way to confirm that this is the case (at compile and/or runtime) within mono framework ? thanks much for your guidance -M ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Running Mono on 32bits-big endian PowerPC
Hi all, Thanks for the explanation for '-d', that was obvious :) I can compile mono (make V=1 PROFILE=basic) on PowerPC system using: ./autogen.sh --prefix=$HOME/blah --disable-parallel-mark --with-gc=none --enable-checked-build=all --disable-nls --with-sgen=no So clearly there is something going on wrong with sgen-* code and multithread(s) on PPC. I have two questions-: - Does MONO_THREADS_PER_CPU=1 control the number of threads created by sgen-gc implementation ? It does not seems so on my side. - Is there a way for me to run the sgen implementation test suite ? I suspect that such a large piece of code must have some low level test-suite ? Same question: is there a way to make it more debug friendly (the runtime MONO_GC_DEBUG=1 is a bit limited) ? Thanks much again. bonus question: could someone please comment on: https://github.com/mono/mono/commit/cb86279a08ede87d641f5a84308d09d17e9f9816 Check the line that read: [...] mgreg_t regs [19]; /*FIXME, this must be changed to 32 for sgen*/ [...] Regards On Fri, Apr 1, 2016 at 3:06 PM, Alexander Köplinger <alexander.koeplin...@xamarin.com> wrote: > ASYNC is just a #ifdef symbol which gets defined when the -d option is > passed to the compiler (basic.exe in this case, which is basically the mcs > C# compiler). > > You would need to look into the .cs files mentioned in > System.Xml.dll.sources to find out which pieces of the code light up when > that symbol is defined. > From there on you can try reducing the test case to a small repro sample > that you can debug. > > As Jo said in his email, I'd also suggest looking at the 4.4 > release/branches since those will be the next stable release in the near > future. > > - Alex > > 2016-04-01 9:37 GMT+02:00 Mathieu Malaterre <ma...@debian.org>: >> >> My initial post was a bit vague. Let me rephrase it. >> >> I am trying to solve the following issue: >> >> https://bugzilla.xamarin.com/show_bug.cgi?id=40037 >> >> I would like to know where is the documentation for the '-d:ASYNC' >> documentation ? I've naively tried: >> >> % ./mono basic.exe --help >> [...] >> -define:S1[;S2] Defines one or more conditional symbols (short: -d) >> [...] >> >> Which is missing the information for the 'ASYNC' meaning. >> >> Regards. >> ___ >> Mono-devel-list mailing list >> Mono-devel-list@lists.ximian.com >> http://lists.ximian.com/mailman/listinfo/mono-devel-list > > ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Running Mono on 32bits-big endian PowerPC
As a side note, I can build mono on SMP PowerPC using an easy hack: export MONO_GC_PARAMS=nursery-size=1073741824 ./autogen.sh --prefix=$HOME/blah --with-gc=sgen --disable-boehm --enable-checked-build=all --disable-nls --with-sgen=yes make V=1 PROFILE=basic -M ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Running Mono on 32bits-big endian PowerPC
Hi Jonathan, On Mon, Apr 4, 2016 at 8:44 PM, Jonathan Purdywrote: >> - Is there a way for me to run the sgen implementation test suite ? > > > Yes, “make check -C mono” will run the runtime tests, which include tests > for SGen. That was non-trivial due to the fact that I cannot build mono. But it seems there is no native (C code) test suite for sgen. Using the documented hack I posted, I was able to run the sgen only tests: % make sgen-tests -C mono/tests Namely: % MONO_ENV_OPTIONS="--gc=sgen" MONO_GC_DEBUG="" MONO_GC_PARAMS="" MONO_PATH=/home/malat/mono/mcs/class/lib/net_4_x ../../runtime/mono-wrapper ./test-runner.exe --testsuite-name sgen-regular-tests-plain --timeout 900 finalizer-wait.exe Running tests: * Assertion at mini-exceptions.c:2034, condition `(guint8*) >= (guint8*)tls->stack_ovf_guard_base + tls->stack_ovf_guard_size' not met [...] Anyone with sgen internal implementation could point me to a minimal test to run (basic sgen functionalities). thanks ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Running Mono on 32bits-big endian PowerPC
Alex, I understand that most configure options are considered 'advanced' and one should not expect them to even work. However I am simply trying to compile mono with --with-tls=pthread (that seems like a widely spread option on non-gcc based system). Is that considered a supported option ? If so would you be kind enough and give me the required options for this to work ? It seems sgen implementation assume --with-tls=__thread and mono fails to build with silly warning such as "sgen requires __thread...", when one use a simple autogen.sh such as: % ./autogen.sh --prefix=$HOME/blah --with-tls=pthread Thx much On Mon, Apr 4, 2016 at 4:04 PM, Alexander Köplinger <alexander.koeplin...@xamarin.com> wrote: > (sorry, hit send too early...) > > FYI --with-gc=sgen doesn't make sense since the --with-gc option only > controls the Boehm GC (see > https://github.com/mono/mono#configuration-options). > > - Alex > > 2016-04-04 16:03 GMT+02:00 Alexander Köplinger > <alexander.koeplin...@xamarin.com>: >> >> FYI --with-gc=sgen doesn' >> >> >> 2016-04-04 14:25 GMT+02:00 Mathieu Malaterre <ma...@debian.org>: >>> >>> As a side note, I can build mono on SMP PowerPC using an easy hack: >>> >>> export MONO_GC_PARAMS=nursery-size=1073741824 >>> ./autogen.sh --prefix=$HOME/blah --with-gc=sgen --disable-boehm >>> --enable-checked-build=all --disable-nls --with-sgen=yes >>> make V=1 PROFILE=basic >>> >>> -M >>> ___ >>> Mono-devel-list mailing list >>> Mono-devel-list@lists.ximian.com >>> http://lists.ximian.com/mailman/listinfo/mono-devel-list >> >> > ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
Re: [Mono-dev] Running Mono on 32bits-big endian PowerPC
My initial post was a bit vague. Let me rephrase it. I am trying to solve the following issue: https://bugzilla.xamarin.com/show_bug.cgi?id=40037 I would like to know where is the documentation for the '-d:ASYNC' documentation ? I've naively tried: % ./mono basic.exe --help [...] -define:S1[;S2] Defines one or more conditional symbols (short: -d) [...] Which is missing the information for the 'ASYNC' meaning. Regards. ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list
[Mono-dev] Running Mono on 32bits-big endian PowerPC
Dear all, I am currently trying to resurrect Mono debian package on PowerPC (32bits BE). I have two questions: - Is there a released version I should consider to start with if I want to make mono work son PowerPC again ? - I see some big changes here at: 99902cec93dfbc9e18e3fb6fa07b8770a3bd9adc so I am wondering if version 4.2.1.102 (current debian package) is not a bit too old so get things back in shape. thx ___ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list