Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check that the timeout is correctly implemented for all the supported smt solvers #2412

Open
ggrieco-tob opened this issue Mar 26, 2021 · 4 comments
Labels

Comments

@ggrieco-tob
Copy link
Contributor

The timeout option is very important to make sure the solver don't take forever. It's unclear if they work as expected.

@ggrieco-tob
Copy link
Contributor Author

#2418 fixed the timeouts for the recently added solvers, however manticore still does not enforce timeouts if the it is blocked waiting for a solver result. That should be fixed in #2420 when solver uses a non-blocking call to read their results.

@ggrieco-tob
Copy link
Contributor Author

The --smt.timeout seems to have no effect at all, the value used is always 120 seconds. I think @ekilmer was taking a look to that..

@ekilmer
Copy link
Contributor

ekilmer commented Apr 8, 2021

I tried testing this and it seems to propagate correctly:

    1 root       20   0 20356  3856  3344 S  0.0  0.0  0:00.25 /bin/bash
 9760 root       20   0  670M  380M 20164 S  0.7  0.9  1:16.37 └─ /usr/bin/python3 /usr/local/bin/manticore --smt.timeout 567 -v --core.procs 1 /bin/ls ++++
 9788 root       20   0  119M 19320 11876 S  0.0  0.0  0:00.80    ├─ z3 -t 567000 -memory 8192 -smt2 -in
 9789 root       20   0  119M 19320 11876 S  0.0  0.0  0:00.00    │  └─ z3 -t 567000 -memory 8192 -smt2 -in

Do you have an example where you see differently?

@ggrieco-tob
Copy link
Contributor Author

The --smt.timeout seems to have no effect at all, the value used is always 120 seconds. I think @ekilmer was taking a look to that..

This is wrong in fact, only happens on one of my PRs (this should be fixed soon). However, it looks like global timeout is not enforced if the worker is busy waiting for a result here:

def __readline_and_count(self):
assert self._proc
assert self._proc.stdout
buf = self._proc.stdout.readline() # No timeout enforced here

This should be fixed in #2420 using a non-blocking read.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants