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

boogie does not terminate #993

Open
rahxephon89 opened this issue Dec 19, 2024 · 10 comments
Open

boogie does not terminate #993

rahxephon89 opened this issue Dec 19, 2024 · 10 comments

Comments

@rahxephon89
Copy link

Hi, when I tried to verify the following program boogie.bpl using the command:

boogie -doModSetAnalysis -printVerifiedProceduresCount:0 -printModel:1 -enhancedErrorMessages:1 -proverOpt:O:model_validate=true -proverOpt:PROVER_PATH=~/z3 -useArrayAxioms -proverOpt:O:smt.QI.EAGER_THRESHOLD=100 -proverOpt:O:smt.QI.LAZY_THRESHOLD=100 -vcsCores:4 -proverOpt:O:trace=true -proverOpt:O:trace_file_name=z3.trace -proverLog:@[email protected] boogie.bpl

boogie got stuck without terminating. Any hints on why it happens and/or how to debug it further? Thanks!

System spec:

Arch: Arm64
OS: Mac OS 15.1.1 
boogie version: tried both 3.2.4 and latest on main
z3 version: tried both 4.11.2 and 4.13.4
@wrwg
Copy link

wrwg commented Jan 19, 2025

It appears the problem here also manifests by ever growing memory (Boogie grows over 100g in some cases). Any idea what could cause this, and a possible option to turn off/on to prevent the memory growth?

@rahxephon89
Copy link
Author

cc @shazqadeer

@shazqadeer
Copy link
Contributor

The file is large. There is no magic. If I were to debug this problem, I would start by trying to minimize the size while not losing the issue. Can you try to do a bit of this? Then I will also try to help.

How many verification problems are present in the file?

Is there any non-linear arithmetic? If not, most likely the problem is due to quantifiers.

@wrwg
Copy link

wrwg commented Jan 19, 2025

The problem is not z3 here, with quantifiers and the like, but Boogie. We are observing that boogies memory grows unbounded (100GB and growing). Wondering what could cause this? Is there an algorithm inside Boogie which does constant rewriting of the VC such that it grows without bounds? We are used to this from Z3 but not from Boogie.

We also seeing no active z3 instance running and still Boogie using compute.

@shazqadeer
Copy link
Contributor

Thanks for that clarification. Very interesting! I will take a look.

@wrwg
Copy link

wrwg commented Jan 19, 2025

Here is another boogie.bpl (1).txt which should clearly show the memory explosion, run as:

 boogie -doModSetAnalysis -printVerifiedProceduresCount:0 -printModel:1 -enhancedErrorMessages:0 -proverOpt:O:model_validate=true -proverOpt:PROVER_PATH=/Users/wrwg/bin/z3 -useArrayAxioms -proverOpt:O:smt.QI.EAGER_THRESHOLD=100 -proverOpt:O:smt.QI.LAZY_THRESHOLD=100 -vcsCores:4 boogie.bpl

@wrwg
Copy link

wrwg commented Jan 19, 2025

This thing actually verifies sometimes but othertimes finishes with SIGKILL, I guess because out of memory. It may pass on your machine, but on my Mac I can see with Activity Monitor how it goes over 100GB

@shazqadeer
Copy link
Contributor

I tried the first file @rahxephon89 supplied. Boogie has been running on my Mac for about 12 minutes now and the memory consumption of Boogie appears to be holding steady at 2GB.

I will now try the second file also.

@wrwg
Copy link

wrwg commented Jan 20, 2025

To summarize our observation:

  1. In the first example we see Boogie endlessly running with constant memory but no z3 instances. We never saw it terminating.
  2. In the second example, we see Boogie starting to grow after a couple of minutes for over 100GB and then sometimes terminate with success, sometimes via SIGKILL (I guess .Net kills it because of memory use, or perhaps MacOS).

Perhaps these two issues are separate, perhaps have some related cause?

Thank you for any help. Unfortunately it is pretty hard to reproduce which of the tons of formulas causes it and which feature interaction contributes.

@rahxephon89
Copy link
Author

@shazqadeer Here is a smaller example: boogie-bug.bpl.txt. It seems that procedure $c0de_emojicoin_dot_fun_register_market_inner$verify leads to hanging.

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

No branches or pull requests

3 participants