[Vm-dev] [VM-dev] Problem when waiting on delay during ensure block

Denis Kudriashov dionisiydk at gmail.com
Wed Jul 26 09:15:16 UTC 2017


Hi.

I found interesting problem. Following script will never return:

s := Semaphore new.
p1 := [
    [ 100 seconds asDelay wait ] ensure: [ s waitTimeoutMSecs: 50 ]
     ] fork.
100 milliSeconds asDelay wait.
p1 terminate.

If you will interrupt it by cmd+. It will show debugger. If you will close
it new debugger will be opened on Unwind error. And in Squeak any attempt
to close it will open same debugger again and again.

I thing it is important bug. It shows that we are able to write quite
simple code which will be impossible to terminate. For example #ensure:
part could include business logic to send some remote notifications which
will use delays. And during debug it will be easy to get this scenario.

In Pharo it is more worth because unwind error leads to infinite recursion
for opening debuggers and image crash after minutes.

Best regards,
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20170726/b636a6c7/attachment.html>


More information about the Vm-dev mailing list