Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 556
    • Issues 556
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 66
    • Merge requests 66
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • KeaKea
  • Issues
  • #2059
Closed
Open
Issue created Aug 27, 2021 by Razvan Becheriu@razvanDeveloper

deadlock on main thread with CS

this scenario is complicated but it occurs when a command which creates a CS is run on both http listener and main thread io service.

when the command is run on the http threads, the checkCallbacksPermissions throws, but when it is run on main thread it continues taking the CS lock. after the lock is acquired, main threads are stopped and http listener is stopped. this continues with the following code:

void
HttpThreadPool::setState(State state) {
...
        case State::PAUSED: {
        // Stop IOService.
        if (!io_service_->stopped()) {
            io_service_->poll();
            io_service_->stop();
        }
...

the issue comes from the fact that the http listener thread has commands queued which also create a CS and by calling io_service_->poll(), the CS is entered again on the main thread causing deadlock.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking