[WSLg / audio] Windows Audio service (Audiosrv) leaks ETW registrations while Linux apps play sound; kernel pools reach tens of GB
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 8/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Área
- operating-systems
Línea de trabajo
Read the full write-up in the first comment and the attachments before touching anything: the WPR pool trace summary ties 99.97% of the EtwD/Etwr allocations to the svchost hosting Audiosrv. Reproduce with the paplay loop against the RDPSink PulseAudio sink while sampling tags with the attached etwtags.ps1 or poolmon, then compare against a WSLg audio path where streams are opened and closed once. Done means those ETW registrations are released when a stream closes and pool growth stays flat under the loop.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Windows Version
Windows 11 25H2, build 26200.9711
WSL Version
WSL 3.0.5.0, kernel 6.18.58.1-1, WSLg 1.0.79
Are you using WSL 1, WSL 2, or WSLC?
- WSL 2
- WSL 1
- WSLC
Kernel Version
6.18.58.1-1
Distro Version
Ubuntu 24.04
Other Software
-
Windows 11 25H2 (10.0.26200.9711)
-
WSL 3.0.5.0, kernel 6.18.58.1-1, WSLg 1.0.79, MSRDC 1.2.7391
-
Ubuntu 24.04, PulseAudio from WSLg, default sink RDPSink
-
.wslconfig: memory=20GB, swap=8GB, networkingMode=mirrored, autoMemoryReclaim=gradual
Repro Steps
-
In a WSL2 distribution with WSLg (default PulseAudio sink "RDPSink"),
create a short silent clip and open/close audio streams in a loop:python3 -c "import wave; w=wave.open('/tmp/s.wav','wb'); w.setnchannels(2); w.setsampwidth(2); w.setframerate(48000); w.writeframes(bytes(9600)); w.close()"
while :; do paplay /tmp/s.wav; done -
On Windows, watch the kernel pool tags EtwD (paged) and Etwr (nonpaged),
e.g. with the attached etwtags.ps1 (20 s delta, no elevation needed):powershell -ExecutionPolicy Bypass -File .\etwtags.ps1 20
or with poolmon from the WDK (tags EtwD, Etwr).
-
The same happens with any Linux app that plays sound for a long time;
we first saw it with a game (Diablo IV through Wine/Proton): over a few
hours the pools grew to tens of GB and WSL stopped responding.
A pool-allocation trace (wpr -start Pool) attributes 99.97% of the EtwD/Etwr
allocations to the svchost.exe that hosts only Audiosrv (Windows Audio);
summary attached.
Expected Behavior
Opening, playing and closing audio streams from WSLg does not grow kernel
pool usage; ETW registrations made for a stream are freed when it closes.
Actual Behavior
EtwD and Etwr grow one-to-one (each pair looks like one ETW registration),
allocated by Audiosrv:
- About 2,000 registrations per audio stream opened and closed
(+25,207 in 20 s for 13 paplay runs; preliminary, measured while earlier
leaked registrations were still being freed). - While a stream is active, the slow freeing of earlier registrations stops.
- With a game playing sound: 680 to over 6,000 per second, after the first
minutes of a session. - After the Linux app exits they are freed at only ~3,000-4,400 per second.
Result on a 31 GB machine: paged pool 60 GB (EtwD 52.7 GB, 115 M
allocations), nonpaged 11 GB (Etwr 8.7 GB), commit 110.9 of 112.1 GB; WSL
stopped responding and needed wsl --shutdown. Both pools were below 1.1 GB
after a reboot.
Diagnostic Logs
Attachments: WPR pool trace summary, pool tag snapshots, measurement scripts. Full write-up in the first comment. The 12 GB ETL is available on request.
- Lenguaje dominante
- C++
- Estrellas
- 34.4k
- Forks
- 1.9k
- Merge medio
- 1 d 23 h
- PR fusionados (30 d)
- 166
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/WSL
-
feature wsl2
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
microsoft/WSL#42306 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
feature
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/WSL#42114 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
feature kernel wsl2
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
microsoft/WSL#41107 · 3 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
feature kernel
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
microsoft/WSL#41054 · 9 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
feature GPU
Dificultad 1/5 1-3 horas Aptitud para principiantes 70/100
microsoft/WSL#13592 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoft/WSL
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
HarperFast/rocksdb-js#1131 ·
Los mantenedores suelen responder en 1 día
-
area/daemon bug good first issue platform/linux priority/p2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
ToshiNamura/Deimos#5 ·
-
needs-format
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Niko1221/Strata#6251 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
[Bug]: NP 管理器文件编辑器里删除键无效Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
metasequoiaime/msime#11666 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
patrick-hudson/put.gd-desktop#1679 · 1 comentario ·
Los mantenedores suelen responder en 1 día