Commit 6b56ffe
Bound Z3 memory in testTimeout
Z3 only checks its `timeout` parameter at internal checkpoints. On the
quantified array query in this test it allocates roughly 400 MB/s of native
memory before reaching one, so the check grew to ~14 GB and the test JVM was
killed by the OS (`finished with non-zero exit value 137`). The test worker
runs with -Xmx512m, so none of that is heap.
On CI this consumed the whole runner - 16 GB plus swap - and GitHub reported
it as "The operation was canceled" on whichever task Gradle had last printed,
which made it look like an infrastructure problem rather than a test.
This is not specific to the recent Z3 upgrade: measured over 8 runs at
4 CPU / 6 GB, the previous Z3 dist failed 1/8 and the current one 2/8.
Bound Z3's memory for the duration of the check so it gives up cleanly with
UNKNOWN instead of taking the process down. The limit has to be the global
parameter: a solver parameter would not survive, because every check replaces
the solver parameters with the ones carrying the timeout.
12/12 runs pass at 4 CPU / 6 GB after this change.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent ebeb932 commit 6b56ffe
1 file changed
Lines changed: 38 additions & 2 deletions
Lines changed: 38 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
85 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
88 | 124 | | |
89 | 125 | | |
0 commit comments