Bug 2517136
| Summary: | snd_seq_midi default 4096-byte output buffer causes large SysEx/Web MIDI transfers to fail | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ruslan <ruslan.panasiuk> |
| Component: | kernel | Assignee: | Justin M. Forbes <jforbes> |
| Status: | NEW --- | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 43 | CC: | acaringi, adscvr, airlied, hans, hpa, jforbes, junjie.cao, kernel-maint, linville, masami256, mchehab, nickolasjcarr, ptalbert, steved, suraj.ghimire7 |
| Target Milestone: | --- | Keywords: | Desktop |
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | --- | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | --- | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Ruslan
2026-08-15 19:57:16 UTC
Root cause: dump_midi() in sound/core/seq/seq_midi.c fails a chunk with -ENOMEM whenever it doesn't fit in the rawmidi output buffer, even on the write(2) path where the caller may sleep. Any one-shot SysEx larger than the buffer is dropped once the client gets ahead of the device by output_buffer_size bytes, so raising the module parameter only moves the limit. Patch sent upstream, waiting for the device to drain instead on the non-atomic path: https://lore.kernel.org/all/<message-id>/ Until it lands, the output_buffer_size workaround from comment 0 is the right one. If you can test a build with the patch, a Tested-by on the list thread would help. Correct link for the patch in comment 1: https://lore.kernel.org/all/20260831143200.412572-1-junjie.cao@intel.com/(In reply to junjie.cao from comment #1) > Root cause: dump_midi() in sound/core/seq/seq_midi.c fails a chunk with > -ENOMEM whenever it doesn't fit in the rawmidi output buffer, even on > the write(2) path where the caller may sleep. Any one-shot SysEx larger > than the buffer is dropped once the client gets ahead of the device by > output_buffer_size bytes, so raising the module parameter only moves > the limit. > > Patch sent upstream, waiting for the device to drain instead on the > non-atomic path: > https://lore.kernel.org/all/<message-id>/ > > Until it lands, the output_buffer_size workaround from comment 0 is the > right one. If you can test a build with the patch, a Tested-by on the > list thread would help. Correct link for the patch in comment 1: https://lore.kernel.org/all/20260831143200.412572-1-junjie.cao@intel.com/ Upstream declined the blocking approach: the seq_midi event handler runs inside the sequencer delivery path and must not sleep for long, whatever the calling context. The maintainer's position is that a real fix needs a design change in the sequencer core (parking events per destination port with back-pressure to the writer). Thread: https://lore.kernel.org/all/871pbddz5k.wl-tiwai@suse.de/ Until that lands, the output_buffer_size workaround from comment 0 stands. It only raises the limit: a transfer that gets more than output_buffer_size bytes ahead of the device is still truncated silently, because Chromium sends SysEx as 256-byte direct events and does not check the result of snd_seq_event_output_direct(). This message is a reminder that Fedora Linux 43 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 43 on 2026-12-02. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '43'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see it. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 43 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed. |