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

StackOverflow in silicon not catched and causes stuck execution #1060

Closed
sakehl opened this issue Sep 15, 2023 · 1 comment
Closed

StackOverflow in silicon not catched and causes stuck execution #1060

sakehl opened this issue Sep 15, 2023 · 1 comment
Labels
A-Bug B-Viper Backend: Silicon and Carbon

Comments

@sakehl
Copy link
Contributor

sakehl commented Sep 15, 2023

So I encountered the following. I tried to verify a large C file. (this one: conv_layer_0.txt) with vercors using silicon.

I executed it with vct conv_layer_0.c > allout3.txt 2>&1
And it gave the following output:
allout3.txt

Now after 26min I just cancelled the execution:

lars@hp:~/data/HaliVerExperiments/build$ time vct conv_layer_0.c > allout3.txt 2>&1
^C

real    26m24,994s
user    3m23,979s
sys     0m5,116s

Now I changed the stack size option of java towards '-Xss32m' (at several places, since was not sure where it was picked up). And the file verified.

lars@hp:~/data/HaliVerExperiments/build$ time vct conv_layer_0.c
[INFO] Starting verification
[WARN] Silicon has explored 1000 branch traces for entity conv_layer_0.
[INFO] Current branch information:
[INFO]  - alternative 1 of 2
[INFO]  - At conv_layer_0.c:332: _relu_s0_n < 5
[INFO]  - alternative 1 of 2
[INFO]  - At conv_layer_0.c:350: _relu_s0_y < 80
[INFO]  - alternative 1 of 2
[INFO]  - At conv_layer_0.c:367: _relu_s0_x < 100
[INFO]  - At generated: !(0 <= _0 && _0 < 128)
[INFO] Verification completed successfully.

real    2m30,242s
user    3m3,136s
sys     0m4,522s

This leads me to believe that if a StackOverflow error occurs, we do not notice this, and VerCors keeps on executing.

Note: This was on my C-branch:
https://github.com/sakehl/vercors/tree/better-c-support

@pieter-bos
Copy link
Member

Yes I've noticed this before, my best guess is that the main thread does terminate (after printing the crash trace), but somehow a non-daemon thread sticks around, which the JVM then waits for.

On a side note, quite the achievement that you managed a stack overflow with presumably -Xss20m, never seen that before...

@pieter-bos pieter-bos added A-Bug B-Viper Backend: Silicon and Carbon labels Sep 15, 2023
pieter-bos added a commit that referenced this issue Oct 20, 2023
fix #1060, actually fix #789: stop all non-daemon threads and timers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Bug B-Viper Backend: Silicon and Carbon
Projects
None yet
Development

No branches or pull requests

2 participants