Hi, This is a continuation of a crash report by Igor (but I couldn't find the thread to reply properly, he). I tried running Pharo 1.2 tests using a cocoa cog compiled by my self (near 5.8b12 version, but with minor bugfixes), and the VM crashes with the info I'm pasting below. The crash occurs while executing TraitCompositionTest, which runs fine if it's run individually. btw... Pharo 1.1.1 tests runs correctly (some failures, some errors, but no crash :) ) best, Esteban (gdb) bt #0 0x0008f18c in longAt [inlined] () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/Cross/vm/sqMemoryAccess.h:41314 #1 0x0008f18c in longAtPointer [inlined] () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/Cross/vm/sqMemoryAccess.h:41314 #2 0x0008f18c in mapPointersInObjectsFromto (memStart=544259160, memEnd=547015536) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:19156 #3 0x1f4d7330 in ?? () (gdb) call (int) printAllStacks() Process 0x1fb0b654 priority 40 0xbff664a4 I CompiledMethod(Object)>becomeForward: 547015488: a(n) CompiledMethod 0xbff664c8 M CompiledMethod>setSourcePointer: 547015488: a(n) CompiledMethod 0xbff664e4 M CompiledMethod>setSourcePosition:inFile: 547015488: a(n) CompiledMethod 0xbff6650c M CompiledMethod>putSource:fromParseNode:inFile:withPreamble: 547015488: a(n) CompiledMethod 0xbff66544 I Trait(TraitBehavior)>addTraitSelector:withMethod: 546943760: a(n) Trait 0xbff66570 M [] in Trait(TraitBehavior)>updateMethodDictionarySelector: 546943760: a(n) Trait 0xbff66590 M OrderedCollection>do: 546995828: a(n) OrderedCollection 0xbff665b4 M Trait(TraitBehavior)>updateMethodDictionarySelector: 546943760: a(n) Trait 0xbff665e0 I [] in Trait(TraitBehavior)>noteChangedSelectors: 546943760: a(n) Trait 0xbff66600 M [] in IdentitySet(Set)>do: 546964932: a(n) IdentitySet 0xbff66624 M Array(SequenceableCollection)>do: 546967168: a(n) Array 0xbff66640 M IdentitySet(Set)>do: 546964932: a(n) IdentitySet 0xbff66668 I Trait(TraitBehavior)>noteChangedSelectors: 546943760: a(n) Trait 0xbff66690 I Trait(TraitBehavior)>applyChangesOfNewTraitCompositionReplacing: 546943760: a(n) Trait 0xbff666b8 I Trait(TraitDescription)>applyChangesOfNewTraitCompositionReplacing: 546943760: a(n) Trait 0xbff666e0 I Trait>applyChangesOfNewTraitCompositionReplacing: 546943760: a(n) Trait 0xbff66708 I Trait(TraitBehavior)>setTraitComposition: 546943760: a(n) Trait 0xbff66738 I Trait class>named:uses:category:env: 526279012: a(n) Trait class 0xbff6676c I Trait class>named:uses:category: 526279012: a(n) Trait class 0xbff6679c I TraitCompositionTest(TraitsTestCase)>createTraitNamed:uses: 543518512: a(n) TraitCompositionTest 0xbff667c4 M TraitCompositionTest>testProvidedMethodBindingsWithConflicts 543518512: a(n) TraitCompositionTest 0xbff667dc M TraitCompositionTest(TestCase)>performTest 543518512: a(n) TraitCompositionTest 0xbff667f4 M [] in TraitCompositionTest(TestCase)>runCase 543518512: a(n) TraitCompositionTest 0xbff66814 M BlockClosure>ensure: 546942212: a(n) BlockClosure 0xbff66830 M TraitCompositionTest(TestCase)>runCase 543518512: a(n) TraitCompositionTest 0xbff6684c M [] in TestResult>runCase: 543379756: a(n) TestResult 0xbff66868 M BlockClosure>on:do: 546940640: a(n) BlockClosure 0xbff66888 M TestResult>runCase: 543379756: a(n) TestResult 0xbff668a4 M TraitCompositionTest(TestCase)>run: 543518512: a(n) TraitCompositionTest 0xbff668c0 M TestRunner>runTest: 543237552: a(n) TestRunner 0xbff668dc M [] in TestRunner>runSuite: 543237552: a(n) TestRunner 0xbff66914 M [] in OrderedCollection(Collection)>do:displayingProgress:every: 543380248: a(n) OrderedCollection 0xbff66934 M OrderedCollection>do: 543380248: a(n) OrderedCollection 0xbff6696c I [] in OrderedCollection(Collection)>do:displayingProgress:every: 543380248: a(n) OrderedCollection 0xbff66990 M [] in ProgressInitiationException>defaultMorphicAction 543926492: a(n) ProgressInitiationException 0xbff5e3c0 M BlockClosure>on:do: 543927148: a(n) BlockClosure 0xbff5e3f0 I [] in ProgressInitiationException>defaultMorphicAction 543926492: a(n) ProgressInitiationException 0xbff5e410 M BlockClosure>ensure: 543927012: a(n) BlockClosure 0xbff5e43c I ProgressInitiationException>defaultMorphicAction 543926492: a(n) ProgressInitiationException 0xbff5e45c I MorphicUIManager>progressInitiationExceptionDefaultAction: 543926724: a(n) MorphicUIManager 0xbff5e478 M ProgressInitiationException>defaultAction 543926492: a(n) ProgressInitiationException 0xbff5e494 M UndefinedObject>handleSignal: 525336580: a(n) UndefinedObject 0xbff5e4b4 M MethodContext(ContextPart)>handleSignal: 543861016: a(n) MethodContext 0xbff5e4d0 M ProgressInitiationException(Exception)>signal 543926492: a(n) ProgressInitiationException 0xbff5e4f0 I ProgressInitiationException>display:at:from:to:during: 543926492: a(n) ProgressInitiationException 0xbff5e524 I ProgressInitiationException class>display:at:from:to:during: 526266692: a(n) ProgressInitiationException class 0xbff5e558 I ByteString(String)>displayProgressAt:from:to:during: 528298688: a(n) ByteString 0xbff5e594 I OrderedCollection(Collection)>do:displayingProgress:every: 543380248: a(n) OrderedCollection 0xbff5e5c0 I OrderedCollection(Collection)>do:displayingProgress: 543380248: a(n) OrderedCollection 0xbff5e5f0 I [] in TestRunner>basicRunSuite:do: 543237552: a(n) TestRunner 0xbff5e610 M BlockClosure>ensure: 543926280: a(n) BlockClosure 0xbff5e634 I TestRunner>basicRunSuite:do: 543237552: a(n) TestRunner 0xbff5e65c I TestRunner>runSuite: 543237552: a(n) TestRunner 0xbff5e678 M TestRunner>runAll 543237552: a(n) TestRunner 0xbff5e698 I PluggableButtonMorph>performAction 543287688: a(n) PluggableButtonMorph 0xbff5e6b4 M [] in PluggableButtonMorph>mouseUp: 543287688: a(n) PluggableButtonMorph 0xbff5e6d8 M Array(SequenceableCollection)>do: 543379612: a(n) Array 0xbff5e700 I PluggableButtonMorph>mouseUp: 543287688: a(n) PluggableButtonMorph 0xbff5e724 I PluggableButtonMorph(Morph)>handleMouseUp: 543287688: a(n) PluggableButtonMorph 0xbff5e740 M MouseButtonEvent>sentTo: 543379572: a(n) MouseButtonEvent 0xbff5e75c M PluggableButtonMorph(Morph)>handleEvent: 543287688: a(n) PluggableButtonMorph 0xbff5e778 M PluggableButtonMorph(Morph)>handleFocusEvent: 543287688: a(n) PluggableButtonMorph 0xbff5e7a0 M [] in HandMorph>sendFocusEvent:to:clear: 526727360: a(n) HandMorph 0xbff5e7bc M [] in PasteUpMorph>becomeActiveDuring: 527811092: a(n) PasteUpMorph 0xbff5e7d8 M BlockClosure>on:do: 543379520: a(n) BlockClosure 0xbff5e804 M PasteUpMorph>becomeActiveDuring: 527811092: a(n) PasteUpMorph 0xbff5e828 M HandMorph>sendFocusEvent:to:clear: 526727360: a(n) HandMorph 0xbff5e850 M HandMorph>sendEvent:focus:clear: 526727360: a(n) HandMorph 0xbff5e874 M HandMorph>sendMouseEvent: 526727360: a(n) HandMorph 0xbff5e898 M HandMorph>handleEvent: 526727360: a(n) HandMorph 0xbff5e8c4 M HandMorph>processEvents 526727360: a(n) HandMorph 0xbff5e8dc M [] in WorldState>doOneCycleNowFor: 535613652: a(n) WorldState 0xbff5e900 M Array(SequenceableCollection)>do: 525350276: a(n) Array 0xbff5e91c M WorldState>handsDo: 535613652: a(n) WorldState 0xbff5e938 M WorldState>doOneCycleNowFor: 535613652: a(n) WorldState 0xbff5e954 M WorldState>doOneCycleFor: 535613652: a(n) WorldState 0xbff5e970 M PasteUpMorph>doOneCycle 527811092: a(n) PasteUpMorph 0xbff5e990 I [] in Project class>? 533540648: a(n) Project class 531674612 s [] in BlockClosure>newProcess Process 0x205eef6c priority 50 0xbff5f950 I WeakArray class>finalizationProcess 526245700: a(n) WeakArray class 0xbff5f970 I [] in WeakArray class>restartFinalizationProcess 526245700: a(n) WeakArray class 0xbff5f990 I [] in BlockClosure>newProcess 543092368: a(n) BlockClosure Process 0x20078f84 priority 80 0xbff60970 M Delay class>handleTimerEvent 526251340: a(n) Delay class 0xbff60990 I Delay class>runTimerEventLoop 526251340: a(n) Delay class 537366032 s [] in Delay class>startTimerEventLoop 537366308 s [] in BlockClosure>newProcess Process 0x205b9cc8 priority 60 0xbff61950 I SmalltalkImage>lowSpaceWatcher 527615096: a(n) SmalltalkImage 0xbff61970 I [] in SmalltalkImage>installLowSpaceWatcher 527615096: a(n) SmalltalkImage 0xbff61990 I [] in BlockClosure>newProcess 542874604: a(n) BlockClosure Process 0x205ecb00 priority 60 0xbff628d0 M [] in Delay>wait 543083336: a(n) Delay 0xbff628f0 M BlockClosure>ifCurtailed: 547003416: a(n) BlockClosure 0xbff6290c M Delay>wait 543083336: a(n) Delay 0xbff62924 M InputEventPollingFetcher>waitForInput 526779328: a(n) InputEventPollingFetcher 0xbff62950 I InputEventPollingFetcher(InputEventFetcher)>eventLoop 526779328: a(n) InputEventPollingFetcher 0xbff62970 I [] in InputEventPollingFetcher(InputEventFetcher)>installEventLoop 526779328: a(n) InputEventPollingFetcher 0xbff62990 I [] in BlockClosure>newProcess 543083044: a(n) BlockClosure SmallInteger 0xc01 priority Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x00000c0d printProcessStack (aProcess=3073) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:37340 37340 printNum(quickFetchIntegerofObject(PriorityIndex, aProcess)); The program being debugged was signaled while in a function called from GDB. GDB remains in the frame where the signal was received. To change this behavior use "set unwindonsignal on" Evaluation of the expression containing the function (printAllStacks) will be abandoned. |
Ok, what I can see is a longAt: that crashed. Happened to me several times with Cog when using objects as methods. Then, you did a printAllStacks() which caused another crash (I think). It seems it was in the line: self print: ' priority '; printNum: (self quickFetchInteger: PriorityIndex ofObject: proc); cr. of #printAllStacks if you see, the 'priority' is written, so the crash is in printNum: (self quickFetchInteger: PriorityIndex ofObject: proc); It seems this failed because there was a SmallInteger instead of a Procces ? mmm wierd. anyway, the real crash is in longAt: I bet that the number you are sending is negative. I would compiled the VM in development and "run and debug". Then, when it fails, open the XCode debugger and check the value sent to longAt: and its stracktrace. cheers mariano On Fri, Dec 31, 2010 at 3:59 PM, Esteban Lorenzano <[hidden email]> wrote:
|
In reply to this post by EstebanLM
Hi Esteban. When I run a big code with Cog (replace ALL unused compiled methods but proxies), I have the same error. At least the same 3 first lines:
(gdb)
bt #0 0x0008f18c in longAt [inlined] ()
at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/Cross/vm/sqMemoryAccess.h:41314 #1 0x0008f18c in longAtPointer
[inlined] () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/Cross/vm/sqMemoryAccess.h:41314 #2 0x0008f18c in
mapPointersInObjectsFromto (memStart=544259160, memEnd=547015536) at
/Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:19156 In my case, the error is that the oop to is trying to access in longAt: is negative. If you continue in the stack, in my case, is while doing an incremental GC. Hopefully we are talking about the same error. cheers mariano On Fri, Dec 31, 2010 at 3:59 PM, Esteban Lorenzano <[hidden email]> wrote:
|
Hi, This is another stack trace (get with vm compiled as "debug"): (gdb) bt #0 0x000df3b2 in longAtPointer (ptr=0x4122fc50 <Address 0x4122fc50 out of bounds>) at sqMemoryAccess.h:81 #1 0x000df3cf in longAt (oop=1092811856) at sqMemoryAccess.h:93 #2 0x0011207a in printAllStacks () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:35900 #3 <function called from gdb> #4 0x000df3b2 in longAtPointer (ptr=0xfff6d000 <Address 0xfff6d000 out of bounds>) at sqMemoryAccess.h:81 #5 0x000df3cf in longAt (oop=-602112) at sqMemoryAccess.h:93 #6 0x0011c7c1 in updatePointersInRangeFromto (memStart=544278724, memEnd=546407076) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:41314 #7 0x000f5020 in mapPointersInObjectsFromto (memStart=544278724, memEnd=546407076) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:19156 #8 0x000e1005 in becomewithtwoWaycopyHash (array1=546407056, array2=546407064, twoWayFlag=0, copyHashFlag=1) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:9230 #9 0x000fa8a1 in primitiveArrayBecomeOneWay () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:22247 #10 0x000d84e9 in interpret () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:4839 #11 0x000ea57a in enterSmalltalkExecutiveImplementation () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:13694 #12 0x000f1828 in initStackPagesAndInterpret () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:17133 #13 0x000d1b5c in interpret () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:1894 #14 0x0009bee2 in -[sqSqueakMainApplication runSqueak] (self=0x324970, _cmd=0x1444b9) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../iOS/vm/Common/Classes/sqSqueakMainApplication.m:172 #15 0x933afd98 in __NSFirePerformWithOrder () #16 0x97343e02 in __CFRunLoopDoObservers () #17 0x972ffd8d in __CFRunLoopRun () #18 0x972ff464 in CFRunLoopRunSpecific () #19 0x972ff291 in CFRunLoopRunInMode () #20 0x99648f9c in RunCurrentEventLoopInMode () #21 0x99648c8d in ReceiveNextEventCommon () #22 0x99648bd6 in BlockUntilNextEventMatchingListInMode () #23 0x94c7578d in _DPSNextEvent () #24 0x94c74fce in -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] () #25 0x94c37247 in -[NSApplication run] () #26 0x94c2f2d9 in NSApplicationMain () #27 0x0000222e in main (argc=1, argv=0xbffff760) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../iOS/vm/Common/main.m:44 El 31/12/2010, a las 12:31p.m., Mariano Martinez Peck escribió: Hi Esteban. When I run a big code with Cog (replace ALL unused compiled methods but proxies), I have the same error. At least the same 3 first lines: |
In reply to this post by Mariano Martinez Peck
On 31 December 2010 16:31, Mariano Martinez Peck <[hidden email]> wrote: > > Hi Esteban. When I run a big code with Cog (replace ALL unused compiled methods but proxies), I have the same error. At least the same 3 first lines: > > (gdb) bt > #0 0x0008f18c in longAt [inlined] () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/Cross/vm/sqMemoryAccess.h:41314 > #1 0x0008f18c in longAtPointer [inlined] () at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/Cross/vm/sqMemoryAccess.h:41314 > #2 0x0008f18c in mapPointersInObjectsFromto (memStart=544259160, memEnd=547015536) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:19156 > In my case, the error is that the oop to is trying to access in longAt: is negative. > If you continue in the stack, in my case, is while doing an incremental GC. Hopefully we are talking about the same error. > probably yes, because #becomeForward: also using same routines as in GC for traversing object memory graph and rewriting old object location(s) with new ones i,.e. mapPointersInObjectsFromto(). [here i get rid of overquoting] -- Best regards, Igor Stasenko AKA sig. |
In reply to this post by EstebanLM
On 31 December 2010 15:59, Esteban Lorenzano <[hidden email]> wrote: btw note this.. > > SmallInteger 0xc01 priority > Program received signal EXC_BAD_ACCESS, Could not access memory. > Reason: KERN_PROTECTION_FAILURE at address: 0x00000c0d > printProcessStack (aProcess=3073) at /Users/MAC/Desktop/Dev/VM/cog-osx/platforms/iOS/vm/../../../src/vm/gcc3x-cointerp.c:37340 This means that somehow one of the scheduled processes are become small integer and printAllStacks fails to print its priority and causes one more protection failure :) So, i recommend: - add the safety measure in printAllStacks() to check if process is really an instance , not smallint. - find why one of the processes become integer :) -- Best regards, Igor Stasenko AKA sig. |
> - add the safety measure in printAllStacks() to check if process is > really an instance , not smallint. here is a little patch which should help with that -- Best regards, Igor Stasenko AKA sig. StackInterpreter-printProcsOnList.st (926 bytes) Download Attachment |
Esteban, could you make progress with this? is it still happening with latest available Cog ? On Fri, Dec 31, 2010 at 5:26 PM, Igor Stasenko <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |