feenkcom / gtoolkit

Glamorous Toolkit is the Moldable Development environment. It empowers you to make systems explainable through experiences tailored for each problem.
https://gtoolkit.com
MIT License
1.13k stars 49 forks source link

occasional crashes when running GlamorousToolkit over an ssh tunnel #2516

Closed dalehenrich closed 2 years ago

dalehenrich commented 2 years ago

I'm running GlamorousToolkit from an Ubuntu 18.04.6 LTS Cinnamon client using ssh -Y -CX wabash -l user to connect to my GlamorousToolkit server running Linux Mint 20.2 Cinnamon and every once in a while I get the following error when launching GlamorousToolkit on the server:

wabash:gtoolkit>bin/GlamorousToolkit &
[1] 90086
wabash:gtoolkit>[Glutin] Profile #0 worked
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
GlamorousToolkit: ../../src/xcb_io.c:260: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

If I try multiple times, I can get the client running, however, I sometimes get the error after the client has been running fine for awhile and I get an error of some sort and not every time I get an error ... I've seen the crash occur when running snippets in the Glamorous Toolkit Book and once when I hit an errror exectuing code in the Morphic World. Here's a session where there the crash happened after a second error (the debugger/inspector successfully came up on the first error):

wabash:gtoolkit>bin/GlamorousToolkit &
[1] 91486
wabash:gtoolkit>[Glutin] Profile #0 worked
[Glutin] Profile #0 worked
******* FIRST ERROR *******
[GtPharoSnippetCoder] Instance of LeLocalStoreMonitor did not understand #gemStoneSettings
Instance of LeLocalStoreMonitor did not understand #gemStoneSettings
LeLocalStoreMonitor(Object)>>doesNotUnderstand: #gemStoneSettings
UndefinedObject(a subclass of UndefinedObject)>>DoIt
GtPharoSnippetCoder(GtPharoSourceCoder)>>primitiveEvaluate:inContext:onFailDo:
[ 
        self
            primitiveEvaluate: aDecoratedSourceString
            inContext: aSourceCoderEvaluationContext
            onFailDo: [
                | aResultWithSyntaxError |

                aResultWithSyntaxError := GtSourceCoderEvaluationResultWithSyntaxError new
                    evaluationContext: aSourceCoderEvaluationContext.
                aThenBlock cull: aResultWithSyntaxError.
                ^ aResultWithSyntaxError ] ] in GtPharoSnippetCoder(GtSourceCoder)>>evaluate:decorated:inContext:thenDo: in Block: [ ...
FullBlockClosure(BlockClosure)>>on:do:
GtPharoSnippetCoder(GtSourceCoder)>>evaluateBlock:onErrorDo:
GtPharoSnippetCoder(GtSourceCoder)>>evaluate:decorated:inContext:thenDo:
GtPharoSnippetCoder(GtSourceCoder)>>evaluate:inContext:thenDo:
GtPharoSnippetCoder(GtSourceCoder)>>doItInContext:thenDo:
GtPharoSnippetCoder(GtSourceCoder)>>doItInContext:
GtPharoSnippetCoderViewModel(GtSourceCoderViewModel)>>doItAllRequestedBy:
GtPharoSnippetCoderViewModel(GtSourceCoderViewModel)>>doItRequestedBy:
GtPharoSnippetCoderViewModel(GtSourceCoderViewModel)>>doIt
[ self coderUIModel perform: action ] in GtCoderCodeExecutor>>execute in Block: [ self coderUIModel perform: action ]
[ activeProcess
            psValueAt: index
            put: anObject.
        aBlock value ] in GtCoderExecutionContextVariable(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
GtCoderExecutionContextVariable(DynamicVariable)>>value:during:
GtCoderExecutionContextVariable class(DynamicVariable class)>>value:during:
GtCoderExecutionContextVariable class>>element:do:
GtCoderCodeExecutor>>execute
[ :aCoderUIModel :anElement | 
            GtCoderCodeExecutor doIt
                coderUIModel: aCoderUIModel;
                element: anElement;
                execute ] in GtPharoSnippetCoder>>initializeAddOns: in Block: [ :aCoderUIModel :anElement | ...
FullBlockClosure(BlockClosure)>>valueWithPossibleArgs:
FullBlockClosure(BlockClosure)>>glamourValueWithArgs:
[ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ] in [ [ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ]
                                ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ] in [ aButtonElement
                enqueueTask:
                    (BlTaskAction new
                        action: [ [ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ]
                                ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ]) ] in GtCoderActionsElement>>handleButton:action:onEvent: in Block: [ aGtCoderAction action...
FullBlockClosure(BlockClosure)>>ensure:
[ [ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ]
                                ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ] in [ aButtonElement
                enqueueTask:
                    (BlTaskAction new
                        action: [ [ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ]
                                ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ]) ] in GtCoderActionsElement>>handleButton:action:onEvent: in Block: [ [ aGtCoderAction action...
FullBlockClosure(BlockClosure)>>cull:
BlTaskAction>>run
[ aTask run ] in [ BlTaskExecutionSignal for: aTask block: [ aTask run ] ] in [ :aTask |
            aTask setExecuting.
            BlFrameTelemetry
                timeSync: [ 'Run task {1} ({2})' format: { aTask class name . aTask } ]
                during: [ BlTaskExecutionSignal for: aTask block: [ aTask run ] ].
            aTask requeueTaskAfterExecution ifTrue: 
                [ self requeue: aTask ]
            ifFalse:
                [ aTask setComplete ] ] in BlSpaceTaskQueue(BlTaskQueue)>>runOn: in Block: [ aTask run ]
BlTaskExecutionSignal class>>for:block:
[Glutin] Profile #0 worked
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 20 to 27 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlFontWeightAttribute) from 1 to 18 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 20 to 27 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 31 to 31 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 32 to 55 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 56 to 56 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 349 to 357 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 359 to 369 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlFontWeightAttribute) from 1 to 4 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 10 to 20 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 79 to 85 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 98 to 108 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 121 to 125 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 8 to 8 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 375 to 383 on text of size 0
[GtPharoStyler] Was not able to apply attributes #(#BlTextForegroundAttribute) from 388 to 407 on text of size 0
[GtGemStoneCoderModel] FileDoesNotExistException: '/path/to/GemStone/ClientLibs/3.7.0/64bit/libgcits-3.7.0-64.so'

*******SECOND ERROR*******
FileDoesNotExistException: '/path/to/GemStone/ClientLibs/3.7.0/64bit/libgcits-3.7.0-64.so'
GciThreadSafeInterface(GciInterface)>>gsLibraryPath:
GciThreadSafeInterface class(GciInterface class)>>newForGsVersion:
GsSession class>>newForGsVersion:threadSafe:stone:host:netldi:
GtGemStoneGciConnector>>loggedInSession
GtGemStoneGciConnector>>newSession
GtGemStoneSession>>connect
GtGemStoneCoderModel>>primitiveEvaluate:inContext:onFailDo:
[ 
        self
            primitiveEvaluate: aDecoratedSourceString
            inContext: aSourceCoderEvaluationContext
            onFailDo: [
                | aResultWithSyntaxError |

                aResultWithSyntaxError := GtSourceCoderEvaluationResultWithSyntaxError new
                    evaluationContext: aSourceCoderEvaluationContext.
                aThenBlock cull: aResultWithSyntaxError.
                ^ aResultWithSyntaxError ] ] in GtGemStoneCoderModel(GtSourceCoder)>>evaluate:decorated:inContext:thenDo: in Block: [ ...
FullBlockClosure(BlockClosure)>>on:do:
GtGemStoneCoderModel(GtSourceCoder)>>evaluateBlock:onErrorDo:
GtGemStoneCoderModel(GtSourceCoder)>>evaluate:decorated:inContext:thenDo:
GtGemStoneCoderModel(GtSourceCoder)>>evaluate:inContext:thenDo:
GtGemStoneCoderModel(GtSourceCoder)>>doItInContext:thenDo:
GtGemStoneCoderModel(GtSourceCoder)>>doItInContext:
GtSourceCoderViewModel>>doItAllRequestedBy:
GtSourceCoderViewModel>>doItRequestedBy:
GtSourceCoderViewModel>>doIt
[ self coderUIModel perform: action ] in GtCoderCodeExecutor>>execute in Block: [ self coderUIModel perform: action ]
[ activeProcess
            psValueAt: index
            put: anObject.
        aBlock value ] in GtCoderExecutionContextVariable(DynamicVariable)>>value:during: in Block: [ activeProcess...
FullBlockClosure(BlockClosure)>>ensure:
GtCoderExecutionContextVariable(DynamicVariable)>>value:during:
GtCoderExecutionContextVariable class(DynamicVariable class)>>value:during:
GtCoderExecutionContextVariable class>>element:do:
GtCoderCodeExecutor>>execute
[ :aCoderUIModel :anElement | 
            GtCoderCodeExecutor doIt
                coderUIModel: aCoderUIModel;
                element: anElement;
                execute ] in GtGemStoneCoderModel>>initializeAddOns: in Block: [ :aCoderUIModel :anElement | ...
FullBlockClosure(BlockClosure)>>valueWithPossibleArgs:
FullBlockClosure(BlockClosure)>>glamourValueWithArgs:
[ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ] in [ [ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ]
                                ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ] in [ aButtonElement
                enqueueTask:
                    (BlTaskAction new
                        action: [ [ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ]
                                ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ]) ] in GtCoderActionsElement>>handleButton:action:onEvent: in Block: [ aGtCoderAction action...
FullBlockClosure(BlockClosure)>>ensure:
[ [ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ]
                                ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ] in [ aButtonElement
                enqueueTask:
                    (BlTaskAction new
                        action: [ [ aGtCoderAction action
                                glamourValueWithArgs:
                                    {self textualCoderViewModel.
                                    aButtonElement} ]
                                ensure: [ self enqueueEnableButton: aButtonElement action: aGtCoderAction ] ]) ] in GtCoderActionsElement>>handleButton:action:onEvent: in Block: [ [ aGtCoderAction action...
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
GlamorousToolkit: ../../src/xcb_io.c:260: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.

[1]+  Aborted                 (core dumped) bin/GlamorousToolkit

Haven't seen this happen when running directly on the server ... but I've got dual monitors connected to my client machine :)

girba commented 2 years ago

Lots of things happened since then including how we render. We should open a new issue if it persists.