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

Merged
merged 6 commits into from
Oct 9, 2024
Merged

Add lockbud task to CI #6470

merged 6 commits into from
Oct 9, 2024

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
@michaelsproul
Copy link
Member

@mergify queue

Copy link

mergify bot commented Oct 9, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 352a9cf

mergify bot added a commit that referenced this pull request Oct 9, 2024
@mergify mergify bot merged commit 352a9cf into sigp:unstable Oct 9, 2024
29 checks passed
chong-he pushed a commit to chong-he/lighthouse that referenced this pull request Nov 26, 2024
* Add lockbud task to CI

* Allow unknown lint

* Merge branch 'unstable' of https://github.com/sigp/lighthouse into lockbud

* remove potential deadlock

* ignore tokio util crate

* Update image
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.

4 participants