Skip to content

HIDHide Watchdog taking up large amounts of RAM #126

Closed

Description

@rhobiusvoid
  • I have searched open and closed issues for duplicates
  • I am submitting a bug report for existing functionality that does not work as intended
  • I have read the project documentation and not found a solution to my problem there
  • This isn't a feature request or a discussion topic

Bug description

The Watchdog service that ensures the configs are set properly between updates or system changes is taking huge proportions of RAM, upwards of 300MB.

Steps to reproduce

  • Unsure how to reproduce this, or what the actual environment for it is, but the watchdog service just seems to keep growing in RAM usage until the user notices and terminates it, letting it start over again.

Actual result: Letting it run over time will just keep growing its RAM usage, likely as a result of some memory leak.
Expected result: Should just stay reasonable.

Screenshots

Would've posted one if I hadn't terminated it. Sorry.

Machine info

CPU-Architecture: x64
Windows version: Windows 10 LTSC 21H2
Software/driver version(s): Latest one, part of security bulletin, legacinated

Any other helpful information

n/a

Activity

  1. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    Uh oh. Do you have a relative feeling how long it ran until you noticed? What was the amount, roughly?

    Oh, a few hundred megs, yeah that is not normal indeed 😅 we're leaking somewhere.

  2. self-assigned this
    on Nov 12, 2023
  3. added
    bug
    on Nov 12, 2023
  4. rhobiusvoid commented on Nov 12, 2023

    @rhobiusvoid
    Author

    I actually saw it a few days ago, where it was 500MB in RAM, but I thought nothing of it and just simply terminated it. Did a few restarts from then till here cuz of drivers for some dumb camera that didn't end up working, and I decided to peek into task manager cuz something wasn't right with another program, and that's where I saw the Watchdog service at 300MB. I only booted up my PC just an hour ago so the memleak is likely fast. I've since disabled the service, since I've completely disabled Windows Update anyways, but I've re-enabled it for now and I'm just steadily watching it.

  5. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    Yeah I can reproduce it, something isn't get cleaned up properly:

    image

    I'll look into it. Curious, the service is not awfully complex, wonder what the culprit is.

  6. rhobiusvoid commented on Nov 12, 2023

    @rhobiusvoid
    Author

    Well, good to see that it was at least reproducible, would've been a nightmare if it was my system that caused it.

  7. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    I'll check util::HasDeviceClassFilter this is the most likely culprit since we do not leak handles and this function does allocate strings.

  8. rhobiusvoid commented on Nov 12, 2023

    @rhobiusvoid
    Author

    Gotcha. On my end, it's just steadily increasing in kilobytes every few seconds, similar to your reproduction of it.
    image

  9. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    Yeah the thread runs its checks every 5 seconds.

  10. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    I'll check util::HasDeviceClassFilter this is the most likely culprit since we do not leak handles and this function does allocate strings.

    Interesting, that function is innocent, I removed it and ramped up the polling rate, still leaks:

    image

  11. rhobiusvoid commented on Nov 12, 2023

    @rhobiusvoid
    Author

    and it's leaking even faster

  12. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    and it's leaking even faster

    Because I changed 5 seconds to 50 milliseconds 😉

  13. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    Yep, CheckServiceStatus is at fault. Now to figure out why.

  14. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    Found and fixed it! Thanks for reporting! Next release will contain the fixed version.

  15. rhobiusvoid commented on Nov 12, 2023

    @rhobiusvoid
    Author

    nicely done, and good to hear!

  16. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    Looking good now:

    image

  17. nefarius commented on Nov 12, 2023

    @nefarius
    Owner

    @rhobiusvoid could you test this new build pls before I make a release, thanks: HidHide_1.4.192_x64.exe.zip

  18. rhobiusvoid commented on Nov 12, 2023

    @rhobiusvoid
    Author

    Left it running for a good half hour or so, but it only occasionally rises by like 4KB at a very slow rate. Likely just my system at this point and nothing major.
    image

    Edit: It stays at 700KB, no rise or fall. Must've just initialized.

  19. added a commit that references this issue on Jun 5, 2024
    0141e84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions