[Vm-dev] Re: [squeak-dev] Cog crash when updating fresh trunk image

Eliot Miranda eliot.miranda at gmail.com
Wed Feb 27 00:23:05 UTC 2013


Hi Bert,

On Tue, Feb 26, 2013 at 3:26 PM, Bert Freudenberg <bert at freudenbergs.de>wrote:

>
>
> On 2013-02-26, at 23:23, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>
>
>
> On Tue, Feb 26, 2013 at 11:44 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:
>
>> * I downloaded Squeak4.4-12327.zip from
>> http://ftp.squeak.org/current_stable/
>> * in preferences, change Update URL to trunk
>> * load updates
>> * Cog crashes (last log entry is Compiler-nice.256)
>> * Interpreter does not crash
>>
>> This is on Mac with current Cog 4.0.2692.
>>
>
> Phhh, is there any way to load a specific update?  What's the update
> number/id?  Of course I'm too late to this party to debug the VM crash :(
>
>
> Before updating, in MCMcmUpdater class>>updateListFor: insert this before
> the return:
>
> updateList := updateList reject: [:ea | ea key > 222].
>
> Then update - crash.
>

Thank you kindly.

Here's what I think is happening.

The system is loading an update that reshapes the parser, causing it to
lose some inst vars.
There is an activation of Parser>>parse:cue:noPattern:ifFail: on the stack.
 It contains the statement

methNode := self method: noPattern context: cue context

The system crashes on the send of #context since the code to access the
inst var cue is reading off the end of the parser and returns an invalid
object (a header field from the next object in memory).   I think this is
happening because Parser is getting reshaped during running.
 When parse:cue:noPattern:ifFail: is jitted Parser's cue inst var is the
25th inst var. When the code is executed before the crash Parser only has
23 inst vars.  Boom.

I'll look at this more later on, but right now it looks like a phase issue
with the parser being used during its own reshaping.

Here's the call stack.   The ? is simply that the version of
#parse:cue:noPattern:ifFail has been replaced by a new one so the VM can't
find the selector for it (it doesn't know that a method's penultimate
literal can be its selector; it searches method dictionaries until it finds
the method and uses the matching selector; because
#parse:cue:noPattern:ifFail has been recompiled, there isn't a matching
selector).

0xbffe0e34 M [] in Parser>? 0x148bbf68: a(n) Parser
0xbffe0e50 M BlockClosure>on:do: 0x148be774: a(n) BlockClosure
0xbffe0e7c M Parser>? 0x148bbf68: a(n) Parser
0xbffe0ea4 M Compiler>translate:noPattern:ifFail: 0x148bbe98: a(n) Compiler
0xbffe0ec8 M Compiler>compile:in:classified:notifying:ifFail: 0x148bbe98:
a(n) Compiler
0xbffe0ef4 M Compiler>compile:in:notifying:ifFail: 0x148bbe98: a(n) Compiler
0xbffe0f28 M Metaclass(Behavior)>recompile:from: 0x148bb968: a(n) Metaclass
0xbffe15cc M Metaclass(ClassDescription)>recompile:from: 0x148bb968: a(n)
Metaclass
0xbffe15f0 M [] in Metaclass(Behavior)>compileAllFrom: 0x148bb968: a(n)
Metaclass
0xbffe1618 M MethodDictionary>keysDo: 0x145ce2f8: a(n) MethodDictionary
0xbffe163c I Metaclass(Behavior)>selectorsDo: 0x145ce2d8: a(n) Metaclass
0xbffe165c M Metaclass(Behavior)>compileAllFrom: 0x148bb968: a(n) Metaclass
0xbffe168c I ClassBuilder>privateNewSubclassOf:from: 0x148b8710: a(n)
ClassBuilder
0xbffe16bc I ClassBuilder>newSubclassOf:type:instanceVariables:from:
0x148b8710: a(n) ClassBuilder
0xbffe1730 I [] in
ClassBuilder>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:unsafe:
0x148b8710: a(n) ClassBuilder
0xbffe2e14 M BlockClosure>ensure: 0x148bb1ec: a(n) BlockClosure
0xbffe2e4c I
ClassBuilder>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:unsafe:
0x148b8710: a(n) ClassBuilder
0xbffe2e90 I
ClassBuilder>name:inEnvironment:subclassOf:type:instanceVariableNames:classVariableNames:poolDictionaries:category:
0x148b8710: a(n) ClassBuilder
0xbffe2ed8 I [] in MCClassDefinition>createClass 0x1486daec: a(n)
MCClassDefinition
0xbffe2ef4 M BlockClosure>on:do: 0x148b8694: a(n) BlockClosure
0xbffe2f30 I MCClassDefinition>createClass 0x1486daec: a(n)
MCClassDefinition
0xbffe5d70 M MCClassDefinition>load 0x1486daec: a(n) MCClassDefinition
0xbffe5d8c M [] in MCPackageLoader>basicLoad 0x14877b2c: a(n)
MCPackageLoader
0xbffe5da8 M BlockClosure>on:do: 0x148b8530: a(n) BlockClosure
0xbffe5dc8 M [] in MCPackageLoader>basicLoad 0x14877b2c: a(n)
MCPackageLoader
0xbffe5e00 M [] in
OrderedCollection(Collection)>do:displayingProgress:every: 0x14877dbc: a(n)
OrderedCollection
0xbffe5e20 M OrderedCollection>do: 0x14877dbc: a(n) OrderedCollection
0xbffe5e50 M [] in
OrderedCollection(Collection)>do:displayingProgress:every: 0x14877dbc: a(n)
OrderedCollection
0xbffe5e78 M [] in MorphicUIManager>displayProgress:at:from:to:during:
0x14182b80: a(n) MorphicUIManager
0xbffe5e94 M BlockClosure>on:do: 0x1487bd30: a(n) BlockClosure
0xbffe5ec0 M [] in MorphicUIManager>displayProgress:at:from:to:during:
0x14182b80: a(n) MorphicUIManager
0xbffe5ee0 M BlockClosure>ensure: 0x1487bc9c: a(n) BlockClosure
0xbffe5f04 M MorphicUIManager>displayProgress:at:from:to:during:
0x14182b80: a(n) MorphicUIManager
0xbffe5f30 M ProgressInitiationException>defaultResumeValue 0x1487b8fc:
a(n) ProgressInitiationException

HTH
-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130226/60be1309/attachment.htm


More information about the Squeak-dev mailing list