#1092594 vlc seems to make xwayland shmem usage grow, never releasing that memory

Package:
vlc
Source:
vlc
Description:
multimedia player and streamer
Submitter:
erkko
Date:
2025-04-16 16:21:02 UTC
Severity:
normal
#1092594#5
Date:
2025-01-09 13:25:54 UTC
From:
To:
Default debian install from latest stable iso, changed to testing after
install. Added things like ssh server, just to get sshfs. And used that machine
as video-playing-machine. Vlc was already installed, i think.

In time I experienced few crashes, endresult being black screen with bunch of @
symbols on it and nonresponsive machine, no text consoles, nothing responded.

After seeing few of these in a week or so, added some swap in file on ssd.
Machine has 16 gigs of ram, added 4 gigs of swap, just in case.
Still, encountered one or more such events. Installed atop, to see what it
sees... After 3 days noticed shmem being 9 gigs or so. Some time later swap
started to be used, finally all of it was in use. Shmem usage kept climbing.
Killing vlc had no effect on it. drop_caches freed no more than 1-2 gigs of
buffers, shmem usage remained. Xwayland was another noteworthy thing - its
vsize in top was about the same as shmem usage in atop. Though I was told vsize
being mostly not much of a problem, in this case it seems to be just that.

Killed few programs, gnome terminal with 6 tabs, pcmanfm, vlc, transmission.
Shmem remains. Finally tired of these random killings, logged out from gnome
shell. Shmem usage went to 88 megs. Restarted too, just in case.

After restart started gnome terminal, transmisson, pcmanfm. Not much changes in
shmem usage, it grew somewhat but no growing-pattern emerged. Until I started
vlc and started playing some videos. Over sshfs mount via wifi, if that
matters.

Not sure at what moments Xwayland vsize and overall shmem usage grows but it
stays put, when vlc is paused (at night). And it keeps growing when vlc is
playing videos. Regular videos, yt-dlp downloaded h264 mainly, bunch of h265
movies among there.

This time machine uptime is 4 days 15 hours, shmem usage is 8.9 gigs, available
memory is 3.4 gigs, Xwayland vsize is 10.4 gigs.

Machine being Thinkpad L390 Yoga with 16 gigs of ram. debian testing, updated
to whatever is latest at the moment.

Will be keeping that machine at that state for at least few weeks, no urgent
plans to "fix it", will be using it in the future with i3 so probably no more
meeting with wayland and xwayland and that shmem issue. Main laptop runs debian
testing, 5 generatons older cpu, 16 gigs of ram, uptime 28 days, usage pattern
with vlc the same, shmem usage some 500 megs. And this one runs firefox with
1400 tabs and other things, plus vlc. But no wayland, just Xorg.

If some or all of that described is not repeatable, I shall provide what ever
else is needed. Got atop "logs" stored, if they help visualising that growth.

#1092594#10
Date:
2025-01-09 16:42:57 UTC
From:
To:
sre4ever from #debian-next suggested I add Xwayland smaps.
#1092594#15
Date:
2025-01-10 17:14:42 UTC
From:
To:
Btw, where is oomkiller while this happens? Process not exactly vital for systems survival, only needed for vlc, consuming 15 gigs out of 16 gigs of machine ram, swap is full, available ram 800 megs. Nothing to improve in oomkiller-land perhaps?
#1092594#20
Date:
2025-04-16 16:10:00 UTC
From:
To:
Could this bug be related to whats is being described above?

https://gitlab.freedesktop.org/xorg/xserver/-/issues/1687