Leon Matthes uploaded a new version of VMMaker to project VM Maker: http://source.squeak.org/VMMaker/VMMaker.threaded-LM.3352.mcz
==================== Summary ====================
Name: VMMaker.threaded-LM.3352 Author: LM Time: 11 December 2023, 6:49:53.248534 pm UUID: 549d31a1-9ae0-4620-923d-af4ea62dff9c Ancestors: VMMaker.threaded-LM.3351
Fix a critical issue that caused duplicate threads to be spawned.
Binding two processes (or the same process twice) to the same thread caused it to spawn two threads for the same CogVMThread, which of course caused critical errors as both threads might think they were in fact the vm owner, which caused all kinds of issues.
=============== Diff against VMMaker.threaded-LM.3351 ===============
Item was changed: ----- Method: CoInterpreterMT>>loadInitialContext (in category 'initialization') ----- loadInitialContext + | activeProc threadAffinity | - | activeProc | super loadInitialContext. activeProc := self activeProcess. + threadAffinity := self threadAffinityOfProcess: activeProc. + self assert: (threadAffinity = 0 or: [threadAffinity = 1]). "TODO: Ensure we cannot save an image, where the 'activeProc' is affined to another thread!!" - self assert: (self threadAffinityOfProcess: activeProc) = 0. activeProcessAffined := (self threadAffinityOfProcess: activeProc) ~= 0!
Item was changed: ----- Method: CogThreadManager>>startThreadForThreadInfo: (in category 'scheduling') ----- startThreadForThreadInfo: vmThread <var: #vmThread type: #'CogVMThread *'> <inline: false> + vmThread vmThreadState ~= CTMUninitialized + ifTrue: [^true "Already started"]. + self assert: vmThread vmThreadState = CTMUninitialized. vmThread setVmThreadState: CTMInitializing. "self cCode: '' inSmalltalk: [coInterpreter transcript cr; nextPutAll: 'starting VM thread '; print: vmThread index; flush. (thisContext home stackOfSize: 10) do: [:ctxt| coInterpreter transcript cr; print: ctxt; flush]]." (self ioNewOS: (self cCoerce: #startVMThread: to: 'void (*)(void*)') Thread: vmThread) = 0 ifTrue: [self ioTransferTimeslice. ^true]. memoryIsScarce := true. "self cCode: [coInterpreter print: 'ERVT failed to spawn so memory is scarce'; cr]" ^false!
vm-dev@lists.squeakfoundation.org