Skip to content

[BUG] Slow memory leak in MidiSrv process #199

Open
@Psychlist1972

Description

Applies To
Service process (could be plugins)

Describe the bug
Ran two console windows overnight as a stress test. One was constantly connecting, requesting endpoint metadata, and then disconnecting. The other simply monitoring the same device, which was also sending Active Sensing 4x a second

Over the course of 9 hours, the midisrv thread count remained unchanged, but the memory usage went from just under 4k to 18,680k. Approximately 7000k was recovered by disconnecting the listening client, dropping down to 11,020k, which then remained static and unrecovered.

Undetermined if monitoring alone is sufficient, or if it was the metadata request at fault.

Message scheduling was disabled. Translation was not in use. Only active plugin should be the metadata listener and the scheduler with disabled scheduling.
 
To Reproduce

Pwsh:

The looping pwsh portion looks like this:

while ($cnt -le 100000) {$cnt++; midi endpoint "\\?\SWD#MIDISRV#MIDIU_KS_BIDI_16024944077548273316_OUTPIN.0_INPIN.2#{e7cce071-3c03-423f-88d3-f1045d02552b}" request endpoint-metadata --all; Write-Host $cnt; Start-Sleep -Seconds 2 }

Dev Preview 3

Activity

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

Metadata

Metadata

Assignees

Labels

area-service-or-api 🖥️Related to the Windows Service, core API, abstractions, etc.bug 🐞Something isn't workingneeds-investigation 🔍Needs to be investigated before considering or solving.

Type

No type

Projects

  • Status

    No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions