Help in reading the crash log

Hi,

Can anyone help me to understand the reason of my home assistant crashes? Do I see this right, that the bluetooth scanning is causing the crash?

Here is the full crash file

2023-07-29 21:55:07.049 DEBUG (MainThread) [custom_components.hacs] <HacsData async_write> Saving data
2023-07-29 21:55:07.207 DEBUG (MainThread) [custom_components.hacs] <HACSStore async_save_to_store> Did not store data for 'hacs.repositories'. Content did not change
2023-07-29 21:55:07.341 INFO (Recorder) [homeassistant.components.recorder.pool.RecorderPool] Pool recreating
2023-07-29 21:55:07.344 WARNING (MainThread) [homeassistant.core] Task <Task pending name='Task-4396322' coro=<async_install() running at /usr/src/homeassistant/homeassistant/components/update/__init__.py:156> wait_for=<Future pending cb=[Task.task_wakeup()]> cb=[set.remove(), Task.task_wakeup()]> was still running after stage 2 shutdown; Integrations should cancel non-critical tasks when receiving the stop event to prevent delaying shutdown
2023-07-29 21:55:07.352 WARNING (MainThread) [homeassistant.core] Task <Task pending name='Task-861744' coro=<HaScanner._async_restart_scanner() running at /usr/src/homeassistant/homeassistant/components/bluetooth/scanner.py:348> wait_for=<Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/local/lib/python3.11/asyncio/futures.py:387, Task.task_wakeup()]> cb=[set.remove()]> was still running after stage 2 shutdown; Integrations should cancel non-critical tasks when receiving the stop event to prevent delaying shutdown
2023-07-29 21:55:12.362 WARNING (MainThread) [homeassistant.runner] Task could not be canceled and was still running after shutdown: <Task cancelling name='Task-689952' coro=<WebSocketCommonProtocol.close_connection() running at /usr/local/lib/python3.11/site-packages/websockets/legacy/protocol.py:1312> wait_for=<Future pending cb=[shield.<locals>._outer_done_callback() at /usr/local/lib/python3.11/asyncio/tasks.py:898, Task.task_wakeup()]>>
2023-07-29 21:55:12.442 WARNING (Thread-119 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_12] is still running at shutdown: File "/usr/local/lib/python3.11/threading.py", line 995, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
2023-07-29 21:55:13.437 WARNING (Thread-119 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_12] is still running at shutdown: File "/usr/local/lib/python3.11/threading.py", line 995, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
2023-07-29 21:55:15.216 ERROR (MainThread) [homeassistant] Error doing job: Exception in callback async_track_point_in_utc_time.<locals>.run_action(<Job time cha...0x7f89ea4e00>>) at /usr/src/homeassistant/homeassistant/helpers/event.py:1350
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/asyncio/events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1365, in run_action
    hass.async_run_hass_job(job, utc_point_in_time)
  File "/usr/src/homeassistant/homeassistant/core.py", line 627, in async_run_hass_job
    hassjob.target(*args)
  File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 1619, in pattern_time_change_listener
    hass.async_run_hass_job(job, dt_util.as_local(now) if local else now)
  File "/usr/src/homeassistant/homeassistant/core.py", line 630, in async_run_hass_job
    return self.async_add_hass_job(hassjob, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 533, in async_add_hass_job
    task = self.loop.run_in_executor(None, hassjob.target, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 822, in run_in_executor
    self._check_default_executor()
  File "/usr/local/lib/python3.11/asyncio/base_events.py", line 523, in _check_default_executor
    raise RuntimeError('Executor shutdown has been called')
RuntimeError: Executor shutdown has been called
2023-07-29 21:55:22.440 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_12] is still running at shutdown: File "/usr/local/lib/python3.11/threading.py", line 995, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
2023-07-29 21:55:23.433 WARNING (MainThread) [homeassistant.util.executor] Thread[SyncWorker_12] is still running at shutdown: File "/usr/local/lib/python3.11/threading.py", line 995, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 83, in _worker
    work_item.run()
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)

I also currently have this problem.
Always with a full compilation of esp-idf in esphome

2024-03-06 06:33:42.282 WARNING (MainThread) [homeassistant.core] Task <Future pending cb=[_chain_future.<locals>._call_check_cancel() at /usr/local/lib/python3.12/asyncio/futures.py:387, <1 more>, Task.task_wakeup()]> was still running after final writes shutdown stage; Integrations should cancel non-critical tasks when receiving the stop event to prevent delaying shutdown
2024-03-06 06:33:42.290 WARNING (MainThread) [homeassistant.core] Task <Task pending name='track time interval 5.0' coro=<EntityPlatform._update_entity_states() running at /usr/src/homeassistant/homeassistant/helpers/entity_platform.py:911> wait_for=<Future cancelled> cb=[set.remove()]> was still running after final writes shutdown stage; Integrations should cancel non-critical tasks when receiving the stop event to prevent delaying shutdown
2024-03-06 06:33:42.375 WARNING (Thread-250 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_14] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 89, in _worker
    work_item = work_queue.get(block=True)
2024-03-06 06:33:42.457 WARNING (Thread-250 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_48] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92, in _worker
    work_item.run()
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 273, in update
    map_name = self._handle_map_name(counter)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 320, in _handle_map_name
    map_name = self._vacuum.map()[0]
  File "/usr/local/lib/python3.12/site-packages/miio/click_common.py", line 183, in _wrap
    self._fetch_info()
  File "/usr/local/lib/python3.12/site-packages/miio/integrations/vacuum/roborock/vacuum.py", line 260, in _fetch_info
    info = super()._fetch_info()
  File "/usr/local/lib/python3.12/site-packages/miio/device.py", line 153, in _fetch_info
    devinfo = DeviceInfo(self.send("miIO.info"))
  File "/usr/local/lib/python3.12/site-packages/miio/device.py", line 107, in send
    return self._protocol.send(
  File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 161, in send
    self.send_handshake()
  File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 65, in send_handshake
    m = MiIOProtocol.discover(self.ip)
  File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 119, in discover
    data, recv_addr = s.recvfrom(1024)
2024-03-06 06:33:42.963 WARNING (Thread-250 (_do_shutdown)) [homeassistant.util.executor] Thread[SyncWorker_48] is still running at shutdown: File "/usr/local/lib/python3.12/threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 92, in _worker
    work_item.run()
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 273, in update
    map_name = self._handle_map_name(counter)
  File "/config/custom_components/xiaomi_cloud_map_extractor/camera.py", line 320, in _handle_map_name
    map_name = self._vacuum.map()[0]
  File "/usr/local/lib/python3.12/site-packages/miio/click_common.py", line 183, in _wrap
    self._fetch_info()
  File "/usr/local/lib/python3.12/site-packages/miio/integrations/vacuum/roborock/vacuum.py", line 260, in _fetch_info
    info = super()._fetch_info()
  File "/usr/local/lib/python3.12/site-packages/miio/device.py", line 153, in _fetch_info
    devinfo = DeviceInfo(self.send("miIO.info"))
  File "/usr/local/lib/python3.12/site-packages/miio/device.py", line 107, in send
    return self._protocol.send(
  File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 161, in send
    self.send_handshake()
  File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 65, in send_handshake
    m = MiIOProtocol.discover(self.ip)
  File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 119, in discover
    data, recv_addr = s.recvfrom(1024)
2024-03-06 06:33:43.177 ERROR (MainThread) [homeassistant.components.systemmonitor.coordinator] Unexpected error fetching System Monitor Boot time coordinator data: Executor shutdown has been called
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/systemmonitor/coordinator.py", line 67, in _async_update_data
    return await self.hass.async_add_executor_job(self.update_data)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 662, in async_add_executor_job
    task = self.loop.run_in_executor(None, target, *args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 853, in run_in_executor
    self._check_default_executor()
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 543, in _check_default_executor
    raise RuntimeError('Executor shutdown has been called')
RuntimeError: Executor shutdown has been called
2024-03-06 06:33:47.635 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 548, in update_info_data
    ) = await asyncio.gather(
        ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper
    data = await funct(*argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 573, in send_command
    request = await self.websession.request(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 425, in _request
    raise RuntimeError("Session is closed")
RuntimeError: Session is closed
2024-03-06 06:33:49.187 WARNING (Thread-249) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 2: Unable to discover the device 192.168.31.185
2024-03-06 06:33:50.298 ERROR (MainThread) [homeassistant.components.hassio] Unexpected error fetching hassio data: Session is closed
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 313, in _async_refresh
    self.data = await self._async_update_data()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 782, in _async_update_data
    await self.force_data_refresh(is_first_update)
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 893, in force_data_refresh
    results = await asyncio.gather(*updates.values())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 52, in _wrapper
    data = await funct(*argv, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/hassio/handler.py", line 573, in send_command
    request = await self.websession.request(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 425, in _request
    raise RuntimeError("Session is closed")
RuntimeError: Session is closed
2024-03-06 06:33:59.199 WARNING (Thread-252) [custom_components.dreame_vacuum.dreame.device] Update failed, retrying 3: Unable to discover the device 192.168.31.185
2024-03-06 06:33:59.201 ERROR (Thread-252) [root] Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.12/threading.py", line 1431, in run
    self.function(*self.args, **self.kwargs)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 700, in _update_task
    self.schedule_update(self._update_interval)
  File "/config/custom_components/dreame_vacuum/dreame/device.py", line 839, in schedule_update
    self._update_timer.start()
  File "/usr/local/lib/python3.12/threading.py", line 992, in start
    _start_new_thread(self._bootstrap, ())
RuntimeError: can't create new thread at interpreter shutdown