[GemStone-Smalltalk] Class connector conundrum

Richard Sargent richard.sargent at gemtalksystems.com
Mon Jun 3 13:05:20 PDT 2024


Good! That makes it much easier to diagnose.


On Mon, Jun 3, 2024 at 12:49 PM David Shaffer <
shaffer at shaffer-consulting.com> wrote:

> False lead…sorry, just made a mistake in my debugging code.
>
> I rebuilt my dev image from ground up and now I’m able to reproduce the
> problem there as well.
>
> -D
>
> On Jun 3, 2024, at 3:20 PM, Richard Sargent <
> richard.sargent at gemtalksystems.com> wrote:
>
> On Mon, Jun 3, 2024 at 12:15 PM David Shaffer <
> shaffer at shaffer-consulting.com> wrote:
>
>> Ah, a clue…when I turn on removeInvalidConnectors, the connectors for
>> this hierarchy are removed.  How are connectors validated?
>>
>
> As far as I see, the only place that happens is
> in GbsSession>>handleFailedConnectors:messages:. And, in your first report,
> I thought you said there were no failed connections.
> Perhaps add an error in this method so that the stack dump shows what the
> problems were.
> (An error doesn't matter, because it won't be much later before you try to
> replicate instances of the classes that failed to connect.)
>
>
>
>> -D
>>
>> On Jun 3, 2024, at 2:59 PM, David Shaffer <shaffer at shaffer-consulting.com>
>> wrote:
>>
>> Yes, the session is logged in and I’m sending a message to a collection
>> of objects that are being faulted in from the DB.  At this point in the
>> code, many gemstone objects have been replicated to VW.
>>
>> -D
>>
>> On Jun 3, 2024, at 2:57 PM, Richard Sargent <
>> richard.sargent at gemtalksystems.com> wrote:
>>
>> And, to be clear, the point at which the unmapped class error occurs is
>> *after* the completion of session login? Right?
>>
>> On Mon, Jun 3, 2024 at 11:33 AM David Shaffer <
>> shaffer at shaffer-consulting.com> wrote:
>>
>>> Thanks for looking at this Richard.  The class and all of its super- and
>>> sub-classes are connected:
>>>
>>> GbsClassConnector stName: #'Trader.EdgeTriggersOrderSignal' gsName:
>>> 'Trader_EdgeTriggersOrderSignal' dictionary: #TraderClasses   is connected
>>> = true
>>> GbsClassConnector stName: #'Trader.AbstractTradeOnMarketSignal' gsName:
>>> 'Trader_AbstractTradeOnMarketSignal' dictionary: #TraderClasses   is
>>> connected = true
>>> GbsClassConnector stName: #'Trader.LevelTriggersOrderSignal' gsName:
>>> 'Trader_LevelTriggersOrderSignal' dictionary: #TraderClasses   is connected
>>> = true
>>> GbsClassConnector stName: #'Trader.AbstractTradingSignal' gsName:
>>> 'Trader_AbstractTradingSignal' dictionary: #TraderClasses   is connected =
>>> true
>>>
>>>
>>> I tried catching the exception and then re-printing the status of the
>>> connectors.  Still connected ;)
>>>
>>> -D
>>>
>>> On Jun 3, 2024, at 12:02 PM, Richard Sargent <
>>> richard.sargent at gemtalksystems.com> wrote:
>>>
>>> On Sun, Jun 2, 2024 at 9:28 PM David Shaffer via GemStone-Smalltalk <
>>> gemstone-smalltalk at lists.gemtalksystems.com> wrote:
>>>
>>>> Hey folks…killed a whole day on this one and I’m stuck.  I’m running an
>>>> application on VW9.4/GBS8.7.1/GS3.6.5 where I have some (a lot of) class
>>>> connectors in my session parameters.  Among them:
>>>>
>>>> GbsClassConnector stName: #'Trader.LevelTriggersOrderSignal' gsName:
>>>> 'Trader_LevelTriggersOrderSignal' dictionary: #TraderClasses
>>>>
>>>>
>>>> I am able to access objects in my repository replicated into GBS on my
>>>> desktop image.  When I package it up and run it headless in my docker
>>>> container I get:
>>>>
>>>> Unhandled exception: No client class Trader_LevelTriggersOrderSignal,
>>>> class generation is disabled.
>>>>
>>>> when loading objects in my repository of the aforementioned type.  I’ve
>>>> verified that the Smalltalk class Trader.LevelTriggersOrderSignal is in the
>>>> deployed image.  I’ve also checked that there is only one class with that
>>>> name in my repo (the class history has 1 element in it) and that the class
>>>> of the object in the repository that is causing the problem has the same
>>>> OOP as the class in TraderClasses.
>>>>
>>>> Full stack trace is pasted below.  I’ve tried poking around quite a bit
>>>> including adding some tracing to
>>>> GbsSession>>connectClassConnectorsTypeNoneIn:addFailedConnectorsTo:addMessagesTo:
>>>> to double-check that the connector is indeed being connected and everything
>>>> looks OK.  I’ve tried all kinds of things but I’m pretty much stuck on this
>>>> one.  Sorry for the lack of details…not expecting anyone to be able to sort
>>>> this out from my vague description…just hoping for some debugging
>>>> suggestions.  GBS is complicated.
>>>>
>>>
>>> Let's start with verifying that the connector really was established.
>>> Add some diagnostic code to iterate through your connectors after logging
>>> in and find that particular one. Then report the value of each instance
>>> variable. Also, report the result of sending the
>>> GbsConnector>>isConnectedInSession: message for the connector.
>>>
>>> The fact that it is executing
>>> GbxUnmappedClassReplicator>>findOrGenerateClientClass strongly suggests the
>>> class is NOT connected (yet). But, if that were the case, I would have
>>> expected to see the same problem in an image with a GUI.
>>>
>>> Are any of the connectors defining a class hierarchy? In particular, is
>>> the missing one a subclass of another that's also in the connectors list?
>>> If so, the problem could be the fact that the connectors in the Session
>>> Parameters is a Set. The order is effectively random so an attempt to
>>> connect a subclass before its superclass, might be problematic. I would
>>> have expected an error if that had happened, but your investigation showed
>>> everything connected fine.
>>>
>>>
>>>
>>>> BTW: In order to get my application to run under GBS8.7.1 I had to
>>>> patch GbsRuntime parcel to include GbsSessionManager>>connectorList (which
>>>> is in GbsTools but is sent from GbsSession>>mapCrucialClasses) since I
>>>> don’t load GbsTools in my deployed image.  I think this is a GBS packaging
>>>> bug but I could be wrong.
>>>>
>>>
>>> Definitely an error. It's been like that since at least 2014! I will fix
>>> it for GBS 8.8. I have created bug #51015 for it.
>>>
>>>
>>>> Best,
>>>>
>>>> David
>>>>
>>>>
>>>> Unhandled exception: No client class Trader_LevelTriggersOrderSignal,
>>>> class generation is disabled.
>>>>
>>>> ----------------------------------------------------------------------
>>>> GbxMessageDispatcher>>basicRaise:message:
>>>> Receiver:
>>>> a GbxMessageDispatcher
>>>> Instance Variables:
>>>> handler = a CstMessageHandlerVw
>>>> Arguments:
>>>> errorSignal = GemStone.Gbs.GbsClassGenerationError
>>>> errorString = 'No client class Trader_LevelT...lass generation is
>>>> disabled.'
>>>> Context PC = 4
>>>>
>>>> ----------------------------------------------------------------------
>>>> GbxMessageDispatcher>>raise:message:withArguments:
>>>> Receiver:
>>>> a GbxMessageDispatcher
>>>> Instance Variables:
>>>> handler = a CstMessageHandlerVw
>>>> Arguments:
>>>> errorSignal = GemStone.Gbs.GbsClassGenerationError
>>>> aString = 'No client class %1, class generation is disabled.'
>>>> args = an Array[1]
>>>> Temporaries:
>>>> string = 'No client class Trader_LevelT...lass generation is disabled.'
>>>> Context PC = 12
>>>>
>>>> ----------------------------------------------------------------------
>>>> GbxMessageDispatcher>>raise:message:with:
>>>> Receiver:
>>>> a GbxMessageDispatcher
>>>> Instance Variables:
>>>> handler = a CstMessageHandlerVw
>>>> Arguments:
>>>> errorSignal = GemStone.Gbs.GbsClassGenerationError
>>>> aString = 'No client class %1, class generation is disabled.'
>>>> arg1 = 'Trader_LevelTriggersOrderSignal'
>>>> Context PC = 10
>>>>
>>>> ----------------------------------------------------------------------
>>>> GemStone.Gbs.GbxUnmappedClassReplicator>>generateClientClass
>>>> Receiver:
>>>> a GemStone.Gbs.GbxUnmappedClassReplicator
>>>> Instance Variables:
>>>> manager = a GemStone.Gbs.GbxReplicatorManager
>>>> session = Session 1 (remote) for 'Trader' on
>>>> '!@gemstone#netldi:40055!gs64stone' @ 'gemstone'
>>>> serverClass = a GbxL8Delegate sess: 1 flags: 0 {16r2E79E01}
>>>> classDelegate = a GbxL8Delegate sess: 1 flags: 32 {16r2E79C01}
>>>> classProxy = 'Not cached'
>>>> clientClass = nil
>>>> metaclassDelegate = a GbxL8Delegate sess: 1 flags: 0 {16r2E79E01}
>>>> metaclassProxy = 'Not cached'
>>>> report =  GbxL8v3ObjectReport with:
>>>> valueBuffSize = 8
>>>> namedSize = 1
>>>> idxSize = 0
>>>> firstOffset = 1
>>>> objId = GbxL8BufferOop{16r2E79C01}
>>>> objClass = GbxL8BufferOop{16r2E79E01}
>>>> segment = 0
>>>> objSize = 1
>>>> objImpl = 0
>>>> isIndexable = false
>>>> isInvariant = true
>>>> isOverlayed = false
>>>> isPartial = false
>>>> lacksReadAuth = false
>>>> isClamped = false
>>>> oops = GbxL8OopArray(16r7FE2101 )
>>>> Temporaries:
>>>> aClientClass = nil
>>>> cname = 'Trader_LevelTriggersOrderSignal'
>>>> Context PC = 27
>>>>
>>>> ----------------------------------------------------------------------
>>>> GemStone.Gbs.GbxUnmappedClassReplicator>>findOrGenerateClientClass
>>>> Receiver:
>>>> a GemStone.Gbs.GbxUnmappedClassReplicator
>>>> Instance Variables:
>>>> manager = a GemStone.Gbs.GbxReplicatorManager
>>>> session = Session 1 (remote) for 'Trader' on
>>>> '!@gemstone#netldi:40055!gs64stone' @ 'gemstone'
>>>> serverClass = a GbxL8Delegate sess: 1 flags: 0 {16r2E79E01}
>>>> classDelegate = a GbxL8Delegate sess: 1 flags: 32 {16r2E79C01}
>>>> classProxy = 'Not cached'
>>>> clientClass = nil
>>>> metaclassDelegate = a GbxL8Delegate sess: 1 flags: 0 {16r2E79E01}
>>>> metaclassProxy = 'Not cached'
>>>> report =  GbxL8v3ObjectReport with:
>>>> valueBuffSize = 8
>>>> namedSize = 1
>>>> idxSize = 0
>>>> firstOffset = 1
>>>> objId = GbxL8BufferOop{16r2E79C01}
>>>> objClass = GbxL8BufferOop{16r2E79E01}
>>>> segment = 0
>>>> objSize = 1
>>>> objImpl = 0
>>>> isIndexable = false
>>>> isInvariant = true
>>>> isOverlayed = false
>>>> isPartial = false
>>>> lacksReadAuth = false
>>>> isClamped = false
>>>> oops = GbxL8OopArray(16r7FE2101 )
>>>> Context PC = 12
>>>>
>>>> ----------------------------------------------------------------------
>>>> GemStone.Gbs.GbxUnmappedClassReplicator>>replicateClassItself
>>>> Receiver:
>>>> a GemStone.Gbs.GbxUnmappedClassReplicator
>>>> Instance Variables:
>>>> manager = a GemStone.Gbs.GbxReplicatorManager
>>>> session = Session 1 (remote) for 'Trader' on
>>>> '!@gemstone#netldi:40055!gs64stone' @ 'gemstone'
>>>> serverClass = a GbxL8Delegate sess: 1 flags: 0 {16r2E79E01}
>>>> classDelegate = a GbxL8Delegate sess: 1 flags: 32 {16r2E79C01}
>>>> classProxy = 'Not cached'
>>>> clientClass = nil
>>>> metaclassDelegate = a GbxL8Delegate sess: 1 flags: 0 {16r2E79E01}
>>>> metaclassProxy = 'Not cached'
>>>> report =  GbxL8v3ObjectReport with:
>>>> valueBuffSize = 8
>>>> namedSize = 1
>>>> idxSize = 0
>>>> firstOffset = 1
>>>> objId = GbxL8BufferOop{16r2E79C01}
>>>> objClass = GbxL8BufferOop{16r2E79E01}
>>>> segment = 0
>>>> objSize = 1
>>>> objImpl = 0
>>>> isIndexable = false
>>>> isInvariant = true
>>>> isOverlayed = false
>>>> isPartial = false
>>>> lacksReadAuth = false
>>>> isClamped = false
>>>> oops = GbxL8OopArray(16r7FE2101 )
>>>> Context PC = 13
>>>>
>>>> ----------------------------------------------------------------------
>>>>
>>>> GemStone.Gbs.GbxUnmappedClassReplicator>>forReplication:replicateFromDeferredReport:
>>>> Receiver:
>>>> a GemStone.Gbs.GbxUnmappedClassReplicator
>>>> Instance Variables:
>>>> manager = a GemStone.Gbs.GbxReplicatorManager
>>>> session = Session 1 (remote) for 'Trader' on
>>>> '!@gemstone#netldi:40055!gs64stone' @ 'gemstone'
>>>> serverClass = a GbxL8Delegate sess: 1 flags: 0 {16r2E79E01}
>>>> classDelegate = a GbxL8Delegate sess: 1 flags: 32 {16r2E79C01}
>>>> classProxy = 'Not cached'
>>>> clientClass = nil
>>>> metaclassDelegate = a GbxL8Delegate sess: 1 flags: 0 {16r2E79E01}
>>>> metaclassProxy = 'Not cached'
>>>> report =  GbxL8v3ObjectReport with:
>>>> valueBuffSize = 8
>>>> namedSize = 1
>>>> idxSize = 0
>>>> firstOffset = 1
>>>> objId = GbxL8BufferOop{16r2E79C01}
>>>> objClass = GbxL8BufferOop{16r2E79E01}
>>>> segment = 0
>>>> objSize = 1
>>>> objImpl = 0
>>>> isIndexable = false
>>>> isInvariant = true
>>>> isOverlayed = false
>>>> isPartial = false
>>>> lacksReadAuth = false
>>>> isClamped = false
>>>> oops = GbxL8OopArray(16r7FE2101 )
>>>> Arguments:
>>>> replication = a GemStone.Gbs.GbxReplication
>>>> aReport =  GbxL8v3ObjectReport with:
>>>> valueBuffSize = 8
>>>> namedSize = 1
>>>> idxSize = 0
>>>> firstOffset = 1
>>>> objId = GbxL8BufferOop{16r2E79C01}
>>>> objClass = GbxL8BufferOop{16r2E79E01}
>>>> segment = 0
>>>> objSize = 1
>>>> objImpl = 0
>>>> isIndexable = false
>>>> isInvariant = true
>>>> isOverlayed = false
>>>> isPartial = false
>>>> lacksReadAuth = false
>>>> isClamped = false
>>>> oops = GbxL8OopArray(16r7FE2101 )
>>>> Context PC = 26
>>>>
>>>> ----------------------------------------------------------------------
>>>> GemStone.Gbs.GbxReplication>>replicateFromDeferredReport:
>>>> Receiver:
>>>> a GemStone.Gbs.GbxReplication
>>>> Instance Variables:
>>>> interaction = a GemStone.Gbs.GbxSingleTripServerTraversal for session 1
>>>> replicationSpecSelector: #replicationSpec
>>>> , traversal root: a GbxL8Delegate sess: 1 flags: 32 {16r288AF01}
>>>> objectsWithDeferredAssignments = an OrderedCollection[40]
>>>> reportsWithDeferredElements = an OrderedCollection[0]
>>>> reportsWithNoMappedClass = an OrderedCollection[3]
>>>> session = Session 1 (remote) for 'Trader' on
>>>> '!@gemstone#netldi:40055!gs64stone' @ 'gemstone'
>>>> Arguments:
>>>> report =  GbxL8v3ObjectReport with:
>>>> valueBuffSize = 8
>>>> namedSize = 1
>>>> idxSize = 0
>>>> firstOffset = 1
>>>> objId = GbxL8BufferOop{16r2E79C01}
>>>> objClass = GbxL8BufferOop{16r2E79E01}
>>>> segment = 0
>>>> objSize = 1
>>>> objImpl = 0
>>>> isIndexable = false
>>>> isInvariant = true
>>>> isOverlayed = false
>>>> isPartial = false
>>>> lacksReadAuth = false
>>>> isClamped = false
>>>> oops = GbxL8OopArray(16r7FE2101 )
>>>> Temporaries:
>>>> replicator = a GemStone.Gbs.GbxUnmappedClassReplicator
>>>> Context PC = 10
>>>>
>>>> ----------------------------------------------------------------------
>>>> optimized [] in GemStone.Gbs.GbxReplication>>resolveUnmappedClasses
>>>> Receiver:
>>>> an UndefinedObject
>>>> Arguments:
>>>> aReport =  GbxL8v3ObjectReport with:
>>>> valueBuffSize = 8
>>>> namedSize = 1
>>>> idxSize = 0
>>>> firstOffset = 1
>>>> objId = GbxL8BufferOop{16r2E79C01}
>>>> objClass = GbxL8BufferOop{16r2E79E01}
>>>> segment = 0
>>>> objSize = 1
>>>> objImpl = 0
>>>> isIndexable = false
>>>> isInvariant = true
>>>> isOverlayed = false
>>>> isPartial = false
>>>> lacksReadAuth = false
>>>> isClamped = false
>>>> oops = GbxL8OopArray(16r7FE2101 )
>>>> Temporaries:
>>>> .self = a GemStone.Gbs.GbxReplication
>>>> Context PC = 18
>>>>
>>>> ----------------------------------------------------------------------
>>>> OrderedCollection>>do:
>>>> Receiver:
>>>> an OrderedCollection
>>>> Instance Variables:
>>>> firstIndex = 1
>>>> lastIndex = 3
>>>> Arguments:
>>>> aBlock = BlockClosure [] in
>>>> GemStone.Gbs.GbxReplication>>resolveUnmappedClasses
>>>> Temporaries:
>>>> index = 1
>>>> Context PC = 17
>>>>
>>>> ----------------------------------------------------------------------
>>>> GemStone.Gbs.GbxReplication>>resolveUnmappedClasses
>>>> Receiver:
>>>> a GemStone.Gbs.GbxReplication
>>>> Instance Variables:
>>>> interaction = a GemStone.Gbs.GbxSingleTripServerTraversal for session 1
>>>> replicationSpecSelector: #replicationSpec
>>>> , traversal root: a GbxL8Delegate sess: 1 flags: 32 {16r288AF01}
>>>> objectsWithDeferredAssignments = an OrderedCollection[40]
>>>> reportsWithDeferredElements = an OrderedCollection[0]
>>>> reportsWithNoMappedClass = an OrderedCollection[3]
>>>> session = Session 1 (remote) for 'Trader' on
>>>> '!@gemstone#netldi:40055!gs64stone' @ 'gemstone'
>>>> Context PC = 8
>>>>
>>>> ----------------------------------------------------------------------
>>>> optimized [] in GemStone.Gbs.GbxReplication>>resolve
>>>> Receiver:
>>>> an UndefinedObject
>>>> Temporaries:
>>>> .self = a GemStone.Gbs.GbxReplication
>>>> Context PC = 7
>>>>
>>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/archives/gemstone-smalltalk/attachments/20240603/4e83717e/attachment-0001.htm>


More information about the GemStone-Smalltalk mailing list