mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 06:25:54 +03:00
[GH-ISSUE #176] panic: sync: WaitGroup is reused before previous Wait has returned #131
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#131
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @makefu on GitHub (Sep 25, 2019).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/176
I have a couple of thousand bookmarks i want to archive. When running
SHIORI_DIR=/var/lib/shiori shiori updateat some point in time i get the following error.shiori version: master
Git rev:
c77b17caf8go version: go-1.12.9
Thanks for your efforts, i just tried out shiori 2 days ago and i really like the capabilities. I am somewhat looking for a self-hosted full-text search through all my bookmarks and shiori is what comes closest to that.
@RadhiFadlillah commented on GitHub (Oct 4, 2019):
Hi @makefu, sorry for late response.
After looking around, it seems this issue is happened because of this line :
github.com/go-shiori/shiori@598ea9476d/pkg/warc/internal/archiver/archiver.go (L36-L41)As you can see, when archiver is started, the
WaitGroupstarted toWait1 second after the function called. That one second is done to make sure theWaitGrouphas been added before it waits.This, in hindsight, obviously really bad because sometimes the process took longer than 1 second, which in turn makes the
WaitGroupstarted toWaitbefore there are any counter added to that wait group. Thanks to this, there will be case when theWaitGroupis already closed (because it finished waiting) but another Goroutine still trying to add counter to this wait group, which will result in panic like yours.For now, I've simplified and fixed the code for archival to make sure this issue not happened anymore. For simplicity, I've also moved the
warcpackage to its own repository.Unfortunately, I'm still not really sure that it works perfectly, so I decided to put the fix for this issue on its own
warcbranch. With that said, if you don't mind, could you build thewarcbranch and test it out ? Hopefully it should be fixed by now.Thanks !
@makefu commented on GitHub (Oct 5, 2019):
Hey, thanks for the reply, i really apprechiate it. I will try out your code in the next days and give feedback :)
@makefu commented on GitHub (Oct 9, 2019):
@RadhiFadlillah just wanted to get back to you after testing your changes. All ~8000 bookmarks got processed and archived (if they are still available).
Looking forward for this change to land in master 👍
@RadhiFadlillah commented on GitHub (Oct 9, 2019):
Merged in master at a3e1563.