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

Avoid a spurious assert in tests #21543

Merged
merged 1 commit into from
Mar 19, 2025
Merged

Avoid a spurious assert in tests #21543

merged 1 commit into from
Mar 19, 2025

Conversation

mystenmark
Copy link
Contributor

This avoids the following crash:

thread '<unnamed>' panicked at crates/sui-core/src/execution_cache/cache_types.rs:307:17:
entry is newer than value 0x86aacc42979583a6797f4bb0cab20d436a1f41e215b2c87cb6e99ffdda5ec7db
stack backtrace:
   0: rust_begin_unwind
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/std/src/panicking.rs:692:5
   1: core::panicking::panic_fmt
             at /rustc/4d91de4e48198da2e33413efdcd9cd2cc0c46688/library/core/src/panicking.rs:75:14
   2: sui_core::execution_cache::cache_types::MonotonicCache<K,V>::insert
             at /Users/marklogan/dev/sui-wb/crates/sui-core/src/execution_cache/cache_types.rs:307:17
   3: sui_core::execution_cache::writeback_cache::WritebackCache::cache_latest_object_by_id
             at /Users/marklogan/dev/sui-wb/crates/sui-core/src/execution_cache/writeback_cache.rs:1210:12
   4: sui_core::execution_cache::writeback_cache::WritebackCache::cache_object_not_found
             at /Users/marklogan/dev/sui-wb/crates/sui-core/src/execution_cache/writeback_cache.rs:1224:9
   5: <sui_core::execution_cache::writeback_cache::WritebackCache as sui_core::execution_cache::ObjectCacheRead>::find_object_lt_or_eq_version::{{closure}}
   ...

The fix is to not overwrite an existing latest cache entry in this scenario, since it must already be in the correct state at the point at which the crash was triggered before.

@mystenmark mystenmark requested review from akichidis and aschran March 19, 2025 19:54
@mystenmark mystenmark temporarily deployed to sui-typescript-aws-kms-test-env March 19, 2025 19:55 — with GitHub Actions Inactive
Copy link

vercel bot commented Mar 19, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 19, 2025 7:56pm
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2025 7:56pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Mar 19, 2025 7:56pm

Copy link
Contributor

@akichidis akichidis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving but I would suggest to wait for @aschran to have a look as well

@mystenmark mystenmark merged commit 2ff990e into main Mar 19, 2025
47 checks passed
@mystenmark mystenmark deleted the mlogan-fix-cache-check-1 branch March 19, 2025 20:56
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

Successfully merging this pull request may close these issues.

2 participants