High cpu usage in CORE

I am getting some crazy high cpu usage and it seems to be due to something on core but no idea how I can pinpoint what it is, nothing blatantly obvious in the usual HA log in the root.
Restarting HA fixes it temporarily:


The core log is underneath but it doesn’t seem to be the full one, I see this a few times there, not sure it’s the cause of the high cpu.

File "/usr/local/lib/python3.13/site-packages/pychromecast/dial.py", line 42, in get_host_from_service
    service_info = zconf.get_service_info("_googlecast._tcp.local.", service.name)
  File "/usr/local/lib/python3.13/site-packages/zeroconf/_core.py", line 289, in get_service_info
    if info.request(self, timeout, question_type):
       ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src/zeroconf/_services/info.py", line 800, in zeroconf._services.info.ServiceInfo.request
AssertionError: Zeroconf instance loop must be running, was it already stopped?
[Master bedroom display(192.168.0.164):8009] Unhandled exception in worker thread, attempting reconnect
Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/pychromecast/socket_client.py", line 548, in run
    if self._run_once() == 1:
       ~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/pychromecast/socket_client.py", line 568, in _run_once
    if not self._check_connection():
           ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/pychromecast/socket_client.py", line 690, in _check_connection
    self.initialize_connection()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.13/site-packages/pychromecast/socket_client.py", line 310, in initialize_connection
    host, port, service_info = get_host_from_service(
                               ~~~~~~~~~~~~~~~~~~~~~^
        service, self.zconf
        ^^^^^^^^^^^^^^^^^^^
    )

Any idea how I can troubleshoot this issue, it seems to be getting worse

You may have a sim-behavibg integration.
See if you can find it with this.

Thanks I will go through that post looks very handy.
I did also notice this in my logs, wonder if related:

2025-03-20 16:36:05.135 WARNING (MainThread) [homeassistant.util.loop] Detected blocking call to open with args ('/config/custom_components/solarman/inverter_definitions/deye_hybrid.yaml',) inside the event loop by custom integration 'solarman' at custom_components/solarman/solarman.py, line 31: with open(self.path + self.lookup_file) as f: (offender: /config/custom_components/solarman/solarman.py, line 31: with open(self.path + self.lookup_file) as f:), please create a bug report at https://github.com/StephanJoubert/home_assistant_solarman/issues
For developers, please see https://developers.home-assistant.io/docs/asyncio_blocking_operations/#open
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 712, in run_until_complete
    self.run_forever()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 683, in run_forever
    self._run_once()
  File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2040, in _run_once
    handle._run()
  File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run
    self._context.run(self._callback, *self._args)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 898, in async_setup_locked
    await self.async_setup(hass, integration=integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 664, in async_setup
    await self.__async_setup_with_context(hass, integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 753, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/solarman/__init__.py", line 18, in async_setup_entry
    await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2573, in async_forward_entry_setups
    await self._async_forward_entry_setups_locked(entry, platforms)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2584, in _async_forward_entry_setups_locked
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2586, in <genexpr>
    create_eager_task(
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2665, in _async_forward_entry_setup
    await entry.async_setup(self.hass, integration=integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 664, in async_setup
    await self.__async_setup_with_context(hass, integration)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 753, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 96, in async_setup_entry
    return await hass.data[DATA_COMPONENT].async_setup_entry(entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 193, in async_setup_entry
    return await self._platforms[key].async_setup_entry(config_entry)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 349, in async_setup_entry
    return await self._async_setup_platform(async_create_setup_awaitable)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 379, in _async_setup_platform
    awaitable = create_eager_task(awaitable, loop=hass.loop)
  File "/usr/src/homeassistant/homeassistant/util/async_.py", line 45, in create_eager_task
    return Task(coro, loop=loop, name=name, eager_start=True)
  File "/config/custom_components/solarman/sensor.py", line 89, in async_setup_entry
    _do_setup_platform(hass, entry.options, async_add_entities)
  File "/config/custom_components/solarman/sensor.py", line 54, in _do_setup_platform
    inverter = Inverter(path, inverter_sn, inverter_host, inverter_port, inverter_mb_slaveid, lookup_file)
  File "/config/custom_components/solarman/solarman.py", line 31, in __init__
    with open(self.path + self.lookup_file) as f:

No it’s not. You are just using old (not adapted to recent HA) version of the mentioned integration. :wink: