[Omake] [Ping Jason] Some times Shell.+ threads end up running the
main build loop!
Aleksey Nogin
nogin at cs.caltech.edu
Sat Jun 3 15:28:03 PDT 2006
Hi,
I started to get some idea of why my MetaPRL build was "blowing up" into
hundreds of processes under certain circumstances. Basically, what was
going on is that when the prlcomp command fails, then there is a
possibility that the corresponding OMake thread would start executing
its own copy of the main build loop instead of exiting! For some strange
reason this only happens when the -S option is enabled (100%
correlation), so passing VERBOSE=1 (without adding an explicit "-S")
would cause the problem to disappear! Also, I was running all my tests
with "OCAMLFLAGS=-p -j10" in the environment (and I would guess that
these are also needed for reproducing the problem).
Note that the prlcomp (in mk/prlcomp) is currently implemented as:
#
# XXX: JYH: this seems kind of inefficient to me.
# We should fix omake so that the final line can
# just be $(argv).
#
Shell. +=
prlcomp(argv) =
setenv(MP_ROOT, $(ROOT))
setenv(MPLIB, $(LIB))
setenv(MP_GROUP, $(THEORYNAME))
setenv(MP_DESCR, $(THEORYDESCR))
setenv(MP_INCLUDE, $(concat :, $(OCAMLINCLUDES)))
code = $(shell-code $(argv))
if $(eq $(code), 0)
return 1
else
exit $(code)
and the problem, I am guessing, is that something is catching the
ExitException in the subthread and transferring the control back to the
main loop!
So, I guess we should probably:
- Add some code that would make sure that the control in the "Shell."
subthreads can never escape (no matter how wrong the corresponding osh
function is)
- Fix the above "XXX".
P.S. I was doing all my tests in latest 0.9.8.
--
Aleksey Nogin
Home Page: http://nogin.org/
E-Mail: nogin at cs.caltech.edu (office), aleksey at nogin.org (personal)
Office: Moore 04, tel: (626) 395-2200
More information about the OMake-Devel
mailing list