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

bug: if oldLibraryItem is null things crash #3107

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

taxilian
Copy link
Contributor

I'm not sure how it got into this state, but once in the state it keeps crashing. Might be because I have multiple instances running against the same sqlite database so two concurrent were scanning at the same time?

@nichwall
Copy link
Contributor

nichwall commented Jun 27, 2024

SQLite does not support concurrent connections, so something is probably getting corrupted.

Edit: that would probably explain the weird behavior in #3086

@taxilian
Copy link
Contributor Author

That is not actually correct -- though it's possible it is correct for the particular sqlite library being used, that I can't be certain of. I've used sqlite for years and it uses reader/writer locks to control access to the database. it's not very performant, but it absolutely works and is generally supported. (see https://sqlite.org/faq.html#q5)

The database is fine, but I suspect what happened is that two scans were happening at the same time and one updated something that the other then expected to be in the original state, thus setting off a chain reaction. Regardless any time you pull something that might be null you should probably check it, so I recommend using the fix =]

@advplyr
Copy link
Owner

advplyr commented Jun 27, 2024

Thanks!

@advplyr advplyr merged commit 5996235 into advplyr:master Jun 27, 2024
4 checks passed
@nichwall
Copy link
Contributor

Thanks for the link, I was thinking the network mounted SQLite causing problems with multiple access since there are a lot of SQLite problems reported due to people mounting it over the network. I thought that also applied to multiple processes, but must just be Windows then.

@taxilian
Copy link
Contributor Author

I'm running it over ceph-fs which might have issues like that, but I've not so far seen anything that looks like corruption and everything I'm finding tells me that it should work fine, albeit slowly =] I definitely need to find some time to see if I can get this all working with mysql or pgsql, but I figured this is a good place to start and see where issues crop up.

So far this is the first issue I've hit which seems related to concurrency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants