You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spurious failure with rust toolchain-2022-12-11 #2051
T-CBMCIssue related to an existing CBMC issue[C] BugThis is a bug. Something isn't working.[F] Spurious FailureIssues that cause Kani verification to fail despite the code being correct.
cd s2n-quic/quic/s2n-quic-core in the cloned branch in step 1
Run cargo kani --harness kani_round_trip
This will fail with:
SUMMARY:
** 1 of 514 failed (7 unreachable)
Failed Checks: assertion failed: x == y
File: "/home/ubuntu/git/iss2051/s2n-quic/quic/s2n-quic-core/src/packet/number/mod.rs", line 289, in packet::number::dpn
With the previous nightly rust toolchain (nightly-2022-11-23), verification succeeds:
SUMMARY:
** 0 of 514 failed (7 unreachable)
VERIFICATION:- SUCCESSFUL
Also, if I replace kani::any() in the harness with the value from the concrete playback test (or the one from visualize with is 16) and rerun Kani, verification succeeds, so the failure is definitely bogus.
Also, if I replace kani::any() in the harness with the value from the concrete playback test (or the one from visualize with is 16) and rerun Kani, verification succeeds
I think the important part here is "rerun Kani". I initially misread this because it was next to concrete playback stuff, but I just validated this.
The failing trace says x = 0, but replacing x = kani::any() with x = 0 causes the proof to succeed. I'm not sure that's possible without a CBMC bug?
goto-instrument --validate-goto-model is pointing out a possible issue:
$ goto-instrument --validate-goto-model s2n_quic_core-8f24532ce3fa20f6.symtab.out
Reading GOTO program from 's2n_quic_core-8f24532ce3fa20f6.symtab.out'
memcmp type inconsistency
goto program type: code
symbol table type: code (at: file /home/ubuntu/.rustup/toolchains/nightly-2022-11-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/slice/cmp.rs line 91 column 13 function <[u8] as core::slice::cmp::SlicePartialEq<u8>>::equal)
T-CBMCIssue related to an existing CBMC issue[C] BugThis is a bug. Something isn't working.[F] Spurious FailureIssues that cause Kani verification to fail despite the code being correct.
Activity
zhassan-aws commentedon Dec 29, 2022
This branch contains a minimized example that reproduces the spurious failure: https://github.com/zhassan-aws/s2n-quic/tree/kani-iss2051
The breaking change was introduced in the
nightly-2022-11-24toolchain. Here are the steps to reproduce (these were done using c135fa9):git clone -b kani-iss2051 https://github.com/zhassan-aws/s2n-quics2n-quic/quic/s2n-quic-corein the cloned branch in step 1cargo kani --harness kani_round_tripThis will fail with:
With the previous nightly rust toolchain (
nightly-2022-11-23), verification succeeds:zhassan-aws commentedon Dec 29, 2022
The concrete playback test passes:
Also, if I replace
kani::any()in the harness with the value from the concrete playback test (or the one from visualize with is 16) and rerun Kani, verification succeeds, so the failure is definitely bogus.tedinski commentedon Dec 29, 2022
I looked at the rust commit log between those two nightly versions with
git log ff8c8dfbe..70f8737b2and saw this one that might be a cause:We might be seeing different type layouts before and after, and this might be exposing a buggy assumption in the kani-compiler.
tedinski commentedon Dec 29, 2022
I think the important part here is "rerun Kani". I initially misread this because it was next to concrete playback stuff, but I just validated this.
The failing trace says
x = 0, but replacingx = kani::any()withx = 0causes the proof to succeed. I'm not sure that's possible without a CBMC bug?zhassan-aws commentedon Dec 30, 2022
I'm also suspecting a CBMC bug, in particular due to those lines in the
--visualizereport:More specifically, the$1suffix indynamic_objectis something I haven't seen before, and I'm not sure what it means.The full report is attached.
report-packet-number-kani_round_trip.tar.gz
zhassan-aws commentedon Dec 30, 2022
Looks like there's nothing wrong with the
$<num>suffix. It seems to just be a counter for dynamic objects. It appears on programs such as this one:zhassan-aws commentedon Dec 30, 2022
goto-instrument --validate-goto-modelis pointing out a possible issue:This is the line of code it's pointing out:
https://github.com/rust-lang/rust/blob/70f8737b2f5d3bf7d6b784fad00b663b7ff9feda/library/core/src/slice/cmp.rs#L91
zhassan-aws commentedon Dec 30, 2022
FWIW, the issue pointed out by
--validate-goto-modelalso occurs with the older toolchain.zhassan-aws commentedon Dec 30, 2022
Interestingly, the spurious failure does not occur with CBMC 5.70.0 (even with the newer toolchain):
but it occurs with CBMC 5.71.0 and 5.72.0.
zhassan-aws commentedon Dec 30, 2022
@tautschnig need your help on this one.
zhassan-aws commentedon Jan 3, 2023
Tracked by diffblue/cbmc#7462
tautschnig commentedon Jan 11, 2023
diffblue/cbmc#7462 is now resolved and will be part of 5.75.0 (due 2023-01-19).