-
Notifications
You must be signed in to change notification settings - Fork 23
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
chore(webapp): Bump axum-login dependency to 0.13.1 #2118
Conversation
sending to merge to give this a try right away. |
Hey @holzeis, sorry to drop in unannounced: I was looking at the impl of the session store here and noticed you all using a synchronous lock. Maybe I'm misunderstanding here, but is this meant to be used in production? If so, I would be concerned that a synchronous lock within a store might directly lead to e.g. deadlocks. Is there a reason to not use |
Hey, @maxcountryman! Thanks for taking the time to look at our code and offer some advice. I think you are absolutely right. At some point we spent a lot of time auditing the code base for instances of blocking code in an async context, but it seems like this has slipped code review. Thanks again! |
@maxcountryman: I've been giving it a bit more thought and I now think this code is actually fine! Maybe you can correct me if I'm wrong though. I am pretty sure the common advice is to avoid using async As far as I can tell, we are not actually holding the What do you think? Footnotes |
While you're absolutely correct you generally don't need async locks, this is an example of the use case tokio calls out for async locks:
Granted, we have a In your second link, Alice mentions:
Emphasis mine. Observe that our blocking code is inside the async methods of the session store API and so we might be leading ourselves into trouble. More specifically multiple tasks may Footnotes |
We could be causing it ourselves in |
Not being super optimistic, but maybe the latest axum-login release fixes the issue with the randomly unresponsive webapp (#1938)
It looks like axum-login had issues with deadlocks in the past, but with tower-sessions those deadlock should have been fixed. Bumping from
0.12
to0.13.1
also bumps thetower-session
dependency. So this might help 🤞.