Skip to content

Fix deadlock occuring on store merges

vbot requested to merge nomadic-labs/tezos:vbot@prevent-deadlock into master

Context

This MR prevents a race-condition leading to a deadlock occurring when cemented blocks were requested when a store merge initiates.

Manually testing the MR

This is not easily reproducible as it involves a tricky concurrent trace to occur. You can apply this patch that adds a sleep to the store merge and a test then invoke dune exec src/lib_store/unix/test/main.exe -- --file test_store.ml --title "tezos-store: store (my_test)" to manually reproduce the issue and test the fix:

echo H4sIAAAAAAAAA+1Wa2/bNhTNZ/2KOwMD7DhSJFl+di3SdQu2IcUGJN+KQqCoq1ibTBokHSdFkN++S8nyo3OXbkMxFOBBYlnk5X2eIzkMw8g3qE2wZIbPT74EQsJolNhrNB6G+1eLZBQlJ1GSDEaDeDyKyS4aDIbJCYRfJJuPsNKGKYCTu1JwFOaTds/tf6W4VHIBEcuymNGQ2Gg0iSKOWTicIhuOp3kxTeJkEk2KPM5ieCsFXOMSojGE4az+g5im6Vk3M7jLpIHvNp0K6CaT1YWQC5aX3K9YpgMuF6+8H5jBGVyq8gxi+GUlyEU8gCicDaPZIIJ+SC6961X2O3Izg3e/vb5589N7sCT1PN/3PdCKn1dllmojFZ6vRHl/nlWS/9EsBIsKLB6B3Pf7R82ts/pjd+QR4gmZfwoUNoairFADnzNxizllP4VSaFSmlEJ3+70ziCDHCu191+95Xl4WBfj+bWmAnT+fdfa8jVeKHO9hOEyKaTGcDsZBQGPLCoac2R6GoySxTfqceB6V9VkxLy7AjwbD8dkI+vV1ArREdcIC1S02hhr2TsFTV4oUlZIKZmA+GMU4gv8KyL2hezJfVQau1iYwPQ92eBK4TufI8nSBhuXMsHa3FO23/cBMGXgJN+UCg+sHbXARCLmGbs+a9xvz7ilcV0isZZDZ4BJuyzsEQ2fsDWdVBWaOsFQyq3DBTMmhWAlupwinvdYNRT39xnp+adNObZ8CXfuNg8PkTmurXVXWvMwrTNesNKiCQiqO9QocNLopic8xX1WooEtJWE/+q/0G1fW8lbYAylmtKXTzTcJmDEzkwBWSyKhiaieYxdLW8RwZj2jiKDn+archZTRKBjmfRgWRshhwHGcsCifPkvKIv08S84itJec4nFhu2ssgbLlZmzUNlgW1m55JZVGiSvWKc9Q61ewOl7IUxiq6FBvmGkYsaMe3t9Es1LseeP2ahA+pDdI0no70G27KJYp66A3LU/0gDLvfMNIa7Id7CddNJXZpf6P53B1SyOl/SXNNacgFHWxJ2jD0EUIrMIVmpYSlp2nXhaVQv6VPTdDUHj+UCRx47y4V5iBq9m9zoHNnUMl101VywZZUap7yB04te9JzuaryVKOpFTwzaoUHte45qhXSP4i61euO99vULqUiYQZLRdMqoPOtvgg6kKZXv75JU3hxpLh/lVnbhm0Ht+KfHvQBzH+p/fhDJAyGB422Sm658b1td9CwqRS3KZfC4D1FYnp+EGQ3m/1wth9ms3JAD2+rE90QfisboxBTzjTqVglXJf1GXLBlo7fhsNbbeLp7Fey5afEPFNh70R587zUPe5+Y0KnL6pw1npp8Lj7OsB5SF1rbZmQ31mZlykoHa8WWjU67nY1iyaMlWWoFs1najHo2g+7fBgN6XTV9207RSjdQlrSvKy7rAxW92OzKU5pe/nz1I5G0Y/CD1H6TJLyru/W+R09F8OJgkASR5/3fvwUdHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBy+bvwJKzj26AAoAAA= | base64 -d | tar xz

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by vbot

Merge request reports