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
Investigate GET_LOCK reporting success for a contending session with fractional timeout #28808
On main base 68860942354a7deb58158197e1e458d6094ec1bd, the existing test/distributed/cases/function/user_lock.sql contention case (lines 95–102, introduced with #28783) was exercised by an unrelated DECIMAL256 PR run (#28804, head 707ff981393087952cb26270c3c46d10dd5f6c57, CI run). Session 1 acquires user_lock_bvt_decimal_timeout_busy with timeout 0; before session 1 releases it, session 2 calls GET_LOCK(name, 0.5). The BVT report for the second connection (con[id=2]) expected 0 but received 1. It was the only failed SQL assertion among 75,733 total checks.
The run’s Coverage prerequisite check also failed after the BVT producer failed; that coverage status is not a separate product finding. The PR changes DECIMAL256 arithmetic only and does not touch the user-lock implementation or this test.
Scope and uncertainty
This is an observed main-path contract violation, but the precise production root cause and clean-main reproducibility are not yet established. Do not assume an owner/session-ID collision: distinct connections and session generations must be verified. Investigate whether the waiter takes a reentrant path, the held lock is released early, lockservice incorrectly grants the waiter, or the result/harness path differs from the intended test.
Related: #28250 (fractional timeout coercion) and #28783 (merged argument-semantics change).
Acceptance
Reproduce or disprove the mismatch on an isolated clean-main compose-pessimistic setup with two distinct JDBC connections.
Capture both connection/session identities, lock owner/generation, lock transaction IDs, whether the contender takes the reentrant branch, and any release/close before the waiter returns.
If production behavior is confirmed, fix the first incorrect ownership/acquisition boundary and retain deterministic coverage for cross-session contention, same-session re-entry, timeout, holder preservation, and explicit release. If this is test-harness behavior instead, correct the test/control and document why the production contract remains satisfied.
The failed workflow was run at PR head a34f5a09f74c6f3c232840f0b388cf0760cab75f in run 34728643673, attempt 1.
Compose job 103648315547 reached the terminal BVT result. The PR-specific view case passed (TOTAL :39, SUCCESS :39, FAILED :0). The only failed SQL was:
test/distributed/cases/function/user_lock.sql
SQL: select get_lock('user_lock_bvt_decimal_timeout_busy', 0.5);
user_lock.sql ... TOTAL :61, SUCCESS :60, FAILED :1
Tester: execution success rate is 99%, less than config 100%, test fail.
Coverage job 103652371574 stopped at Verify coverage prerequisites because the BVT producer did not publish a complete profile; it calculated no coverage verdict. CI Required job 103654011252 only aggregated the Compose/Coverage group failure.
After rebasing the PR to current up/main, the exact local head is 87127164331f218c36ddac1f273065534cb348ba. The changed-closure focused tests and incremental vet pass, and the diff does not touch the user-lock implementation, user_lock.sql, or the BVT harness. The independent-main occurrence and maintainer analysis recorded in this issue therefore cover the same normalized failure signature.
This run is added as comparison evidence before requesting one failed-jobs rerun for the unique workflow run.
Additional occurrence from PR #28799 CI (run 34731351092, job 103669533216): in standalone Compose multi-CN PESSIMISTIC BVT, session 1 held user_lock_bvt_decimal_timeout_busy while session 2 called GET_LOCK with timeout 0.5 and received 1 instead of expected 0. The full script completed in 0.364s. The same test passed in run 34700640802 (1.233s). PR #28799 changes mpool code only, so no causal link is claimed. Root cause remains unknown; session/owner identity, serving CN, lock-service ownership, and routing still need evidence.
This duplicates the observation reported as #28817. Evidence is consolidated here; keep #28808 open for root-cause investigation.
Additional confirmed occurrence from PR #28811: standalone multi-CN PESSIMISTIC BVT run 34737365766, job 103672105371, failed the same user_lock.sql statement, GET_LOCK(user_lock_bvt_decimal_timeout_busy, 0.5), while session 1 still held the lock; expected 0, actual 1. This is the exact failure signature already recorded here. Startup readiness emitted transient no-available-CN probes, then completed; the terminal failure is the SQL assertion, not CN readiness. No causal link to PR #28811 has been established. Root cause remains open.
Additional confirmed occurrence from PR #28815: standalone multi-CN PESSIMISTIC BVT run 34739772906 on head b43858b failed test/distributed/cases/function/user_lock.sql:112. The GET_LOCK call for lock user_lock_bvt_decimal_timeout_busy with timeout 0.5 returned 1 while the expected result was 0; this was the sole BVT assertion failure in the report. PR #28815 changes geodetic-coordinate validation, not lock handling. Its UT failure shows HAKeeper/logservice deadlines and connection failures, with no demonstrated causal path to that PR. This adds another occurrence but does not establish the root cause; no product fix or CI timeout adjustment is justified from this run alone.
Additional occurrence from PR #28794: standalone multi-CN PESSIMISTIC BVT run 34743593606, job 103688195480, exact head 27dccc1. test/distributed/cases/function/user_lock.sql:99 called GET_LOCK for user_lock_bvt_decimal_timeout_busy with timeout 0.5; expected 0 while the lock was held, actual 1. This is independent of the PR’s regexp changes and matches the existing failure signature. The same BVT run also had separate regexp fixture row-count/parser issues; those are being fixed in PR #28794. This repeat observation still does not identify the lock root cause.
Both fail only at user_lock.sql:112: while one session holds user_lock_bvt_decimal_timeout_busy, the contender's GET_LOCK(name, 0.5) returns 1 although the expected result is 0. The #28814 diff is DECIMAL division; the #28800 diff is IP address functions. Neither changes user-lock code or this test, matching the existing main-path evidence in this issue.
The Coverage merge jobs did not calculate an independent coverage verdict because required producer artifacts were missing. For #28800 the failed Pessimistic BVT is the relevant producer failure; #28814 also has an unrelated UT producer failure.
PR #28820 is the proposed fix for this issue; its Pessimistic BVT passed on head ae6bbd3.
Activity
iamlinjunhong commentedon Sep 13, 2026
Evidence from PR #27716
The failed workflow was run at PR head
a34f5a09f74c6f3c232840f0b388cf0760cab75fin run 34728643673, attempt 1.Compose job 103648315547 reached the terminal BVT result. The PR-specific view case passed (
TOTAL :39, SUCCESS :39, FAILED :0). The only failed SQL was:Coverage job 103652371574 stopped at
Verify coverage prerequisitesbecause the BVT producer did not publish a complete profile; it calculated no coverage verdict. CI Required job 103654011252 only aggregated the Compose/Coverage group failure.After rebasing the PR to current
up/main, the exact local head is87127164331f218c36ddac1f273065534cb348ba. The changed-closure focused tests and incremental vet pass, and the diff does not touch the user-lock implementation,user_lock.sql, or the BVT harness. The independent-main occurrence and maintainer analysis recorded in this issue therefore cover the same normalized failure signature.This run is added as comparison evidence before requesting one failed-jobs rerun for the unique workflow run.
XuPeng-SH commentedon Sep 13, 2026
Additional occurrence from PR #28799 CI (run 34731351092, job 103669533216): in standalone Compose multi-CN PESSIMISTIC BVT, session 1 held user_lock_bvt_decimal_timeout_busy while session 2 called GET_LOCK with timeout 0.5 and received 1 instead of expected 0. The full script completed in 0.364s. The same test passed in run 34700640802 (1.233s). PR #28799 changes mpool code only, so no causal link is claimed. Root cause remains unknown; session/owner identity, serving CN, lock-service ownership, and routing still need evidence.
This duplicates the observation reported as #28817. Evidence is consolidated here; keep #28808 open for root-cause investigation.
XuPeng-SH commentedon Sep 13, 2026
Additional confirmed occurrence from PR #28811: standalone multi-CN PESSIMISTIC BVT run 34737365766, job 103672105371, failed the same user_lock.sql statement, GET_LOCK(user_lock_bvt_decimal_timeout_busy, 0.5), while session 1 still held the lock; expected 0, actual 1. This is the exact failure signature already recorded here. Startup readiness emitted transient no-available-CN probes, then completed; the terminal failure is the SQL assertion, not CN readiness. No causal link to PR #28811 has been established. Root cause remains open.
XuPeng-SH commentedon Sep 13, 2026
Additional confirmed occurrence from PR #28815: standalone multi-CN PESSIMISTIC BVT run 34739772906 on head b43858b failed
test/distributed/cases/function/user_lock.sql:112. TheGET_LOCKcall for lockuser_lock_bvt_decimal_timeout_busywith timeout 0.5 returned 1 while the expected result was 0; this was the sole BVT assertion failure in the report. PR #28815 changes geodetic-coordinate validation, not lock handling. Its UT failure shows HAKeeper/logservice deadlines and connection failures, with no demonstrated causal path to that PR. This adds another occurrence but does not establish the root cause; no product fix or CI timeout adjustment is justified from this run alone.XuPeng-SH commentedon Sep 13, 2026
Additional occurrence from PR #28794: standalone multi-CN PESSIMISTIC BVT run 34743593606, job 103688195480, exact head 27dccc1.
test/distributed/cases/function/user_lock.sql:99calledGET_LOCKforuser_lock_bvt_decimal_timeout_busywith timeout 0.5; expected 0 while the lock was held, actual 1. This is independent of the PR’s regexp changes and matches the existing failure signature. The same BVT run also had separate regexp fixture row-count/parser issues; those are being fixed in PR #28794. This repeat observation still does not identify the lock root cause.XuPeng-SH commentedon Sep 13, 2026
Additional independent CI reproductions on 2026-09-13:
Both fail only at user_lock.sql:112: while one session holds user_lock_bvt_decimal_timeout_busy, the contender's GET_LOCK(name, 0.5) returns 1 although the expected result is 0. The #28814 diff is DECIMAL division; the #28800 diff is IP address functions. Neither changes user-lock code or this test, matching the existing main-path evidence in this issue.
The Coverage merge jobs did not calculate an independent coverage verdict because required producer artifacts were missing. For #28800 the failed Pessimistic BVT is the relevant producer failure; #28814 also has an unrelated UT producer failure.
PR #28820 is the proposed fix for this issue; its Pessimistic BVT passed on head ae6bbd3.
fix(lockservice): preserve GET_LOCK session liveness (#28820)
fix(lockservice): preserve GET_LOCK session liveness (matrixorigin#28820
fix(lockservice): preserve GET_LOCK session liveness (matrixorigin#28820
fix(lockservice): preserve GET_LOCK session liveness (matrixorigin#28820