Problem restarting contexts in Cog 2341

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem restarting contexts in Cog 2341

Tapple Gao
 
In Cog release 2341, as distributed at
http://www.mirandabanda.org/files/Cog/VM/VM.r2341/

this causes an MNU. It should evaluate to true:

| a | a := false. [a ifFalse: [Error signal]] on: Error do: [:ex | a := true. ex retry]

--
Matthew Fulmer (a.k.a. Tapple)
Reply | Threaded
Open this post in threaded view
|

Re: Problem restarting contexts in Cog 2341

Tapple Gao
 
On Thu, Jan 06, 2011 at 09:27:14PM -0500, Matthew Fulmer wrote:
>  
> In Cog release 2341, as distributed at
> http://www.mirandabanda.org/files/Cog/VM/VM.r2341/
>
> this causes an MNU. It should evaluate to true:
>
> | a | a := false. [a ifFalse: [Error signal]] on: Error do: [:ex | a := true. ex retry]

actually it should evaluate to nil

--
Matthew Fulmer (a.k.a. Tapple)
Reply | Threaded
Open this post in threaded view
|

Re: Problem restarting contexts in Cog 2341

Eliot Miranda-2
 
Hi Matthew, Hi Yoshiki,


   thanks very much for this.  I have a fix which I should be able to roll out this evening or tomorrow.  The problem was that the run-time code that assigns inst vars of contexts was not preserving the register holding the receiver although the code generator thought it was.  So in MethodContext>>#privRefresh a subsequent reference to a context inst var failed because the register assumed to be holding the context got trashed.  There was another bug which caused the code generator's "simulation stack" (its main optimization data structure) to be off by one for context inst var assigns.  Hopefully these two fixes will fix Yoshiki's bug also.  Yoskhiki, do you have a more reliable way of reproducing that bug?

best
Eliot

On Thu, Jan 6, 2011 at 6:40 PM, Matthew Fulmer <[hidden email]> wrote:

On Thu, Jan 06, 2011 at 09:27:14PM -0500, Matthew Fulmer wrote:
>
> In Cog release 2341, as distributed at
> http://www.mirandabanda.org/files/Cog/VM/VM.r2341/
>
> this causes an MNU. It should evaluate to true:
>
> | a | a := false. [a ifFalse: [Error signal]] on: Error do: [:ex | a := true. ex retry]

actually it should evaluate to nil

--
Matthew Fulmer (a.k.a. Tapple)

Reply | Threaded
Open this post in threaded view
|

Re: Problem restarting contexts in Cog 2341

Yoshiki Ohshima-2

At Fri, 7 Jan 2011 10:10:03 -0800,
Eliot Miranda wrote:
>
> Hopefully these two fixes will fix Yoshiki's bug also.  Yoskhiki, do you have a more reliable way of
> reproducing that bug?

  With the same changeset (BooleanArrayTest1.cs), but file it in, and
save the image and then evaluating "BooleanArrayUser new loop" causes
the error more reliably.

-- Yoshiki
Reply | Threaded
Open this post in threaded view
|

Re: Problem restarting contexts in Cog 2341

Eliot Miranda-2
In reply to this post by Eliot Miranda-2
 
Hi All,

    find new VMs in VM.r2342/ (SimpleStackBasedCogit) and VM.r2343/ (StackToRegisterMappingCogit).  2343 seems fine but I appear to have introduced a regression into 2342.  The 2343 VMs fix both of the bugs mentioned by Matthew and Yoshiki:

This now evaluates to nil as intended:
| a | a := false. [a ifFalse: [Error signal]] on: Error do: [:ex | a := true. ex retry]

This no longer provokes a must-be-boolean error:
BooleanArrayUser new loop1

As usual I'm very grateful for you pounding on these (ok, at least the 2343 VM :) ).

best
Eliot

On Fri, Jan 7, 2011 at 10:10 AM, Eliot Miranda <[hidden email]> wrote:
Hi Matthew, Hi Yoshiki,


   thanks very much for this.  I have a fix which I should be able to roll out this evening or tomorrow.  The problem was that the run-time code that assigns inst vars of contexts was not preserving the register holding the receiver although the code generator thought it was.  So in MethodContext>>#privRefresh a subsequent reference to a context inst var failed because the register assumed to be holding the context got trashed.  There was another bug which caused the code generator's "simulation stack" (its main optimization data structure) to be off by one for context inst var assigns.  Hopefully these two fixes will fix Yoshiki's bug also.  Yoskhiki, do you have a more reliable way of reproducing that bug?

best
Eliot

On Thu, Jan 6, 2011 at 6:40 PM, Matthew Fulmer <[hidden email]> wrote:

On Thu, Jan 06, 2011 at 09:27:14PM -0500, Matthew Fulmer wrote:
>
> In Cog release 2341, as distributed at
> http://www.mirandabanda.org/files/Cog/VM/VM.r2341/
>
> this causes an MNU. It should evaluate to true:
>
> | a | a := false. [a ifFalse: [Error signal]] on: Error do: [:ex | a := true. ex retry]

actually it should evaluate to nil

--
Matthew Fulmer (a.k.a. Tapple)


Reply | Threaded
Open this post in threaded view
|

cog 2343 fails smoke test on linux

Tapple Gao
 
On Fri, Jan 07, 2011 at 06:15:52PM -0800, Eliot Miranda wrote:

