NetBSD Problem Report #40622
From he@smistad.uninett.no Thu Feb 12 10:45:57 2009
Return-Path: <he@smistad.uninett.no>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id E91E063C181
for <gnats-bugs@gnats.NetBSD.org>; Thu, 12 Feb 2009 10:45:56 +0000 (UTC)
Message-Id: <20090212104553.B646721DC44@smistad.uninett.no>
Date: Thu, 12 Feb 2009 11:45:53 +0100 (CET)
From: he@NetBSD.org
Reply-To: he@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: Build of lang/mono loops on NetBSD/macppc 4.0
X-Send-Pr-Version: 3.95
>Number: 40622
>Category: pkg
>Synopsis: Build of lang/mono loops on NetBSD/macppc 4.0
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kefren
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 12 10:50:00 +0000 2009
>Closed-Date: Sat Dec 27 03:31:48 +0000 2014
>Last-Modified: Sat Dec 27 03:31:48 +0000 2014
>Originator: Havard Eidnes
>Release: NetBSD 4.0
>Organization:
I Try...
>Environment:
System: NetBSD malus.urc.uninett.no 4.0 NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:27:58 PST 2007 builds@wb30:/home/builds/ab/netbsd-4-0-RELEASE/macppc/200712160005Z-obj/home/builds/ab/netbsd-4-0-RELEASE/src/sys/arch/macppc/compile/GENERIC macppc
Architecture: powerpc
Machine: macppc
>Description:
It appears that during the build of lang/mono, a mono
executable is used at some stage in the build process.
On NetBSD/macppc 4.0, this mono invocation loops, consuming
100% system CPU, as can be seen here:
load averages: 1.01, 1.02, 1.00 up 84 days, 23:46 11:35:53
91 processes: 1 runnable, 88 sleeping, 1 stopped, 1 on processor
CPU states: 0.0% user, 0.0% nice, 100% system, 0.0% interrupt, 0.0% idle
Memory: 241M Act, 123M Inact, 4740K Wired, 52M Exec, 291M File, 1632K Free
Swap: 1300M Total, 14M Used, 1286M Free
PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
13413 root 97 20 35M 3688K RUN 38.1H 99.02% 99.02% mono
and in this output from "systat vm":
5 users Load 1.01 1.02 1.00 Thu Feb 12 11:36:07
Proc:r d s w Csw Trp Sys Int Sof Flt PAGING SWAPPING
2 13 42 833838 109 45 833801 in out in out
ops
100.0% Sy 0.0% Us 0.0% Ni 0.0% In 0.0% Id pages
| | | | | | | | | | |
================================================== forks
fkppw
memory totals (in kB) 149 Interrupts fksvm
real virtual free 100 cpu0 clock pwait
Active 247132 261364 1320 11 cpu0 soft clock relck
All 499252 513484 1318284 16 cpu0 soft net rlkok
openpic irq 29 noram
Namei Sys-cache Proc-cache openpic irq 39 ndcpy
Calls hits % hits % openpic irq 40 fltcp
6 6 100 11 openpic irq 41 zfod
11 gem0 interrupts cow
Disks: md0 cd0 wd0 64 fmin
seeks 85 ftarg
xfers itarg
bytes 1186 wired
%busy pdfre
This was experienced during a bulk pkgsrc build, so of course
the build stalls at this point.
The process which loops in this manner is running:
13413 ttyp2 RN 2290:10.59 /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono --config /usr/pkgsrc/lang/mono/work/mono-2.0.1/runtime/etc/mono/config ./class/lib/monolite/mcs.exe /out:build/deps/basic-profile-check.exe build/deps/basic-profile-check.cs
according to the output from "ps axww".
A small session with gdb may point to where it's working:
malus# gdb /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono
GNU gdb 6.5
Copyright (C) 2006 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 "powerpc--netbsd"...
(gdb) attach 13413
Attaching to program: /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono, process 13413
0x018c8d0c in mono_jit_info_table_find (domain=0x1a94ea0,
addr=0xefd2a0c0 "L\203") at domain.c:406
406 } while (chunk_pos < table->num_chunks);
(gdb) where
#0 0x018c8d0c in mono_jit_info_table_find (domain=0x1a94ea0,
addr=0xefd2a0c0 "L\203") at domain.c:406
#1 0x018c8cb8 in mono_jit_info_table_find (domain=<value optimized out>,
addr=0xefd2a0c0 "L\203") at domain.c:425
#2 0x018c8cb8 in mono_jit_info_table_find (domain=<value optimized out>,
addr=0xefd2a0c0 "L\203") at domain.c:425
Previous frame inner to this frame (corrupt stack?)
(gdb) det
Detaching from program: /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono, process 13413
(gdb) attach 13413
Attaching to program: /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono, process 13413
0x018c8d0c in mono_jit_info_table_find (domain=0x1a94ea0,
addr=0xefd2a0c0 "L\203") at domain.c:406
406 } while (chunk_pos < table->num_chunks);
(gdb) where
#0 0x018c8d0c in mono_jit_info_table_find (domain=0x1a94ea0,
addr=0xefd2a0c0 "L\203") at domain.c:406
#1 0x018c8cb8 in mono_jit_info_table_find (domain=<value optimized out>,
addr=0xefd2a0c0 "L\203") at domain.c:425
#2 0x018c8cb8 in mono_jit_info_table_find (domain=<value optimized out>,
addr=0xefd2a0c0 "L\203") at domain.c:425
Previous frame inner to this frame (corrupt stack?)
(gdb) det
Detaching from program: /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono, process 13413
(gdb) attach 13413
Attaching to program: /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono, process 13413
0x018c8d0c in mono_jit_info_table_find (domain=0x1a94ea0,
addr=0xefd2a0c0 "L\203") at domain.c:406
406 } while (chunk_pos < table->num_chunks);
(gdb) where
#0 0x018c8d0c in mono_jit_info_table_find (domain=0x1a94ea0,
addr=0xefd2a0c0 "L\203") at domain.c:406
#1 0x018c8cb8 in mono_jit_info_table_find (domain=<value optimized out>,
addr=0xefd2a0c0 "L\203") at domain.c:425
#2 0x018c8cb8 in mono_jit_info_table_find (domain=<value optimized out>,
addr=0xefd2a0c0 "L\203") at domain.c:425
Previous frame inner to this frame (corrupt stack?)
(gdb)
(gdb) i locals
chunk = (MonoJitInfoTableChunk *) 0x1aa2000
table = (MonoJitInfoTable *) 0x1a66280
ji = (MonoJitInfo *) 0x1a94ea0
chunk_pos = 1
pos = 0
hp = (MonoThreadHazardPointers *) 0x0
__PRETTY_FUNCTION__ = "ble_remove\000\000jit_info_tabl"
(gdb)
(gdb) list
401 goto not_found;
402 }
403
404 ++chunk_pos;
405 pos = 0;
406 } while (chunk_pos < table->num_chunks);
407
408 not_found:
409 mono_hazard_pointer_clear (hp, JIT_INFO_TABLE_HAZARD_INDEX);
410 mono_hazard_pointer_clear (hp, JIT_INFO_HAZARD_INDEX);
(gdb) p table->num_chunks
$1 = 1
(gdb) p *table
$2 = {domain = 0x1a94ea0, num_chunks = 1, chunks = 0x1a66288}
(gdb) p *chunk
$3 = {refcount = 1, num_elements = 0, last_code_end = 0x0, data = {
0x0 <repeats 64 times>}}
(gdb)
At this point I tried a "next", which appears to have been a
bad idea: gdb appeared to hang, and when I killed gdb, it
pulled mono with itself:
malus# kill %2
Detaching from program: /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono, process 13413
stat 2 flag 0
Quitting: ptrace: Device busy.
sorry, pid 13413 was killed: orphaned traced process
[2] Done gdb /usr/pkgsrc/lang/mono/work/mono-2.0.1/mono/mini/mono
malus#
Hopefully this will give someone at least some leads as to
what the problem is.
>How-To-Repeat:
Try to build lang/mono on NetBSD/macppc 4.0.
>Fix:
Sorry, don't know.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->kefren
Responsible-Changed-By: kefren@NetBSD.org
Responsible-Changed-When: Thu, 12 Feb 2009 12:27:42 +0000
Responsible-Changed-Why:
I'll have a look
From: Havard Eidnes <he@NetBSD.org>
To: gnats-bugs@NetBSD.org, kefren@NetBSD.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org
Subject: Re: pkg/40622 (Build of lang/mono loops on NetBSD/macppc 4.0)
Date: Sun, 05 Apr 2009 15:34:24 +0200 (CEST)
Hi,
the attached patch makes the build complete on NetBSD/macppc
5.0_RC3. Looks OK to commit (modulo freeze approval)?
- Havard
------------------------------
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/mono/distinfo,v
retrieving revision 1.45
diff -u -p -r1.45 distinfo
--- distinfo 4 Mar 2009 01:09:19 -0000 1.45
+++ distinfo 5 Apr 2009 13:08:49 -0000
@@ -36,3 +36,4 @@ SHA1 (patch-dc) = 1f1792e7c23cfeebabed2b
SHA1 (patch-dd) = 88feddae56ffd63bd9c783408c32bd6539b2e798
SHA1 (patch-de) = 292bdc9baf16f5c9f2dc42645ef6d9cdc1a7add8
SHA1 (patch-df) = a1127999bf0d73dfaeabb369e0ad6abe3fc4b255
+SHA1 (patch-dg) = d5bcda304ad00b5b8ea03dec76967b43da4b0d51
--- /dev/null 2009-04-05 15:08:29.000000000 +0200
+++ patches/patch-dg 2009-04-05 15:08:37.000000000 +0200
@@ -0,0 +1,18 @@
+$NetBSD$
+
+For some reason, this test fails on NetBSD/powerpc, so just avoid it.
+
+--- ./mono/metadata/threads.c.orig 2009-04-05 15:00:34.000000000 +0200
++++ ./mono/metadata/threads.c
+@@ -782,9 +782,11 @@ mono_thread_get_stack_bounds (guint8 **s
+
+ #ifndef sun
+ pthread_attr_getstack (&attr, (void**)staddr, stsize);
++#if !(defined(__NetBSD__) && defined(__powerpc__))
+ if (*staddr)
+ g_assert ((current > *staddr) && (current < *staddr + *stsize));
+ #endif
++#endif
+
+ pthread_attr_destroy (&attr);
+ #endif
From: Havard Eidnes <he@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40622 CVS commit: pkgsrc/lang/mono
Date: Sun, 5 Apr 2009 16:20:06 +0000
Module Name: pkgsrc
Committed By: he
Date: Sun Apr 5 16:20:06 UTC 2009
Modified Files:
pkgsrc/lang/mono: distinfo
Added Files:
pkgsrc/lang/mono/patches: patch-dg
Log Message:
Add a patch to make this package build for our powerpc ports.
Since there is no difference for our other ports, no revision bump needed.
Part of fixing PR pkg/40622.
OK'ed by agc@
To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 pkgsrc/lang/mono/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/mono/patches/patch-dg
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: kefren@NetBSD.org
State-Changed-When: Tue, 05 Jul 2011 07:03:09 +0000
State-Changed-Why:
Is this still an issue since patch-ag was removed on 13.06.2011 ?
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 27 Dec 2014 03:31:48 +0000
State-Changed-Why:
Feedback timeout.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.