[Mono-bugs] [Bug 353874] New: build: mcs fails with CS8025 if stack size is unlimited
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jan 15 08:04:51 EST 2008
https://bugzilla.novell.com/show_bug.cgi?id=353874
Summary: build: mcs fails with CS8025 if stack size is unlimited
Product: Mono: Compilers
Version: 1.2.6
Platform: i686
OS/Version: Solaris 10
Status: NEW
Keywords: build
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: nils.goroll at mcs.de
QAContact: mono-bugs at lists.ximian.com
Found By: Other
Hi all,
I have tried to find existings bug for this issue, but have not found
any. As I am only trying to build mono but dont have any experience
using it, please accept my apologies should I have produced a
duplicate.
Trying to build mono, I have come across something which looked like
an unreproducible bug at first sight.
make --no-print-directory CC=/home/slink/BUILD/HEAD/metabuild/CC
EXTERNAL_MCS=/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/runtime/_tmpinst/bin/mcs
[...]
Making all in runtime
if test -w ../mcs; then :; else chmod -R +w ../mcs; fi
cd ../mcs && make PROFILES='default net_2_0'
CC='/home/slink/BUILD/HEAD/metabuild/CC' all-profiles
make profile-do--default--all profile-do--net_2_0--all
make PROFILE=basic all
error CS8025: Parsing error
make[7]: *** [build/deps/basic-profile-check.exe] Error 1
*** The compiler
'/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/runtime/_tmpinst/bin/mcs'
doesn't appear to be usable.
*** Trying the 'monolite' directory.
error CS8025: Parsing error
make[9]: *** [build/deps/basic-profile-check.exe] Error 1
*** The contents of your 'monolite' directory may be out-of-date
*** You may want to try 'make get-monolite-latest'
make[9]: *** [do-profile-check-monolite] Error 1
make[8]: *** [do-profile-check] Error 2
make[7]: *** [do-profile-check-monolite] Error 2
make[6]: *** [do-profile-check] Error 2
make[5]: *** [profile-do--basic--all] Error 2
make[4]: *** [profiles-do--all] Error 2
make[3]: *** [all-local] Error 2
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
pls note: The mcs error output is supressed by some part of the
Makefile or some include.
Interestingly, this bug was not reproducible even with the same
environment variables set that make uses when calling mcs/mono.
(extracted environtment from truss)
mene:~/BUILD/HEAD/metabuild/work/mono-1.2.6/mcs$ cat test
INSTALL='/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/./install-sh -c' \
IFS= \
LC_COLLATE=C \
MCS=MONO_PATH='"./class/lib/basic:$MONO_PATH"
/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/runtime/mono-wrapper
/class/lib/basic/mcs.exe' \
SSH_CONNECTION='***SOMETHING***' \
PATH=/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/ccs/bin:/usr/xpg4/bin:/usr/sfw/bin
\
SSH_TTY=/dev/pts/6 \
TEST_HARNESS=./class/lib/basic/nunit-console.exe \
LC_MESSAGES=C \
LC_NUMERIC=C \
PWD=/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/mcs \
MANPATH=/usr/man:/usr/local/man:/usr/sfw/man:/usr/openwin/man:/home/slink/man:/opt/MCSWWW/man
\
HOME=/home/slink \
CVSROOT=/var/cvs \
LOGNAME=slink \
LC_TIME=C \
SHLVL=1 \
CC=cc \
MAKEOVERRIDES='${-*-command-variables-*-}' \
USER=slink \
LC_MONETARY=C \
HAVE_PROPER_METABUILD_ENVIRONMENT=fortytwo \
DESTDIR= \
OLDPWD=/home/slink/BUILD/HEAD/metabuild/work \
PROFILE=basic \
MAKEFLAGS="EXTERNAL_MCS=/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/runtime/_tmpinst/bin/mcs
PROFILE=basic" \
MFLAGS= \
SSH_CLIENT='***SOMETHING***' \
MAIL=/usr/mail/slink \
MKINSTALLDIRS='/bin/sh ./mkinstalldirs' \
RESGEN='MONO_PATH="./class/lib/basic:$MONO_PATH"
/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/runtime/mono-wrapper
/class/lib//resgen.exe' \
PLATFORM=linux \
PS1='\h:\w\$ ' \
PAGER=less \
LC_ALL=C \
EXTERNAL_MCS=/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/runtime/_tmpinst/bin/mcs
\
BOOTSTRAP_MCS=/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/runtime/_tmpinst/bin/mcs
\
LANG=C \
TERM=xterm \
MCS_FLAGS=-debug \
MAKELEVEL=1 \
/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/runtime/_tmpinst/bin/mcs
/out:build/deps/basic-profile-check.exe build/deps/basic-profile-check.cs
mene:~/BUILD/HEAD/metabuild/work/mono-1.2.6/mcs$ . ./test
GC Warning: Large stack limit(10485760): only scanning 8 MB
The GC warning lead me to what seems to be related to the root cause:
Somewhere in the make call chain, the stack limit is removed. Here's a
diff between prctl -i <pid> of the mono process called from make and
the test as quoted above (pls note: I am using ulimit and prctl
whatever seemed to be most convenient in each situation, but in
Solaris, prctl supersedes ulimit):
mene:~/BUILD/HEAD/metabuild/work/mono-1.2.6/mcs$ diff -ub
/tmp/prctl_mono_run_from_make /tmp/prctl_mono_cmdline
--- /tmp/prctl_mono_run_from_make Tue Jan 15 12:34:50 2008
+++ /tmp/prctl_mono_cmdline Tue Jan 15 12:35:43 2008
@@ -1,4 +1,4 @@
-process: 21238:
/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/mono/mini/mono --conf
+process: 21284:
/home/slink/BUILD/HEAD/metabuild/work/mono-1.2.6/mono/mini/mono --conf
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
process.max-port-events
privileged 65.5K - deny -
@@ -19,7 +19,7 @@
privileged 16.0EB max deny -
system 16.0EB max deny -
process.max-file-descriptor
- basic 256 - deny 21238
+ basic 256 - deny 21284
privileged 65.5K - deny -
system 2.15G max deny -
process.max-core-size
@@ -26,7 +26,8 @@
privileged 8.00EB max deny -
system 8.00EB max deny -
process.max-stack-size
- privileged 125TB max deny -
+ basic 10.0MB - deny 21284
+ privileged 125TB - deny -
system 125TB max deny -
process.max-data-size
privileged 16.0EB max deny -
After removing the stack size limit, the issue is also reproducible outside
make:
mene:~/BUILD/HEAD/metabuild/work/mono-1.2.6/mcs$ prctl -i pid $$| ggrep -A 3
process.max-stack-size
process.max-stack-size
basic 10.0MB - deny 21175
privileged 125TB - deny -
system 125TB max deny -
mene:~/BUILD/HEAD/metabuild/work/mono-1.2.6/mcs$ ulimit -Ss unlimited
mene:~/BUILD/HEAD/metabuild/work/mono-1.2.6/mcs$ prctl -i pid $$| ggrep -A 3
process.max-stack-size
process.max-stack-size
privileged 125TB max deny -
system 125TB max deny -
process.max-data-size
mene:~/BUILD/HEAD/metabuild/work/mono-1.2.6/mcs$ . ./test
error CS8025: Parsing error
Compilation failed: 1 error(s), 0 warnings
Conversely, the build process continues when a hard stack size limit
is being imposed (solaris: privileged resource control)
mene:~/BUILD/HEAD/metabuild/work$ ulimit -Hs $((10*1024))
+ ulimit -Hs 10240
mene:~/BUILD/HEAD/metabuild/work$ prctl -i pid $$| ggrep -A 3
process.max-stack-size
+ prctl -i pid 21175
+ ggrep -A 3 process.max-stack-size
process.max-stack-size
privileged 10.0MB - deny -
system 125TB max deny -
process.max-data-size
.. make seems to work now ...
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list