Store v1: Fix two flusher hangs with deletions #114
Open
koolkhel
wants to merge 3 commits from
koolkhel/vitastor:v1-lost-flush into master
pull from: koolkhel/vitastor:v1-lost-flush
merge into: vitalif:master
vitalif:master
vitalif:fatal-error-hook
vitalif:primary-stickiness
vitalif:libvfn
vitalif:canceling
vitalif:immediate-repeering
vitalif:rdma-close-tcp
vitalif:use-degraded-writes
vitalif:fix-write-delete-flow
vitalif:openssl-3.0.12
vitalif:openssl-capture-secrets
vitalif:ignore-small-rdma-end
vitalif:encrypt-batch
vitalif:faster-peering-calc
vitalif:http-hello
vitalif:xxh3-bench
vitalif:create-user-etcd-based
vitalif:aesxts_streaming_nosupport
vitalif:refactor-heap-continue-write
vitalif:ston3lu-patch-0127
vitalif:rdma-credits
vitalif:heap-meta
vitalif:sendmsg-zc-no-more-error
vitalif:fix-clear-refs
vitalif:veeam-trick
vitalif:test-etcd-schizo
vitalif:test
vitalif:test1
vitalif:test2
vitalif:cow-meta
vitalif:kv-readahead
vitalif:qemu-fix-crash-idea
vitalif:eventloop-auto-init-trigger
vitalif:hugo-docs
vitalif:node-mutex-and-postpone
vitalif:check-writeback
vitalif:msgr-iothreads-v2
vitalif:antietcd
vitalif:rel-1.4
vitalif:test-fix-ec-unknown-state-51
vitalif:kv-update
vitalif:kv-debug
vitalif:hotfix-1.2.0
vitalif:rdma-simple-nodp
vitalif:zerocopy-tcp-send
vitalif:csi-staging
vitalif:hotfix-1.1.0
vitalif:hotfix-1.0.0
vitalif:fsync-feedback
vitalif:cached-reads
vitalif:qemu-send-loop
vitalif:test-double-alloc
vitalif:hier-failure-domains
vitalif:mon-self-restart
vitalif:epoch-deletions
vitalif:rdma-flow-control
vitalif:csi-use-vitastor-cli
vitalif:rdma-v2
vitalif:etcd-hide-base64
vitalif:lrc-matrix
vitalif:rm-left-on-dead
vitalif:nfs-proxy-old
vitalif:non-odp-rdma
vitalif:test-zctr
vitalif:separate-data-connections
vitalif:sec_osd_msgr
vitalif:test-assert
vitalif:nbd-vmsplice
vitalif:allow-etcd-address-option
vitalif:rdma-zerocopy
vitalif:rel-0.5
vitalif:openonload
vitalif:sync-io-test
vitalif:trace-sync
vitalif:trace-sqes
vitalif:test-submit-and-wait
vitalif:test-sq-poll
vitalif:blocking-uring-test
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "koolkhel/vitastor:v1-lost-flush"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
This is v2 of the patches sent to you on 2026-10-21. Following your review, the flush check of patch 1 runs only with the new
--hardenedoption of test_blockstore_chaos, because it scans all of dirty_db; patch 2's subject names the option. Patches 2 and 3 are unchanged otherwise.Under sustained load, an OSD on store v1 can stop accepting writes for good: its journal fills up, every write fails with EAGAIN, and the client retries forever, so all I/O touching that OSD hangs until the OSD restarts. We hit it with an NFS server that reuses inode numbers, so the data objects of deleted files are deleted and rewritten from version 1 all the time. The gateway stalled after 4-8 minutes of S3 load. gdb on the stuck OSD showed the full journal pinned by one stable BIG_WRITE entry at used_start, which was not in the flush queue.
1. Check that stable versions get flushed in test_blockstore_chaos --hardened
--hardenedoption, the test checks after every drain that the newest stable version of every object is being flushed, or queued under a version that is still in dirty_db and not older than it.--p-delete 30finds lost flushes on master:--seed 285 --config 21,--seed 112 --config 21,--seed 118 --config 21,--seed 439 --config 18and19, all with--hardened --steps 30000 --p-delete 30.2. Store v1: Do not lose the flush of a write over a deletion
3. Store v1: Wake up the flusher when journal sectors are written
--seed 5 --config 12 --steps 30000 --p-delete 30deadlocks on master.3cf04530("Fix exotic hang on an unflushable deletion") does not cure either case: all the seeds above fail on master, which includes it.Testing (Ubuntu 24.04, RelWithDebInfo; first on
a83a0aed, then rebased onto3e803e07without changes):--hardened, pass without it, and pass with the whole series either way.--hardenedchanges nothing measurable in the test itself: 48 seeds with default weights take 37.85 s without it and 37.87 s with it, because the check runs only at clean restarts and at the end.3e803e07:test_blockstore_v1passes, the seeds pass, and so does a default 200-seed run oftest_blockstore_chaos --hardened.make build_tests test, as in.gitea/workflows/test.yml: 15 of 15 tests pass, includingtest_blockstore_chaos(default run, 200 seeds) andtest_pg_chaos.--steps 30000 --p-delete 30, 18,000 runs) found no lost flush and no deadlock.Not included: with
--p-delete 30the chaos test also fails on master in other ways that this series doesn't change. A deleted object comes back after a clean restart (--seed 1064 --config 12). There is "BUG: Unexpected dirty_entry ... unstable state during flush" with fsync=1 (--seed 60 --config 21). "big_write journal_entry was allocated over another object" (--seed 144 --config 15). And unexpected content after a power outage (--seed 841 --config 20). A follow-up series fixes them. It builds on this one, so it will come as a separate PR once this one is merged.Contributor Name
Yury Luneff (MIND Software LLC, https://mindsw.io)
CLA
Мне тут не нравится вот этот фикс
Сфигали в очередь flush добавляется write одновременно с уже находящимся там delete, если write произошёл ПОВЕРХ этого самого delete, и должен его дождаться? Вот это выглядит как баг и выглядит что именно это править надо, а не просто накрывать проверкой if is_gone.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.