On 1 January 2011 22:27, Eliot Miranda <[email protected]> wrote: > > > On Sat, Jan 1, 2011 at 1:23 PM, Igor Stasenko <[email protected]> wrote: >> >> I built fresh Cog VM using cmake configs. >> >> Pharo 1.2 tests still crashing with segfault. > > So how exactly do I reproduce this? Image, OS, action etc... >
Try running tests in latest pharo 1.2 image i.e., open image open test runner and press run. >> >> Here the stack dump: >> >> 0xbff638f0 M CompiledMethod(Object)>becomeForward: 461278460: a(n) >> CompiledMethod >> 0xbff63914 M CompiledMethod>setSourcePointer: 461278460: a(n) >> CompiledMethod >> 0xbff63930 M CompiledMethod>setSourcePosition:inFile: 461278460: a(n) >> CompiledMethod >> 0xbff63958 M CompiledMethod>putSource:fromParseNode:inFile:withPreamble: >> 461278460: a(n) CompiledMethod >> 0xbff63988 M ClassTrait(TraitBehavior)>addTraitSelector:withMethod: >> 460086116: a(n) ClassTrait >> 0xbff639b4 M [] in >> ClassTrait(TraitBehavior)>updateMethodDictionarySelector: 460086116: >> a(n) ClassTrait >> 0xbff639d4 M OrderedCollection>do: 461255108: a(n) OrderedCollection >> 0xbff639f8 M ClassTrait(TraitBehavior)>updateMethodDictionarySelector: >> 460086116: a(n) ClassTrait >> 0xbff63a1c M [] in ClassTrait(TraitBehavior)>noteChangedSelectors: >> 460086116: a(n) ClassTrait >> 0xbff63a3c M [] in IdentitySet(Set)>do: 461251388: a(n) IdentitySet >> 0xbff63a60 M Array(SequenceableCollection)>do: 461251400: a(n) Array >> 0xbff63a7c M IdentitySet(Set)>do: 461251388: a(n) IdentitySet >> 0xbff63a9c M ClassTrait(TraitBehavior)>noteChangedSelectors: >> 460086116: a(n) ClassTrait >> 0xbff63ac4 I >> ClassTrait(TraitBehavior)>applyChangesOfNewTraitCompositionReplacing: >> 460086116: a(n) ClassTrait >> 0xbff63aec I >> ClassTrait(TraitDescription)>applyChangesOfNewTraitCompositionReplacing: >> 460086116: a(n) ClassTrait >> 0xbff63b14 I ClassTrait(TraitBehavior)>setTraitComposition: 460086116: >> a(n) ClassTrait >> 0xbff63b40 I ClassTrait>noteNewBaseTraitCompositionApplied: 460086116: >> a(n) ClassTrait >> 0xbff63b68 I Trait>applyChangesOfNewTraitCompositionReplacing: >> 460085756: a(n) Trait >> 0xbff63b90 I Trait(TraitBehavior)>setTraitComposition: 460085756: a(n) >> Trait >> 0xbff63bc0 I Trait class>named:uses:category:env: 437072228: a(n) Trait >> class >> 0xbff63bf4 I Trait class>named:uses:category: 437072228: a(n) Trait class >> 0xbff63c24 I TraitCompositionTest(TraitsTestCase)>createTraitNamed:uses: >> 456579032: a(n) TraitCompositionTest >> 0xbff63c4c M TraitCompositionTest>testProvidedMethodBindingsWithConflicts >> 456579032: a(n) TraitCompositionTest >> 0xbff63c64 M TraitCompositionTest(TestCase)>performTest 456579032: >> a(n) TraitCompositionTest >> >> >> Looks like Cog really don't likes when image trying to manipulate with >> methods using #become: :) >> >> However, running >> >> TraitCompositionTest run: #testProvidedMethodBindingsWithConflicts >> >> alone, doesn't triggers a crash, which makes me suspect that object >> memory is damaged by >> something which runs before it, and this crash is only a consequence of >> damage. >> >> Running the TraitsTestCase also works w/o problems. >> This bug is really lurky SOAB :) >> >> I removed the TraitCompositionTest from system and run the tests >> again. This time i got crash in different place: >> >> (gdb) bt >> #0 mapForbcpcperformUntilarg (cogMethod=0x19df44c8, startbcpc=104, >> functionSymbol=0x6de0 <findMcpcBcpcMatchingBcpc>, arg=0x92) at >> /Users/sig/projects/cog/sig-cog/src/vm/cogit.c:12014 >> #1 0x00009154 in mcPCForstartBcpcin (bcpc=146, startbcpc=104, >> cogMethod=0x19df44c8) at >> /Users/sig/projects/cog/sig-cog/src/vm/cogit.c:12604 >> #2 0x0006c967 in interpret () at >> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:5904 >> #3 0x0006dc78 in enterSmalltalkExecutiveImplementation () at >> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:14081 >> #4 0x0006ede4 in initStackPagesAndInterpret () at >> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:17676 >> >> >> (gdb) call (int) printAllStacks() >> Process 0x1a7e02ac priority 40 >> 0xbff64b34 M [] in >> >> FileStreamTest>doTestsForReading:intoBufferWithSize:startingAt:fromFileOfSize:offsetBy: >> 455083812: a(n) FileStreamTest >> 0xbff64b54 M BlockClosure>ensure: 457616488: a(n) BlockClosure >> 0xbff64b80 I >> FileStreamTest>doTestsForReading:intoBufferWithSize:startingAt:fromFileOfSize:offsetBy: >> 455083812: a(n) FileStreamTest >> 0xbff64bac M FileStreamTest>testReadIntoStartingAtCountAll 455083812: >> a(n) FileStreamTest >> 0xbff64bc4 M FileStreamTest(TestCase)>performTest 455083812: a(n) >> FileStreamTest >> 0xbff64bdc M [] in FileStreamTest(TestCase)>runCase 455083812: a(n) >> FileStreamTest >> 0xbff64bfc M BlockClosure>ensure: 457616196: a(n) BlockClosure >> 0xbff64c18 M FileStreamTest(TestCase)>runCase 455083812: a(n) >> FileStreamTest >> 0xbff64c34 M [] in TestResult>runCase: 454652328: a(n) TestResult >> .... >> >> >> This is reproducible by running: >> FileStreamTest run: #testReadIntoStartingAtCountAll >> >> but works fine in older VM(s). >> >> >> I continued attempts to run whole tests after removing >> TraitCompositionTest and FileStreamTest, and here's another one: >> >> (gdb) bt >> #0 0x00040bb7 in mapPointersInObjectsFromto (memStart=455419144, >> memEnd=456751028) at sqMemoryAccess.h:81 >> #1 0x00043acc in becomewithtwoWaycopyHash (array1=456751008, >> array2=456751016, twoWayFlag=1, copyHashFlag=1) at >> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:9410 >> #2 0x00044268 in primitiveArrayBecome () at >> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:22887 >> #3 0x19dc8c31 in ?? () >> #4 0x0006ede4 in initStackPagesAndInterpret () at >> /Users/sig/projects/cog/sig-cog/src/vm/gcc3x-cointerp.c:17676 >> #5 0x0008a773 in EventLoopEventHandler (inHandlerCallRef=0xbfffca70, >> inEvent=0x417760, inUserData=0x0) at >> /Users/sig/projects/cog/sig-cog/platforms/Mac OS/vm/sqMacUIEven >> >> (gdb) call (int) printAllStacks() >> Process 0x1a7d09f4 priority 40 >> 0xbff64b54 M ByteString(ProtoObject)>become: 456750624: a(n) ByteString >> 0xbff64b78 M ByteString>? 456750624: a(n) ByteString >> 0xbff64bac M MethodDictionaryTest>testRemoveKeyIfAbsent 454729064: >> a(n) MethodDictionaryTest >> 0xbff64bc4 M MethodDictionaryTest(TestCase)>performTest 454729064: >> a(n) MethodDictionaryTest >> 0xbff64bdc M [] in MethodDictionaryTest(TestCase)>runCase 454729064: >> a(n) MethodDictionaryTest >> 0xbff64bfc M BlockClosure>ensure: 456748784: a(n) BlockClosure >> 0xbff64c18 M MethodDictionaryTest(TestCase)>runCase 454729064: a(n) >> MethodDictionaryTest >> 0xbff64c34 M [] in TestResult>runCase: 454590236: a(n) TestResult >> 0xbff64c50 M BlockClosure>on:do: 456748452: a(n) BlockClosure >> 0xbff64c70 M TestResult>runCase: 454590236: a(n) TestResult >> 0xbff64c8c M MethodDictionaryTest(TestCase)>run: 454729064: a(n) >> MethodDictionaryTest >> 0xbff64ca8 M TestRunner>runTest: 454542100: a(n) TestRunner >> 0xbff64cc4 M [] in TestRunner>runSuite: 454542100: a(n) TestRunner >> >> .. as expected, by running this test alone it doesn't causing any >> troubles. >> >> >> >> >> Another thing which i noticed that i got DNU during world menu render >> and it is caused by making colors of Cubic-Rubik form to contain >> smallinteger values. >> This is original (once i start image): >> >> ColorForm allInstances collect: #colors >> >> an Array(a ColorArray(Color transparent (Color r: 0.0 g: 0.0 b: >> 0.004)) a ColorArray(Color transparent Color transparent) a >> ColorArray(Color transparent Color transparent)) >> >> >> And after some manipulations and wandering i got: >> >> ColorForm allInstances collect: #colors >> >> an Array(a ColorArray(Color transparent (Color r: 0.0 g: 0.0 b: >> 0.004)) a ColorArray(Color transparent Color transparent) a >> ColorArray(Color transparent Color transparent) #(0 4278190081)) >> >> >> What i found really strange that these values are somehow flipped back >> to normal ones (or maybe it is i, who restarted the image.. not >> sure).. >> >> >> -- >> Best regards, >> Igor Stasenko AKA sig. >> > > -- Best regards, Igor Stasenko AKA sig.
