Very interesting insights all along the way. Phil On Monday, January 13, 2014, Martin McClure wrote:
On 01/12/2014 10:18 PM, Hernán Morales Durand wrote:
That sounds really weird. Having to launch from GUI to start a working image is not very convenient. Let us know if you have any other findings.
Thanks. After some digging, I think I've got it.
The pharo executable is launched by the bash shell via a fork followed by an execve. The signal mask is inherited from the parent process, and preserved across the execve. Pharo does not modify the signal mask except once:
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
which only appears to deal with one real-time signal.
In my case, somehow one set of shells has SIGALRM masked, and another set of shells does not have it masked. Pharo seems to rely on SIGALRMs from the interval timer to wake it up periodically (every 2 ms) presumably to see whether it has any work to do.
So no SIGALRMS delivered, not much happens.
I have no idea why my shells are masking various signals, but it seems clear that it would be a good idea for the VM to initialize its signal mask explicitly rather than depending on the parent process to have it set sanely.
So I count this one as a VM bug. If someone better connected with the VM community would report it as such, I'd appreciate it.
Thanks for all the suggestions while I dug to the bottom of this one.
Regards,
-Martin
-- --- Philippe Back Dramatic Performance Improvements Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027 Mail:phil@highoctane.be | Web: http://philippeback.eu Blog: http://philippeback.be | Twitter: @philippeback Youtube: http://www.youtube.com/user/philippeback/videos High Octane SPRL rue cour Boisacq 101 | 1301 Bierges | Belgium Pharo Consortium Member - http://consortium.pharo.org/ Featured on the Software Process and Measurement Cast - http://spamcast.libsyn.com Sparx Systems Enterprise Architect and Ability Engineering EADocX Value Added Reseller