> Hi All,
>
>     find new VMs in
> VM.r2342/<http://www.mirandabanda.org/files/Cog/VM/VM.r2342/>
> (SimpleStackBasedCogit)
> and VM.r2343/ <http://www.mirandabanda.org/files/Cog/VM/VM.r2343/> (
> StackToRegisterMappingCogit).  2343 seems fine but I appear to have
> introduced a regression into 2342.  The 2343 VMs fix both of the bugs
> mentioned by Matthew and Yoshiki:
>
> As usual I'm very grateful for you pounding on these (ok, at least the 2343
> VM :) ).

Erm, at least on my ubuntu linux box, 2343 won't even launch
the trunk image without segfaulting on startup:

http://ftp.squeak.org/4.2/Squeak4.2-10856-beta.zip

---------------------------------------------------

./cog.r2343/bin/i686-pc-linux-gnu/squeak Squeak4.2-10856-beta.image

Segmentation fault



Smalltalk stack dump:
0xbfe28ba0 M IdentityDictionary>scanFor: 2009736128: a(n) IdentityDictionary
0xbfe28bc8 M IdentityDictionary(Dictionary)>at:ifAbsent: 2009736128: a(n) IdentityDictionary
0xbfe28bf0 I Preferences class>preferenceAt:ifAbsent: 2010414284: a(n) Preferences class
0xbfe28c18 I Preferences class>valueOfPreference:ifAbsent: 2010414284: a(n) Preferences class
0xbfe28c40 I Preferences class>valueOfFlag:ifAbsent: 2010414284: a(n) Preferences class
0xbfe28c68 I Preferences class>swapMouseButtons 2010414284: a(n) Preferences class
0xbfe28c88 I InputSensor class>installMouseDecodeTable 2010135976: a(n) InputSensor class
0xbfe28ca8 I InputSensor class>startUp 2010135976: a(n) InputSensor class
0xbfe28cc0 M InputSensor class(Behavior)>startUp: 2010135976: a(n) InputSensor class
0xbfe28cec M [] in SmalltalkImage>send:toClassesNamedIn:with: 2011753028: a(n) SmalltalkImage
0xbfe28d14 I OrderedCollection>do: 2011782444: a(n) OrderedCollection
0xbfe28d3c I SmalltalkImage>send:toClassesNamedIn:with: 2011753028: a(n) SmalltalkImage
0xbfe28d68 I SmalltalkImage>processStartUpList: 2011753028: a(n) SmalltalkImage
0xbfe28d94 I SmalltalkImage>snapshot:andQuit:embedded: 2011753028: a(n) SmalltalkImage
2019217856 s SmalltalkImage>snapshot:andQuit:
2019217524 s SmalltalkImage>saveImageInFileNamed:
2019217432 s SmalltalkImage>saveAs:
2019193036 s SmalltalkImage>saveAs
2019192920 s TheWorldMenu>doMenuItem:with:
2019192828 s [] in MenuItemMorph>invokeWithEvent:
2019192712 s BlockClosure>ensure:
2019192620 s CursorWithMask(Cursor)>showWhile:
2019192528 s MenuItemMorph>invokeWithEvent:
2019192436 s MenuMorph
2019192344 s [] in MenuMorph>keyStroke:
2019192252 s [] in Array(Collection)>detect:ifNone:
2019192088 s Array(SequenceableCollection)>do:
2019191996 s Array(Collection)>detect:ifNone:
2019191864 s MenuMorph>keyStroke:
2019191772 s MenuMorph(Morph)>handleKeystroke:
2019191680 s KeyboardEvent>sentTo:
2019191588 s MenuMorph(Morph)>handleEvent:
2019191496 s MorphicEventDispatcher>dispatchDefault:with:
2019191388 s MorphicEventDispatcher>dispatchEvent:with:
2019191256 s MenuMorph(Morph)>processEvent:using:
2019191164 s MenuMorph(Morph)>processEvent:
2019191072 s MenuMorph>handleFocusEvent:
2019190980 s [] in HandMorph>sendFocusEvent:to:clear:
2019190888 s [] in PasteUpMorph>becomeActiveDuring:
2019190708 s BlockClosure>on:do:
2019190588 s PasteUpMorph>becomeActiveDuring:
2019190496 s HandMorph>sendFocusEvent:to:clear:
2019190404 s HandMorph>sendEvent:focus:clear:
2019190272 s HandMorph>sendKeyboardEvent:
2019190180 s HandMorph>handleEvent:
2019190016 s HandMorph>processEvents
2019189900 s [] in WorldState>doOneCycleNowFor:
2019189808 s Array(SequenceableCollection)>do:
2019189708 s WorldState>handsDo:
2019189616 s WorldState>doOneCycleNowFor:
2019189524 s WorldState>doOneCycleFor:
2019189432 s PasteUpMorph>doOneCycle
2013075760 s [] in Project class>?
2013075628 s [] in BlockClosure>newProcess

Most recent primitives
basicNew
size
at:
basicNew:
decompress:fromByteArray:at:
beCursorWithMask:
vmParameterAt:put:
vmParameterAt:put:
ensure:
valueNoContextSwitch
wait
specialObjectsArray
new:
at:put:
signal
basicNew
new:
at:
identityHash
stringHash:initialHash:
perform:with:
millisecondClockValue
signal
identityHash
stringHash:initialHash:
size
\\
at:
at:
perform:with:
actualScreenSize
species
species
supportsDisplayDepth:
basicNew:
basicNew
beDisplay
stringHash:initialHash:
size
\\
size
\\
=
perform:with:
beCursorWithMask:
stringHash:initialHash:
=
perform:with:
zsh: abort      ./cog.r2343/bin/i686-pc-linux-gnu/squeak Squeak4.2-10856-beta.image

--
Matthew Fulmer (a.k.a. Tapple)