Corrupt database?
Hernán Morales Durand
hernan.morales at gmail.com
Tue May 12 01:02:17 UTC 2009
2009/5/12 Chris Muller <ma.chris.m at gmail.com>:
> Hi Hernán, this could mean two clients had different notions of what
> class 378 is. I would use the FileTraverser to take a count of your
> 378's; see first if you have consistency.
Hi Chris, I forgot to mention, 378 is DateQualifier. Should I search
for more DateQualifier class definitions in the aMagmaClassIdManager ?
>
> Do you have any suspicions about the cause of the problem?
>
> some questions:
>
> - What version of Magma?
release 42 gamma 1 (Magma client-cmm.398)
>
> - Is DateQualifier a kind-of Set?
No, is a subclass of AbstractTitleQualifier which is a subclass of Object.
>
> - Did you extend (subclass) any class included in the MagmaSession protocol?
No
Hernán
>
> - Chris
>
> On Mon, May 11, 2009 at 3:03 PM, Hernán Morales Durand
> <hernan.morales at gmail.com> wrote:
>> 2009/5/7 Chris Muller <ma.chris.m at gmail.com>:
>>>
>>> Option 2: What matters is that STBUser buffers in the repository all
>>> point consistently to the correct class version. Write a script using
>>> MagmaFileTraverser to interrogate all of the Fixed buffers ("type =
>>> 3") where classId=126, check that their versions all are correct and
>>> consistent with their number of instVars of the Buffer
>>> (#objectInstSize).
>>
>> I have a similar problem ( 'DateQualifier cannot have variable sized
>> instances' ) but in my case there's only one version of DateQualifier,
>> ( i.e. aMagmaClassIdManager definitionForClassId: 378 version: 2 fails
>> because non-existent index). Here objectInstSize = 2 and
>> sourceDefinition namedInstSize = 3, resulting in indexedSize = -1 and
>> performing the #basicNew:
>>
>> #namedInstSize is correct, the DateQualifier's superclass has 3
>> instance variables, the output of Jerry's first script would be:
>>
>> Index: 1 Version: 1 ivar count: 3
>>
>> So I wrote the script you suggested:
>>
>> ( MagmaFileTraverser for: 'Magma' ) open
>> anchorGraphDo: [ : buffer |
>> ( buffer classId = 378 and: [ buffer class = MaFixedObjectBuffer ] )
>> ifTrue: [ buffer objectInstSize inspect ]
>> ].
>>
>> but still fails with the same error. My problem is that I cannot open
>> the repository to commit any corrections because of this error.
>>
>> 11 May 2009 4:47:59 pm
>> VM: Win32 - a SmalltalkImage
>> Image: Squeak3.10.2 [latest update: #7179]
>>
>> SecurityManager state:
>> Restricted: false
>> FileAccess: true
>> SocketAccess: true
>> Working Dir C:\Squeak 3.9
>> Trusted Dir C:\Squeak 3.9\hmorales
>> Untrusted Dir C:\My Squeak\hmorales
>>
>> DateQualifier class(Object)>>error:
>> Receiver: DateQualifier
>> Arguments and temporary variables:
>> aString: 'DateQualifier cannot have variable sized instances'
>> Receiver's instance variables:
>> superclass: AbstractTitleQualifier
>> methodDict: a MethodDictionary(#distantGetter->a CompiledMethod
>> (720) #initiali...etc...
>> format: 136
>> instanceVariables: nil
>> organization: ('printing' printOn: printQualifierOn:)
>> ('initialization' distant...etc...
>> subclasses: nil
>> name: #DateQualifier
>> classPool: nil
>> sharedPools: nil
>> environment: a SystemDictionary(lots of globals)
>> category: #'DocModel-Titles'
>>
>> DateQualifier class(Behavior)>>basicNew:
>> Receiver: DateQualifier
>> Arguments and temporary variables:
>> sizeRequested: -1
>> Receiver's instance variables:
>> superclass: AbstractTitleQualifier
>> methodDict: a MethodDictionary(#distantGetter->a CompiledMethod
>> (720) #initiali...etc...
>> format: 136
>> instanceVariables: nil
>> organization: ('printing' printOn: printQualifierOn:)
>> ('initialization' distant...etc...
>> subclasses: nil
>> name: #DateQualifier
>> classPool: nil
>> sharedPools: nil
>> environment: a SystemDictionary(lots of globals)
>> category: #'DocModel-Titles'
>>
>> MaFixedObjectBuffer>>createObjectUsing:
>> Receiver: a MaFixedObjectBuffer
>> oid : 16861039
>> classId : 378
>> objectInstSize : 2
>> commitNumber : ...etc...
>> Arguments and temporary variables:
>> aMaObjectSerializer: a MaObjectSerializer
>> class: DateQualifier
>> skeleton: nil
>> indexedSize: -1
>> sourceDefinition: a MaClassDefinition DateQualifier
>> version = 1
>> inImageDefinition: a MaClassDefinition DateQualifier
>> version = 1
>> eachOid: nil
>> sourceIndex: nil
>> targetIndex: nil
>> Receiver's instance variables:
>> byteArray: a ByteArray(242 159 4 0 176 14 62 0 0 0 62 0 0 19 115 0
>> 99 81 1 0 0 ...etc...
>> startPos: 299
>>
>> MaObjectSerializer>>newSkeletonFor:fromProxy:
>> Receiver: a MaObjectSerializer
>> Arguments and temporary variables:
>> aMaObjectBuffer: a MaFixedObjectBuffer
>> oid : 16861039
>> classId : 378
>> objectI...etc...
>> aMaMutatingProxy: nil
>> skel: nil
>> Receiver's instance variables:
>> oidManager: a MagmaOidManager
>> classIdManager: a MagmaClassIdManager
>> preMadeObjectBuffers: an Array(a MaByteObjectBuffer
>> oid : 16149077336050
>> cla...etc...
>> graphBuffer: a MaSerializedGraphBuffer (6168 objects in 303090 bytes)
>> createProxyBlock: [] in MagmaSession>>initializeSerializer {[:oid |
>> MagmaMutati...etc...
>> traversalStrategy: a MaObjectGraphTraversalStrategy
>> amBusy: true
>> truncatedObjects: a WeakIdentityKeyDictionary()
>> preferences: a MaObjectSerializerPreferences
>> bpMapIndex: 1
>>
>>
>> --- The full stack ---
>> DateQualifier class(Object)>>error:
>> DateQualifier class(Behavior)>>basicNew:
>> MaFixedObjectBuffer>>createObjectUsing:
>> MaObjectSerializer>>newSkeletonFor:fromProxy:
>> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>> [] in MaObjectSerializer>>materializeGraphDo: {[skeletons add:
>> (Association key: (newObject := self newSkeletonFor: each ...]}
>> [] in MaWeakValueDictionary(MaDictionary)>>maAt:ifPresent:ifAbsent:
>> {[^ zeroArgBlock value]}
>> MaWeakValueDictionary(MaDictionary)>>at:ifAbsent:
>> MaWeakValueDictionary(MaDictionary)>>maAt:ifPresent:ifAbsent:
>> [] in MagmaOidManager>>objectWithOid:ifFound:ifAbsent:
>> {[(MaOidCalculator isOidForNewObject: anInteger) ifTrue: [newObjects
>> ma...]}
>> MaOidCalculator class>>objectWithOid:ifNone:
>> MagmaOidManager>>objectWithOid:ifFound:ifAbsent:
>> MaObjectSerializer>>objectWithOid:ifFound:ifAbsent:
>> [] in MaObjectSerializer>>materializeGraphDo: {[:each | object :=
>> self objectWithOid: each oid ifFound: [:foundObj...]}
>> [] in MaSerializedGraphBuffer>>buffersDo: {[:eachPosition | buffer :=
>> preMadeBuffers at: (self bufferTypeAt: eachP...]}
>> MaSerializedGraphBuffer>>bufferPositionsDo:
>> MaSerializedGraphBuffer>>buffersDo:
>> MaObjectSerializer>>materializeGraphDo:
>> MaObjectSerializer>>materializeGraph:do:
>> [] in MagmaSession>>materializeObject: {[serializer
>> materializeGraph: aByteArray do: [:eachObject :eachBuffer | ...]}
>> ...etc...
>>
>> Any other suggestion?
>>
>> Hernán
>>
>
More information about the Magma
mailing list