cadr
2018-10-28 19:14:29

@samth does abort-current-continuation care about continuation barriers? Our main issue about the infinite aborts seems to be about abort-current-continuation being unable to reach at the Prompt behind Barriers and keep raising couldn't find the prompt exception which is handled by Pycket and handed to the default handler which also runs abort-current-continuation so on and on..


samth
2018-10-28 19:16:43
[samth@huor:~ plt] r ~/tmp/x.rkt
[samth@huor:~ plt] pycket-c ~/tmp/x.rkt
ERROR:
uncaught exception:
 (exn:fail abort-current-continuation: no such prompt exists #<continuation-mark-set>)
  while executing: (call-with-values (lambda () (call-with-continuation-barrier (lambda () (let ([AppRand0 (default-continuation-prompt-tag)]) (abort-current-continuation AppRand0 (lambda () 5)))))) print-values)
  in module: x
RPython traceback:
  File "pycket_entry_point.c", line 47, in entry_point
  File "pycket_entry_point.c", line 1272, in old_pycket_actual_entry
  File "pycket_interpreter.c", line 81, in interpret_module
  File "pycket_interpreter.c", line 1172, in Module__interpret_mod
  File "pycket_interpreter.c", line 22491, in interpret_one
  File "rpython_jit_metainterp.c", line 2635, in ll_portal_runner__pycket_AST_ASTPtr_pycket_AST_A
  File "pycket_interpreter.c", line 65523, in portal_1
  File "pycket_prims.c", line 14812, in raise_exception
Fatal RPython error: SchemeException
Aborted (core dumped)
[samth@huor:~ plt] cat ~/tmp/x.rkt
#lang racket/base

(call-with-continuation-barrier
 (lambda ()
   (abort-current-continuation (default-continuation-prompt-tag) (lambda () 5))))

cadr
2018-10-28 19:16:44

There seems to be a couple of things to do about the Barriers, for example the docs say : “Certain operations install barriers automatically; in particular, when an exception handler is called, a continuation barrier prohibits the continuation of the handler from capturing the continuation past the exception point.”, which we currently don’t do.. Though this is unrelated to our current problem


samth
2018-10-28 19:16:57

I think that barrier is done for us


samth
2018-10-28 19:17:22

but for exception handlers there’s more we need to do; see the link mflatt posted in #linklet