Oracle syncer potential deadlock problems
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 291
- Forks
- 131
- Avg merge
- 5m
- Merged PRs (30d)
- 2
Description
Bug Report
-
syncer.go line 279 calls OracleCheckPoint's
Savemethod, then executes_, err = sp.db.Exec(sql)and keeps blocking on a call to cgo. This function gets a write lock on OracleCheckPoint. It blocks the syncer's Run main process. -
server.go line 437 calls Syncer's
updateStatusmethod, and then it also calls OracleCheckPoint's TS function, which wants to get OracleCheckPoint's read lock, but can't get the lock because of the above stuck problem, so it leads to deadlock.
Because the lock is not released, the server will not be able to call updateStatus, so it seems to be stuck and not advancing.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing syncer.go line 279 through OracleCheckPoint.Save and the following sp.db.Exec(sql) call, then inspect server.go line 437 and Syncer.updateStatus. Reproduce or instrument the blocking path to confirm how the OracleCheckPoint lock interacts with the cgo call and TS read, and consider the issue done when the syncer and server can progress without deadlocking.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100