Posted by
Johan Brichau-2 on
Jul 25, 2018; 4:46pm
URL: https://forum.world.st/Pharo7-consistent-image-freeze-deadlock-on-snapshotAndQuit-tp5082114.html
Hi,
I ran into a freeze issue when trying to save and/or quit an image after loading Seaside3 and Zinc (not an infrequent combination :)
The cause seems to be that terminating processes in a `shutDown` handler (called on image shutdown / snapshot) leads to a deadlock (somewhere).
Both Comet and Zinc will send #terminate to a process when an image is quit or saved. If I disable one of those, the deadlock does not occur.
I managed to reconstruct the issue with a simple example, attached.
The attached Freeze class creates two processes (that loop with a Delay>>wait inside) in the `startUp` method (on image start).
These processes are terminated by the shutdown method (called on image quit/save).
However, when you try to quit and/or save the image, you will experience an image freeze.
I’m not familiar with the process scheduler, or anything else in this context… so help would be appreciated while I try to dive further into it :)
To reproduce: just file in the attached file in a Pharo7 image and try to quit.
For reference, System Reporter output for my configuration.
Any ideas?
Cheers
Johan
Image
-----
/Users/jbrichau/Pharo/images/Pharo 7.0 - 64bit (development version)/Pharo 7.0 - 64bit (development version).image
Pharo7.0alpha
Build information: Pharo-7.0+alpha.build.1131.sha.a46bfaef44ba209888c92fa0e3bd3a5e04a38c5d (64 Bit)
Unnamed
Virtual Machine
---------------
/Users/jbrichau/Pharo/vms/70-x64/Pharo.app/Contents/MacOS/Pharo
CoInterpreter VMMaker.oscog-eem.2401 uuid: 29232e0e-c9e3-41d8-ae75-519db862e02c Jun 28 2018
StackToRegisterMappingCogit VMMaker.oscog-eem.2401 uuid: 29232e0e-c9e3-41d8-ae75-519db862e02c Jun 28 2018
VM: 201806281256
https://github.com/OpenSmalltalk/opensmalltalk-vm.git Date: Thu Jun 28 14:56:30 2018 CommitHash: a8a1dc1 Plugins: 201806281256
https://github.com/OpenSmalltalk/opensmalltalk-vm.gitMac OS X built on Jun 28 2018 13:07:33 UTC Compiler: 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)
VMMaker versionString VM: 201806281256
https://github.com/OpenSmalltalk/opensmalltalk-vm.git Date: Thu Jun 28 14:56:30 2018 CommitHash: a8a1dc1 Plugins: 201806281256
https://github.com/OpenSmalltalk/opensmalltalk-vm.gitCoInterpreter VMMaker.oscog-eem.2401 uuid: 29232e0e-c9e3-41d8-ae75-519db862e02c Jun 28 2018
StackToRegisterMappingCogit VMMaker.oscog-eem.2401 uuid: 29232e0e-c9e3-41d8-ae75-519db862e02c Jun 28 2018