A user provided a memory dump of a stuck instance of osu!, which could be traced back to the internals of the MIDI library we're using:

This looks to be a lock contention issue, but it's not immediately obvious why this is happening. The library itself is unmaintained so we will likely need to look at fixing ourselves (and submitting a PR with hope it is merged and deployed).
As an aside, it looks like another user has encountered this same issue and published a potential fix for it to their own fork:
Knuhl/managed-midi@f8799f1