On 2023-12-02T23:59:09+00:00, lewis@mail.msen.com wrote:
Hi Vanessa,
Thanks for posting this. I think I have been seeing similar symptoms in the debugger with a V3 trunk image on classic interpreter VM, but I did not know where to look for the problem until I read this.
It is hugely convenient that SqueakJS has function names that match the selectors in Squeak VMMaker. I was able to look at https://github.com/codefrau/SqueakJS/commit/4haf915baaaac3a5d078b09eb7c3abd5... to see what needed to be changed in the interpreter VM.
I think that your one line fix needs to go into the interpreter VM too. As you say, it's hard to know if old images will be affected by the change, so I think your approach of changing the semantics only for closure images seems like a safe choice.
Having said that, I don't think there are any recent opensmalltalk-vm changes that affect this. If I'm reading this right, StackInterpreter>>transferTo: has been nilling out myList in Process since at least 2014, so the oscog VMs and the interpreter VM have probably behaved differently in this regard for a long time.
I am guessiing that something in Squeak trunk has changed recently in some way that depends on the opensmalltalk-vm behavior. I don't know what it is, but maybe someone with better understanding the the debugger can confirm?
I think Jaromir has reworked some of the Process state test selectors recently. The debugger tests for #isSuspended as #isTerminated in Debugger>>#interruptedProcessIsReady. Jaromir, is there a chance that you could help here? :-)
Based on the the method comment in Process>>suspendingList I would say that opensmalltalk-vm has it right, and the interpreter VM (and SqueakJS) should also nil out myList. I am not sure, but I doubt that any early images will notice the difference, so the check for closure images may not be needed.
Dave
On 2023-11-27 22:13, Vanessa Freudenberg wrote:
I found the issue:
At some point the semantics of suspending the active process changed. Now, the newly activated process gets its myList set to nil, whereas before, myList was kept.
To wit, in an old VM:
Processor activeProcess suspendingList ==> a LinkedList()
whereas on a current VM
Processor activeProcess suspendingList ==> nil I'm not sure if old images would care if the list was set to nil, but now SqueakJS does set the list to nil for closure images.
I just committed that one-line fix :)
Vanessa
On Sun, Nov 26, 2023 at 1:38 AM Vanessa Freudenberg <vanessa(a)codefrau.net> wrote:
I don't think that's it, because it does work fine on the standard VM, just not on the SqueakJS VM.
In a work space, "self halt" and do-it does not work (buttons are disabled). Instead, "self halt" and debug-it does work (buttons are enabled).
SqueakJS does not implement all primitives, some optional ones are missing. So that could be a reason. Or it could be a bug in a primitive somewhere.
The problem appears to be that the debugger's interruptedProcess's myLink is an empty list instead of nil.
Vanessa
On Sat, Nov 25, 2023 at 13:57 Thiede, Christoph <Christoph.Thiede(a)student.hpi.uni-potsdam.de> wrote:
Hi Vanessa,
I think this might be caused by a known issue that is tracked here: https://github.com/squeak-smalltalk/squeak-object-memory/issues/92
How exactly did you invoke the debugger? How does your process browser look before and after the invocation?
Best, Christoph
Von: vm-dev-request(a)lists.squeakfoundation.org <vm-dev-request(a)lists.squeakfoundation.org> Gesendet: Samstag, November 25, 2023 12:31:49 PM An: vm-dev(a)lists.squeakfoundation.org <vm-dev(a)lists.squeakfoundation.org> Betreff: Vm-dev Digest, Vol 209, Issue 21 Send Vm-dev mailing list submissions to vm-dev(a)lists.squeakfoundation.org
To subscribe or unsubscribe via email, send a message with subject or body 'help' to vm-dev-request(a)lists.squeakfoundation.org
You can reach the person managing the list at vm-dev-owner(a)lists.squeakfoundation.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Vm-dev digest..."
Best, Christoph
--- Sent from Squeak Inbox Talk