Skip to content

bug: Resource leak, causing socket.accept() out of system resource #14

Description

@developerfromjokela

Preflight

  • I searched existing issues first.
  • I am using the latest released version or current default branch.
  • I included the relevant Home Assistant and integration versions below.
  • If this is about unsupported hardware, onboarding evidence, or incomplete support, I will use the Support Archive template instead.

Home Assistant version

2026.7.2

EyeBond Local version

0.1.53

Inverter / collector model

SMG / MODBUS generic

Area

Other

Summary

Every few hours home assistant core crashes with critical error socket.accept() out of system resource.

Steps to reproduce

  1. connect inverter
  2. let it work in background
  3. crash after couple of hours

Expected behavior

not to crash

Logs, screenshots, or additional context

no log atm, will add once I catch it

Where did you hear about EyeBond Local?

None

Activity

  1. groove-max commented on Jul 14, 2026

    @groove-max
    Owner

    try to reproduce this crash with latest 0.3.0-beta1

  2. groove-max commented on Aug 24, 2026

    @groove-max
    Owner

    v0.3.0-beta.3 includes a substantial cleanup of the shared callback listener: replacement, cancellation, unload, shutdown, and failed setup paths now release their sockets and listener leases deterministically. The release also stress-tests repeated listener creation and cleanup.

    Since the original report did not include the crash log and there has not been a beta.1 follow-up, I do not want to mark this as confirmed from tests alone. Could you run beta.3 for a few days and let me know whether the socket.accept() out of system resource crash returns? If it does, please attach the Core log around the first resource warning and a fresh Support Archive.

  3. developerfromjokela commented on Aug 25, 2026

    @developerfromjokela
    Author

    v0.3.0-beta.3 includes a substantial cleanup of the shared callback listener: replacement, cancellation, unload, shutdown, and failed setup paths now release their sockets and listener leases deterministically. The release also stress-tests repeated listener creation and cleanup.

    Since the original report did not include the crash log and there has not been a beta.1 follow-up, I do not want to mark this as confirmed from tests alone. Could you run beta.3 for a few days and let me know whether the socket.accept() out of system resource crash returns? If it does, please attach the Core log around the first resource warning and a fresh Support Archive.

    WIll try, thank you!

  4. developerfromjokela commented on Aug 26, 2026

    @developerfromjokela
    Author

    After the update, my inverter doesn't connect anymore. Vevor em3500. It can't find it and doesn't connect. It was working fine on old version.

  5. groove-max commented on Aug 27, 2026

    @groove-max
    Owner

    Thanks for the update. This connection problem appears to be separate from the original socket-resource report.

    While investigating a similar beta.4 regression, I found a real problem in callback-session identification. A session carrying only a weak or shortened collector identity could be observed by Home Assistant but never safely upgraded and attached to the runtime.

    The correction is now available in the current main:
    https://github.com/groove-max/ha-eybond-local/archive/refs/heads/main.zip

    It may also explain the Vevor EM3500 regression, but I do not want to claim that without testing your device. Please install the current main, restart Home Assistant and retry the existing entry without deleting it first.

    If it still does not connect, please attach a fresh Support Archive from the failed state. That will show whether the collector session is now identified and whether the remaining problem is in inverter protocol detection.

  6. developerfromjokela commented on Sep 13, 2026

    @developerfromjokela
    Author

    Hi.

    I tried latest beta, still not finding it.
    I will try installing it again, I have reverted to 0.1.53 which works for now.

  7. developerfromjokela commented on Sep 13, 2026

    @developerfromjokela
    Author

    Do you want support package from 0.1.53, or do you want me to give one from newest beta?

  8. groove-max commented on Sep 14, 2026

    @groove-max
    Owner

    Hi! Please send the archive from the latest beta, generated just after the failed search, and mention the exact version you tested. If you can also get one from the working 0.1.53 installation, that would help me compare the two, but the failed beta run is the one I need most. No need to leave the beta installed once you've collected it — you can return to the working version.

  9. mikehardy commented on Sep 15, 2026

    @mikehardy
    Contributor

    Hey — agreeing with the caution already on this thread: beta.3+ listener cleanup is the main line for socket.accept() out of system resource, and nobody should close #14 on vibes alone.

    That said, #45 also touches listeners in commit 1 (fix: stop callback identity from leaking shared listeners): identity attempts borrow an already-owned discovery listener or fail closed with callback_listener_unavailable, instead of starting a process-wide shared listener they can't tear down. I think that might reduce one leak class; I do not have evidence it fixes the original crash.

    If you're still seeing the resource error on current main, a soak with that commit in the tree (or after #45 lands) plus a log would be the honest next check.

    Cheers,
    Mike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions