-
Notifications
You must be signed in to change notification settings - Fork 85
Validation fails on Ubuntu 20.04 #1130
Comments
Update: I can run MIRAI successfully on MacOS. I guess MIRAI itself works but some dependency cause the problem. |
MIRAI runs on Ubuntu (20.04.3 LTS) for every PR (see https://github.com/facebookexperimental/MIRAI/blob/main/.github/workflows/rust.yml). The relevant action installs Z3 via This seems to be in line with https://github.com/facebookexperimental/MIRAI/blob/main/documentation/Linux.md, If you are running on a small container, it could be an out of memory condition. Alternatively, if the core count is small and the cores run slowly, it could be a time-out problem. In general, it is good idea to do static analysis using the beefiest machine you can lay your hands on. |
Thanks for your response! I just checked the CI and it seems I'm using # start container
docker run -it ubuntu:20.04
# dependencies
apt update && apt install git libz3-dev curl gcc pkg-config libssl-dev clang -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
# MIRAI
git clone https://github.com/facebookexperimental/MIRAI.git
cd MIRAI
./setup.sh
cargo install --path ./checker
./validate.sh Error message:
I'm running on a server so I guess it's not likely because of memory, since the same error also occurs on the host machine. Please let me know if there is some unexpected steps or additional information is needed! |
I can run your test script on my MacBook, see the paste: https://pastebin.com/iJP8D7Jx My guess is that this is a resource limitation error that causes Z3 to to crash. |
Thanks for updating me. I think you encountered the same failure as me. If you'd like to explain more details about this error maybe I can also provide some help to fix this! |
I did not encounter any failures. If you can investigate some more on your side it may help resolve the issue. |
Sorry for the misunderstanding. I double checked your paste and yes I didn't find an error occurrence. I also tried it on my Mac and the error occurred again. My paste is here: https://pastebin.com/81VL7mLX I'm comparing yours and mine and trying to see if there is anything strange. BTW my MacBook is of 16G RAM. May I know what's yours? I want to try if it's because of lack of memory since I also filed on a server with huge RAM. |
Update: It seems the error is because of limited resource. I re-execute the validate script on my Mac without using a container, it prints:
|
The two tests that time out do quite a lot of work. If you are running then on a smaller, slower machine, it is not surprising that it will time out. Time-outs can also happen when Z3 diverges, which could be a versioning issue. I observed that tests that timed out in the past started working after updating Z3. |
Thank you for the explanation! |
The errors still exists on the latest commit. So I would reopen this issue. Manually install Z3 may solve this issue. |
I'm seeing tests failing on my mac book, which has 32 GB of RAM, whereas they all pass on the CI machines, which only have 20 GB. Closing apps on my local machine to free up memory reduces the failing tests, but three of them still fail. The version of Z3 that I use does not seem to matter. And since things used to work just fine on my machine (without any changes to MIRAI or Z3), I suspect that this may be due to an OS update. The CI machines still run on version 11.6.4 (my machine is 12.3). Fixing this by optimizing MIRAI will take time and effort. Meanwhile, I'll disable the tests that fail for me so that my local environment stays sane. |
Issue
Generally speaking, MIRAI cannot work well on Ubuntu 20.04. It cannot verify for some programs. So I tried to run
validate.sh
and it failed on the integration test. I was thinking it's because of my environment is not clean enough, so I also tried to use it in docker (ubuntu:latest) and it also failed.Steps to Reproduce
Start a container of
ubuntu:latest
and run necessary components likepkg-config
, z3, openssl and clangInsatll MIRAI following the steps documented in
documentation/linux.md
Run
validate.sh
Expected Behavior
exit without error
Actual Results
Environment
rustc 1.60.0-nightly (bfe156467 2022-01-22)
The text was updated successfully, but these errors were encountered: