You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a deadlock situation in sdk/python/packages/flet/src/flet/fastapi/flet_app_manager.py
The following code is locked with a non-recursive lock.
async def __evict_expired_oauth_states(self):
while True:
await asyncio.sleep(10)
with self.__states_lock:
ids = []
for id, state in self.__states.items():
if (
state.expires_at
and datetime.now(timezone.utc) > state.expires_at
):
ids.append(id)
for id in ids:
logger.info(f"Delete expired oauth state: {id}")
self.retrieve_state(id)
However, the self.retrieve_state(id) call locks the code again. As the lock is non-recursive, the code dead-locks at this point. You need to either make the lock recursive(RLock() instead of Lock()), or create an internal unprotected version of retrieve_state, which can be called under locking from the public retrieve_state.
The text was updated successfully, but these errors were encountered:
* Fix `flet --version` command for source checkout
* Fix message
* update `file_picker` to 8.0.3
* Added logo in png
* Added `--exclude` option to `flet build` command
Closeflet-dev#3125
* Flet version bumped to 0.22.1
* Fixed: OAuth expiry of token will hang fastapi server
Fixflet-dev#3150
* Update changelog
* Make `dependency_overrides` optional
Fixflet-dev#3187
* Updated changelog
zrr1999
pushed a commit
to zrr1999/flet
that referenced
this issue
Jul 17, 2024
* Fix `flet --version` command for source checkout
* Fix message
* update `file_picker` to 8.0.3
* Added logo in png
* Added `--exclude` option to `flet build` command
Closeflet-dev#3125
* Flet version bumped to 0.22.1
* Fixed: OAuth expiry of token will hang fastapi server
Fixflet-dev#3150
* Update changelog
* Make `dependency_overrides` optional
Fixflet-dev#3187
* Updated changelog
There is a deadlock situation in sdk/python/packages/flet/src/flet/fastapi/flet_app_manager.py
The following code is locked with a non-recursive lock.
However, the self.retrieve_state(id) call locks the code again. As the lock is non-recursive, the code dead-locks at this point. You need to either make the lock recursive(RLock() instead of Lock()), or create an internal unprotected version of retrieve_state, which can be called under locking from the public retrieve_state.
The text was updated successfully, but these errors were encountered: