klee / klee

KLEE Symbolic Execution Engine

Home Page:https://klee-se.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

halt_execution doesn't force the solver to stop

TheHillBright opened this issue · comments

The function halt_execution is supposed to halt the execution asap. However, the current halt_execution function doesn't seem to force the solver to terminate. When the solver timeout is set to a very large amount and the query generated somehow takes a long time to compute, halt_execution is not working if KLEE got stuck in solver call. If watchdog is enabled, it would just result in SIGKILL which should be improved. A solution to address this for forked solver mode is to simply send signal to the forked solver pid.

The function halt_execution is supposed to halt the execution asap.

Says who? halt_execution just prevents the executor from doing another iteration of the interpreter loop.

@251 Good point. There's no comment or documentation that I can see for halt_execution, so in OP I described the expected behavior of this function. What you've described is exactly the current behavior which is not consistent with my expectation. In any case, the statement that watchdog should be improved to terminate gracefully when stuck in solver class should still be correct. With your comment, the potential solutions are:

  1. let halt_execution kill the solver
  2. implement another function that watchdog will call when halt_execution doesn't halt the execution within watchdog's timeout

@251 Do you agree and may I know if you have plan to address this?