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

Add lockbud task to CI #6470

Open
wants to merge 6 commits into
base: unstable
Choose a base branch
from
Open

Add lockbud task to CI #6470

wants to merge 6 commits into from

Conversation

eserilev
Copy link
Collaborator

@eserilev eserilev commented Oct 6, 2024

Issue Addressed

Closes #6413

Proposed Changes

Add lockbud to CI

Additional Info

Lockbud was pinned to 2024-05-20 Rust nightly. This conflicted with lazy_lock as it used to be an unstable feature. I've opened a PR here to pin it to the current latest Rust nightly (2024-10-05). I'm not sure if my changes have introduced any regressions, hopefully the author will review it soon and give some feedback.

BurtonQin/lockbud#70

Currently the new CI step uses a docker image hosted on my account

Steps to generate the docker image:

@eserilev eserilev added ready-for-review The code is ready for review and removed work-in-progress PR is a work-in-progress labels Oct 7, 2024
@eserilev
Copy link
Collaborator Author

eserilev commented Oct 7, 2024

We're getting a hit on a potential double lock here

[
      {
        "DoubleLock": {
          "bug_kind": "DoubleLock",
          "possibility": "Possibly",
          "diagnosis": {
            "first_lock_type": "ParkingLotRead(inner::DepositUpdater)",
            "first_lock_span": "beacon_node/eth1/src/service.rs:552:9: 553:20 (#0)",
            "second_lock_type": "ParkingLotRead(inner::DepositUpdater)",
            "second_lock_span": "beacon_node/eth1/src/service.rs:535:29: 535:51 (#0)",
            "callchains": [
              [
                [
                  "beacon_node/eth1/src/service.rs:555:40: 555:65 (#0)"
                ]
              ]
            ]
          },
          "explanation": "The first lock is not released when acquiring the second lock"
        }
      }
    ]

It seems to be a false positive as these are read locks

@jimmygchen
Copy link
Member

beacon_node/eth1/src/service.rs:555

Oh nice catch! i think this could potentially deadlock because we try to acquire a 2nd lock on self.deposits in the same thread, so if another thread tries to acquire a write lock in between, then we get a deadlock.

@jimmygchen jimmygchen added waiting-on-author The reviewer has suggested changes and awaits thier implementation. and removed ready-for-review The code is ready for review labels Oct 7, 2024
@jimmygchen jimmygchen added ready-for-review The code is ready for review and removed waiting-on-author The reviewer has suggested changes and awaits thier implementation. labels Oct 8, 2024
Copy link
Collaborator

@dapplion dapplion left a comment

Choose a reason for hiding this comment

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

Great to have lockbud on CI :)

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants