Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pharo images can crash after sleep of OSX #2422

Closed
jecisc opened this issue Jan 30, 2019 · 13 comments
Closed

Pharo images can crash after sleep of OSX #2422

jecisc opened this issue Jan 30, 2019 · 13 comments

Comments

@jecisc
Copy link
Member

jecisc commented Jan 30, 2019

It happens to me a lot when I launch my computer that was in sleep mode that a Pharo image crashes on OSX.

This is really annoying because I lose some code and on top of that I don't know which image it was.

@jecisc jecisc changed the title Pharo images can crash at launch on OSX Pharo images can crash after sleep of OSX Feb 12, 2019
@jecisc
Copy link
Member Author

jecisc commented Feb 12, 2019

@macta
Copy link
Contributor

macta commented Feb 12, 2019

I've attached the crash.dmp file in case that helps (had to add .log suffix to upload it)

crash.dmp.log

@macta
Copy link
Contributor

macta commented Feb 12, 2019

I just got another crash exactly the same 5 hours later on the same image (unsaved from before - and download on Friday 8/feb - 64bit osx using zero conf).

I had started the image for a few hours and was looking at some code - i did get a walkback from another bug (saving a method and using the autocorrect of a class name gives an error). I then closed my laptop for lunch. An hour later it was being used but I was in mail when Pharo crashed in the background. 2 other Pharo images (earlier versions) were running fine and havne't crashed even though they've been running for days.

The console output is similar but shows 2 "cant allocate region securely" msgs (the last 2 times there were just 1).

Tim

[ :each | self visitNode: each ] in OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitMessageNode: in Block: [ :each | self visitNode: each ]
OrderedCollection>>do:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitMessageNode:
RBMessageNode>>acceptVisitor:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitNode:
OCASTSemanticAnalyzer>>visitAssignmentNode:
RBAssignmentNode>>acceptVisitor:
OCASTSemanticAnalyzer(RBProgramNodeVisitor)>>visitNode:
[ :each | self visitNode: each ] in OCASTSemanticAnalyzer>>visitSequenceNode: in Block: [ :each | self visitNode: each ]
Pharo(67603,0xa983a1c0) malloc: *** mach_vm_map(size=8388608) failed (error code=3)
*** error: can't allocate region securely
*** set a breakpoint in malloc_error_break to debug
Pharo(67603,0xa983a1c0) malloc: *** mach_vm_map(size=8388608) failed (error code=3)
*** error: can't allocate region securely
*** set a breakpoint in malloc_error_break to debug

Segmentation fault Tue Feb 12 17:31:59 2019

VM: 201901051900 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
Date: Sat Jan 5 20:00:11 2019 CommitHash: 7a3c6b6
Plugins: 201901051900 https://github.com/OpenSmalltalk/opensmalltalk-vm.git

C stack backtrace & registers:
eax 0x00000000 ebx 0xfea82000 ecx 0x00000000 edx 0xfea82000
edi 0xfea82000 esi 0xfea82000 ebp 0xbffb6c48 esp 0xbffb6c40
eip 0xa67905d7
0 libobjc.A.dylib 0xa67905d7 ZN12_GLOBAL__N_119AutoreleasePoolPageC1EPS0 + 9
1 Pharo 0x000bfcf3 reportStackState + 770
2 Pharo 0x000c00b1 sigsegv + 213
3 libsystem_platform.dylib 0xa757102b _sigtramp + 43
4 ??? 0xffffffff 0x0 + 4294967295
5 libobjc.A.dylib 0xa67933f2 ZN12_GLOBAL__N_119AutoreleasePoolPage19autoreleaseFullPageEP11objc_objectPS0 + 56
6 libobjc.A.dylib 0xa6791495 _ZN11objc_object16rootAutorelease2Ev + 79
7 libobjc.A.dylib 0xa6794c9f objc_loadWeak + 47
8 AppKit 0x914d5b54 -[NSEvent window] + 151
9 AppKit 0x91aec52a -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 457
10 AppKit 0x91aec359 -[NSApplication(NSEvent) nextEventMatchingMask:untilDate:inMode:dequeue:] + 134
11 Pharo 0x000b41f8 -[sqSqueakOSXApplication(events) pumpRunLoopEventSendAndSignal:] + 332
12 Pharo 0x000b429f -[sqSqueakOSXApplication(events) pumpRunLoop] + 67
13 Pharo 0x000be770 vmIOProcessEvents + 190
14 Pharo 0x000be7d7 ioProcessEvents + 57
15 Pharo 0x00051726 checkForEventsMayContextSwitch + 866
16 Pharo 0x00052e51 ceCheckForInterrupts + 16
17 ??? 0x036bc1cb 0x0 + 57393611
18 Pharo 0x00042189 interpret + 757
19 Pharo 0x000c118c -[sqSqueakMainApplication runSqueak] + 439
20 Foundation 0x95214299 __NSFirePerformWithOrder + 432
21 CoreFoundation 0x937994b6 CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 22
22 CoreFoundation 0x937993d2 __CFRunLoopDoObservers + 498
23 CoreFoundation 0x9377c81d __CFRunLoopRun + 1661
24 CoreFoundation 0x9377be71 CFRunLoopRunSpecific + 641
25 CoreFoundation 0x9377bbda CFRunLoopRunInMode + 122
26 HIToolbox 0x92d7937b RunCurrentEventLoopInMode + 321
27 HIToolbox 0x92d78f5f ReceiveNextEventCommon + 454
28 HIToolbox 0x92d78d7b _BlockUntilNextEventMatchingListInModeWithFilter + 71
29 AppKit 0x9137ab2d _DPSNextEvent + 2101
30 AppKit 0x91aece8c -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2859
31 AppKit 0x91aec359 -[NSApplication(NSEvent) nextEventMatchingMask:untilDate:inMode:dequeue:] + 134
32 AppKit 0x9136fa7d -[NSApplication run] + 763
33 AppKit 0x91341b3a NSApplicationMain + 1228
34 libdyld.dylib 0xa7268611 start + 1

Smalltalk stack dump:
0xbffbeee0 M ProcessorScheduler class>idleProcess 0x43d0c98: a(n) ProcessorScheduler class
0x6d05fc0 s [] in ProcessorScheduler class>startUp
0x689fd80 s [] in BlockClosure>newProcess

Most recent primitives
findNextUnwindContextUpTo:
terminateTo:
StackOverflow
StackOverflow
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
millisecondClockValue
yield
millisecondClockValue
wait
signal
signal
nowTick
+
nowTick

=
nowTick

<
primSignal:atUTCMicroseconds:
wait
wait
relinquishProcessorForMicroseconds:
relinquishProcessorForMicroseconds:
nowTick

=
signal
nowTick

primSignal:atUTCMicroseconds:
wait
millisecondClockValue
@
actualScreenSize
millisecondClockValue
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
StackOverflow
StackOverflow
StackOverflow
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
StackOverflow
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
StackOverflow
StackOverflow
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
StackOverflow
StackOverflow
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
tempAt:
tempAt:put:
tempAt:
terminateTo:
findNextUnwindContextUpTo:
terminateTo:
millisecondClockValue
yield
millisecondClockValue
wait
signal
signal
nowTick
+
nowTick

=
nowTick

<
primSignal:atUTCMicroseconds:
wait
wait
relinquishProcessorForMicroseconds:

stack page bytes 4096 available headroom 2788 minimum unused headroom 2328

(Segmentation fault)

./pharo-ui: line 11: 67603 Abort trap: 6 "$DIR"/"pharo-vm/Pharo.app/Contents/MacOS/Pharo" "$@"
Tims-MacBook-Pro:pharo5 macta$

@macta
Copy link
Contributor

macta commented Feb 14, 2019

Interestingly - that same image that was crashing, when saved to pharo.1.image doesn't seem to crash everyday like before?

This echo's a problem I had with corrupted fonts in a fresh image - saving the image seemed to fix it - so maybe the build process is doing something weird?

@stale
Copy link

stale bot commented Aug 13, 2019

To limit bug bankruptcy (see https://www.joelonsoftware.com/2012/07/09/software-inventory/) this issue has been automatically marked as stale because it has not had any activity in 6 months. It will be closed in 1 month if no further activity occurs. If this issue remains important to you, please comment to reactivate the issue. Thank you for your contributions.

Joel on Software
Imagine, for a moment, that you came upon a bread factory for the first time. At first it just looks like a jumble of incomprehensible machinery with a few people buzzing around. As your eyes adjus…

@stale stale bot added the stale label Aug 13, 2019
@macta
Copy link
Contributor

macta commented Aug 14, 2019

I haven’t noticed this recently - using later vm’s to when this was reported, however I have got in the habit of saving my image as per above , so it really needs testing again in a fresh 8 image, left unsaved for 24 hours. I’ll do that

@stale stale bot removed the stale label Aug 14, 2019
@jecisc
Copy link
Member Author

jecisc commented Aug 14, 2019

It still happens to me.

@macta
Copy link
Contributor

macta commented Aug 14, 2019

I haven't noticed it in a P8 launched from pharo launcher this morning - however i notice in my original report it was zero conf images loaded from the terminal - wonder if that makes the difference?

@Ducasse
Copy link
Member

Ducasse commented Aug 15, 2019

I got crashes from time to time and I use the launcher.

@macta
Copy link
Contributor

macta commented Aug 15, 2019

Just so we leave a clear message thread - are these crashes when you were doing something or just when the image was sitting ie unused? (In my reported cases with seg traces - the image was not being used, but not sure if that’s relevant). As mentioned, when I started saving images it seemed to help (not sure if save caused some cleanup like with corrupted fonts)

@jecisc
Copy link
Member Author

jecisc commented Aug 15, 2019

It happen as I explained in my first message.
After recovering of sleep mode my images can randomly crash.
It also happen sometimes when I disconnect/connect a screen to my laptop.

@macta
Copy link
Contributor

macta commented Aug 15, 2019

So it sounds similar to what I’ve seen before too. But I’m getting it less now, but sounds like it’s still a bug, but without an obvious repro case

@guillep
Copy link
Member

guillep commented Mar 27, 2020

I've moved the issue to pharo-project/pharo-vm#72
Let's continue the discussion there.

@guillep guillep closed this as completed Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants