[M3devel] cm3 is broken

Rodney M. Bates rodney_bates at lcwb.coop
Sat Aug 22 18:07:01 CEST 2015



On 08/22/2015 04:28 AM, Jay K wrote:
> This was not meant to change and I haven't seen that it did change.
> Maybe my cleaning up of the config files. I'll check.
>
>
> I understand the risks well. I have a potential plan to change it. But that is another matter.
>
> You still need to backup libm3/m3core with cm3 -- so that cm3 can build anything that works.
>
> The wrong uprade sequence still breaks cm3. That is at it should be.
>
>
> Tangentially, here is my plan:
>    The upgrade process must be "to the side and switch all at once", not "in place".

I think this is a very good idea.  The in-place rebuilds always make me very nervous.
I never feel like I quite know what is going on, and I never quite trust any of the
processes we have (and rightly so, from experience).  When it works, or appears to,
it always is more a matter of experiment than understanding.

Whenever I am the least bit suspicious, I feel the need to copy two whole subtrees
(source & installed) to update in place, keeping the originals to make another copy
from, if problems arise.  But that's a pretty tedious process to go through every
time, so I have to evaluate the risks and decide when to take them and when to play safe.

And when I touch the compiler or runtime, I feel the need to rebuild all of front
twice, by whatever process I am using, then look for at least identical sized
executables and libraries.

>   It might go over and back though -- i.e. cm3 can move a new cm3, m3core, and libm3 all
>   into the install in tight sequence (not atomically). The trick on NT would be to unmap the
>   executable, and avoid returning to it -- some sort of "continuation passing style",
>   possibly off into a little bit of C++, whose main task would be to move a few files
>   and then exit.
>
>
>   That'd still leave all the platforms to test on to see if a running executable can be replaced.
>   esp. including AIX.
>
>
> Perhaps it isn't worth it. I have at least endeavored to priortize everything else ahead of this
> and just leave it as an idea/plan that I don't get to
>
>   - Jay
>
>
>
>
>  > Subject: Re: [M3devel] cm3 is broken
>  > From: hosking at purdue.edu
>  > Date: Sat, 22 Aug 2015 06:48:15 +1000
>  > CC: jay.krell at cornell.edu; m3devel at elegosoft.com
>  > To: rodney.m.bates at acm.org
>  >
>  > That is a regression.
>  >
>  > Sent from my iPad
>  >
>  > > On 22 Aug 2015, at 2:38 am, Rodney M. Bates <rodney_bates at lcwb.coop> wrote:
>  > >
>  > >
>  > >
>  > >> On 08/20/2015 06:32 PM, Antony Hosking wrote:
>  > >> cm3 should build with static link to m3core so as to allow backup as you describe.
>  > >> Did this change recently?
>  > >
>  > > Apparently it is now dynamic, as I see libm3core.so.5 in the backtrace. Also, setting
>  > > a breakpoint at one of these places gives:
>  > >
>  > >
>  > > (m3gdb) b RTExFrame.m3:175
>  > > No source file named RTExFrame.m3.
>  > > Make breakpoint pending on future shared library load? (y or [n]) y
>  > > Breakpoint 1 (RTExFrame.m3:175) pending.
>  > > (m3gdb) run
>  > >
>  > > ........
>  > >
>  > > Breakpoint 2 at 0x7f446c889043: file ../src/runtime/ex_frame/RTExFrame.m3, line 175.
>  > > Pending breakpoint "RTExFrame.m3:175" resolved
>  > >
>  > >
>  > >
>  > >>
>  > >>> On Aug 21, 2015, at 3:19 AM, Jay <jay.krell at cornell.edu> wrote:
>  > >>>
>  > >>> Upgrade is failing because cm3 is already broken. I can see about making the error clearer.
>  > >>>
>  > >>>
>  > >>> I often upgrade.py nocleangcc to speed it up.
>  > >>>
>  > >>>
>  > >>> Right, backup must include libm3 m3core cm3cg cm3 config. See capture-min or capture-boot, I think I settled on capture-min.
>  > >>>
>  > >>>
>  > >>> m3cc either needs to keep the "front" tag or the scripts need to mention it explicitly. You can't safely always skip it.
>  > >>>
>  > >>>
>  > >>> Do you have recourse?
>  > >>> Old release maybe? (Be sure to edit the 5.8.6 config to avoid new cm3cg.)
>  > >>>
>  > >>> - Jay
>  > >>>
>  > >>>> On Aug 20, 2015, at 8:44 AM, "Rodney M. Bates" <rodney_bates at lcwb.coop> wrote:
>  > >>>>
>  > >>>>
>  > >>>>
>  > >>>>> On 08/19/2015 06:57 PM, Jay K wrote:
>  > >>>>> Did you upgrade.py? (or possibly upgrade.sh?)
>  > >>>>
>  > >>>> upgrade.py does this:
>  > >>>>
>  > >>>> rodney at allegheny:~/proj/m3/git/cm3/scripts/python$ python upgrade.py
>  > >>>> Traceback (most recent call last):
>  > >>>> File "upgrade.py", line 4, in <module>
>  > >>>> import pylib
>  > >>>> File "/home/rodney/proj/m3/git/cm3/scripts/python/pylib.py", line 656, in <module>
>  > >>>> if Target.startswith("NT386"):
>  > >>>> AttributeError: 'NoneType' object has no attribute 'startswith'
>  > >>>>
>  > >>>> I did 'do-cm3-front.sh' buildship' and 'install-cm3-compiler.sh upgrade',
>  > >>>> with front removed from the m3cc line in pkginfo.txt, since there were no
>  > >>>> changes to it, and it takes longer to compile than everything else combined.
>  > >>>>
>  > >>>> upgrade.sh now segfaults after cleaning things out, but that is no doubt just
>  > >>>> the now-broken cm3.
>  > >>>>
>  > >>>> I always make backup copies of cm3 & cm3cg in /usr/local/cm3/bin before installing
>  > >>>> a compiler, but restoring what I had before does not fix the problem. I suppose
>  > >>>> it is in m3core, which I guess I need to add to my backup habit.
>  > >>>>
>  > >>>>> I changed the cm3/m3core interface, so you must do the ugprade in the usual proper order.
>  > >>>>>
>  > >>>>> I run upgrade.py frequently and recommend it.
>  > >>>>>
>  > >>>>> - Jay
>  > >>>>>
>  > >>>>>
>  > >>>>>> Date: Wed, 19 Aug 2015 17:20:25 -0500
>  > >>>>>> From: rodney_bates at lcwb.coop
>  > >>>>>> To: m3devel at elegosoft.com
>  > >>>>>> Subject: [M3devel] cm3 is broken
>  > >>>>>>
>  > >>>>>> As of a recent pull from modula3-cm3, done around 16:00 CDT, cm3 is going into
>  > >>>>>> runaway recursion trying to report a fault. This happens immediately upon
>  > >>>>>> running it, before it produces any output.
>  > >>>>>>
>  > >>>>>> Here is one cycle of the backtrace:
>  > >>>>>>
>  > >>>>>> #1745 0x00007fd9b0b0d935 in _m3_fault (arg=5600) from /usr/local/cm3-uniboot/bin/../lib/libm3core.so.5
>  > >>>>>> #1746 0x00007fd9b0b0d05d in InvokeHandler (f=16_00007fff488bcc20, a=
>  > >>>>>> RECORD exception = 16_00007fd9b0d4b780; arg = 16_000000000000001d; module = 16_00007fd9b0d62d40; line = 14; pc = NIL; info0 = NIL; info1 = NIL; un_except = NIL; un_arg = NIL; END) at ../src/runtime/ex_frame/RTExFrame.m3:175
>  > >>>>>> #1747 0x00007fd9b0b0cef1 in ResumeRaise (a=
>  > >>>>>> RECORD exception = 16_00007fd9b0d4b780; arg = 16_000000000000001d; module = 16_00007fd9b0d62d40; line = 14; pc = NIL; info0 = NIL; info1 = NIL; un_except = NIL; un_arg = NIL; END) at ../src/runtime/ex_frame/RTExFrame.m3:145
>  > >>>>>> #1748 0x00007fd9b0b0ccfe in Raise (act=
>  > >>>>>> RECORD exception = 16_00007fd9b0d4b780; arg = 16_000000000000001d; module = 16_00007fd9b0d62d40; line = 14; pc = NIL; info0 = NIL; info1 = NIL; un_except = NIL; un_arg = NIL; END) at ../src/runtime/ex_frame/RTExFrame.m3:91
>  > >>>>>> #1749 0x00007fd9b0ae9693 in Raise (ex=16_00007fd9b0d4b780, arg=16_000000000000001d, module=16_00007fd9b0d62d40, line=14)
>  > >>>>>> at ../src/runtime/common/RTHooks.m3:79
>  > >>>>>> #1750 0x00007fd9b0ae9951 in Self () at ../src/runtime/common/RuntimeError.m3:14
>  > >>>>>> #1751 0x00007fd9b0ae96ef in ReportFault (module=16_00007fd9b0d6a520, info=5600) at ../src/runtime/common/RTHooks.m3:98
>  > >>>>>> #1752 0x00007fd9b0b0d935 in _m3_fault (arg=5600) from /usr/local/cm3-uniboot/bin/../lib/libm3core.so.5
>  > >>>>>>
>  > >>>>>> So far, I haven't had the patience to keep hitting return until I get to the bottom of it.
>  > >>>>>>
>  > >>>>>> --
>  > >>>>>> Rodney Bates
>  > >>>>>> rodney.m.bates at acm.org
>  > >>>>>> _______________________________________________
>  > >>>>>> M3devel mailing list
>  > >>>>>> M3devel at elegosoft.com
>  > >>>>>> https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel
>  > >>>>
>  > >>>> --
>  > >>>> Rodney Bates
>  > >>>> rodney.m.bates at acm.org
>  > >>> _______________________________________________
>  > >>> M3devel mailing list
>  > >>> M3devel at elegosoft.com
>  > >>> https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel
>  > >>
>  > >>
>  > >
>  > > --
>  > > Rodney Bates
>  > > rodney.m.bates at acm.org
>
>
> _______________________________________________
> M3devel mailing list
> M3devel at elegosoft.com
> https://mail.elegosoft.com/cgi-bin/mailman/listinfo/m3devel
>

-- 
Rodney Bates
rodney.m.bates at acm.org



More information about the M3devel mailing list