Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Q quickfix
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 48
    • Issues 48
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 25
    • Merge requests 25
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • quickfixgo
  • quickfix
  • Merge requests
  • !531

Multi dynamic session stop deadlock

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged shipa988 requested to merge github/fork/shipa988/multi-dynamic-session-stop-deadlock into main Dec 21, 2022
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 1

We have floating deadlocks when stop the Acceptor. Firstly deadlocks appear in acceptor.go:354. This connected with fact that session.stop() func is called not once. It can be called from 3 places in acceptor (but static, not dynamic session, could be stopped only once) : acceptor.go:354 and acceptor.go:323 and acceptor.go:129!
image That is why after first call session.stop() we write s.admin <- stopReq{} then this s.admin chan processed here in select statement session.go:772 while for !s.Stopped(). and after processing here in session.go:732 we switch s.Stopped to false and quit from select loop and have never listen s.admin more! Second call session.stop() and writing to s.admin calls deadlock(( My proposal is add sync.Once() inside call of session.stop() and write s.admin <- stopReq{} once! Of course we can think more and try to leave only one call of session.stop() such in static session, but sync.Once() is not so bad decision, IMHO)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/shipa988/multi-dynamic-session-stop-deadlock