all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* OBS Studio memory leak
@ 2023-06-10  0:09 Robby Zambito
  0 siblings, 0 replies; 9+ messages in thread
From: Robby Zambito @ 2023-06-10  0:09 UTC (permalink / raw)
  To: help-guix

Hi Guixers,

For some reason when I use the obs package I quickly leak memory until
my system runs out completely, and I have to reboot to resolve it. I had
obs-wlrobs, but removing it made no difference. I am able to use the
most recent release through Flatpak / Flathub, but ideally I could use
the Guix package instead.

Is anyone else having this issue? Or could anyone provide insight into
how I could resolve this on my system?

Thanks,
Robby


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: OBS Studio memory leak
       [not found] <NXj2j6I--3-9@tutanota.com>
@ 2023-06-12 12:49 ` Robby Zambito
  2023-06-13  7:31   ` Guillaume Le Vaillant
  0 siblings, 1 reply; 9+ messages in thread
From: Robby Zambito @ 2023-06-12 12:49 UTC (permalink / raw)
  To: Ott Joon; +Cc: help-guix


Ott Joon <ott.joon@tutanota.com> writes:

> Hey there
>
> I have the exact same issue and I think this has to do with
> gstreamer. Some other programs are also affected by this bug. What
> seems to happen is the gst-plugin-scanner starts searching for plugins
> and just doesn't finish and leaks memory a ton. My 128GB of RAM will
> be full in seconds if I launch anything that uses gstreamer. Even
> virt-manager if you have gst-plugin-* packages installed as then the
> gst-plugin-scanner is awakened. I had to remove them or unset
> GST_PLUGIN_SYSTEM_PATH. Unfortunately OBS seems to have this feature
> built in, so it's not something you can remove. This is all I know at
> the moment.
>
> Ott

Hi Ott,

Thanks for the lead. I tried pinning gstreamer and gst-plugins-base to
older versions available in Guix, and removing gst-plugins-base from
being an input to OBS (though I'm not positive this removes it from all
recursive inputs), but I'm still having the issue :(

Here is what I have so far:

(let ((parent (specification->package "obs")))
  (package
   (inherit parent)
   (inputs (modify-inputs (package-inputs parent)
                          (replace "gstreamer"
                                   ((options->transformation '((with-version . "gstreamer=1.20.3")))
                                    (specification->package "gstreamer")))
                          (replace "gst-plugins-base"
                                   ((options->transformation '((with-version . "gst-plugins-base=1.20.3")))
                                    (specification->package "gst-plugins-base")))))))

Also tried with (remove "gst-plugins-base") instead of the replace.

Robby


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: OBS Studio memory leak
  2023-06-12 12:49 ` Robby Zambito
@ 2023-06-13  7:31   ` Guillaume Le Vaillant
  2023-06-13  8:05     ` Ott Joon via
  0 siblings, 1 reply; 9+ messages in thread
From: Guillaume Le Vaillant @ 2023-06-13  7:31 UTC (permalink / raw)
  To: Robby Zambito; +Cc: Ott Joon, help-guix

[-- Attachment #1: Type: text/plain, Size: 2321 bytes --]

Robby Zambito <contact@robbyzambito.me> skribis:

> Ott Joon <ott.joon@tutanota.com> writes:
>
>> Hey there
>>
>> I have the exact same issue and I think this has to do with
>> gstreamer. Some other programs are also affected by this bug. What
>> seems to happen is the gst-plugin-scanner starts searching for plugins
>> and just doesn't finish and leaks memory a ton. My 128GB of RAM will
>> be full in seconds if I launch anything that uses gstreamer. Even
>> virt-manager if you have gst-plugin-* packages installed as then the
>> gst-plugin-scanner is awakened. I had to remove them or unset
>> GST_PLUGIN_SYSTEM_PATH. Unfortunately OBS seems to have this feature
>> built in, so it's not something you can remove. This is all I know at
>> the moment.
>>
>> Ott
>
> Hi Ott,
>
> Thanks for the lead. I tried pinning gstreamer and gst-plugins-base to
> older versions available in Guix, and removing gst-plugins-base from
> being an input to OBS (though I'm not positive this removes it from all
> recursive inputs), but I'm still having the issue :(
>
> Here is what I have so far:
>
> (let ((parent (specification->package "obs")))
>   (package
>    (inherit parent)
>    (inputs (modify-inputs (package-inputs parent)
>                           (replace "gstreamer"
>                                    ((options->transformation '((with-version . "gstreamer=1.20.3")))
>                                     (specification->package "gstreamer")))
>                           (replace "gst-plugins-base"
>                                    ((options->transformation '((with-version . "gst-plugins-base=1.20.3")))
>                                     (specification->package "gst-plugins-base")))))))
>
> Also tried with (remove "gst-plugins-base") instead of the replace.
>
> Robby

Hi,

I don't know if its related, but I have a big memory leak issue with
vlc. When trying to play a video with it, if the video output module it
set to gl or vdpau_display, it consumes all the RAM of the machine in
a few seconds (and I have to kill it fast to prevent the machine from
hanging). However if I force the video output module to xcb_xv, it works
fine.

Do you have the same issue with vlc? If yes, it may indicate a bug
with video acceleration (VA-API/VDPAU or mesa).

PS: My machine's GPU is an AMD Radeon RX 6800 XT.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: OBS Studio memory leak
  2023-06-13  7:31   ` Guillaume Le Vaillant
@ 2023-06-13  8:05     ` Ott Joon via
  2023-06-13 12:41       ` Guillaume Le Vaillant
  2023-06-13 12:41       ` Robby Zambito
  0 siblings, 2 replies; 9+ messages in thread
From: Ott Joon via @ 2023-06-13  8:05 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: Contact, Help Guix

Hey

Tried the same thing in VLC and it freezes on GPU accel and starts leaking memory while also becoming hard to kill.
Maybe this also explains why some mpv GPU accel settings don't work also in the exact same way.
I have an AMD RX 6900 XT on this machine.

I could probably try this on the laptop with Intel and the unmentionable video devices.

PS: Might need to switch to a traditional email service or get my own up and running. Tutanota is just no good for this mailing list stuff.
Ott



13. juuni 2023 10:50 poolt glv@posteo.net:

> Robby Zambito <contact@robbyzambito.me> skribis:
>
>> Ott Joon <ott.joon@tutanota.com> writes:
>>
>>> Hey there
>>>
>>> I have the exact same issue and I think this has to do with
>>> gstreamer. Some other programs are also affected by this bug. What
>>> seems to happen is the gst-plugin-scanner starts searching for plugins
>>> and just doesn't finish and leaks memory a ton. My 128GB of RAM will
>>> be full in seconds if I launch anything that uses gstreamer. Even
>>> virt-manager if you have gst-plugin-* packages installed as then the
>>> gst-plugin-scanner is awakened. I had to remove them or unset
>>> GST_PLUGIN_SYSTEM_PATH. Unfortunately OBS seems to have this feature
>>> built in, so it's not something you can remove. This is all I know at
>>> the moment.
>>>
>>> Ott
>>>
>>
>> Hi Ott,
>>
>> Thanks for the lead. I tried pinning gstreamer and gst-plugins-base to
>> older versions available in Guix, and removing gst-plugins-base from
>> being an input to OBS (though I'm not positive this removes it from all
>> recursive inputs), but I'm still having the issue :(
>>
>> Here is what I have so far:
>>
>> (let ((parent (specification->package "obs")))
>> (package
>> (inherit parent)
>> (inputs (modify-inputs (package-inputs parent)
>> (replace "gstreamer"
>> ((options->transformation '((with-version . "gstreamer=1.20.3")))
>> (specification->package "gstreamer")))
>> (replace "gst-plugins-base"
>> ((options->transformation '((with-version . "gst-plugins-base=1.20.3")))
>> (specification->package "gst-plugins-base")))))))
>>
>> Also tried with (remove "gst-plugins-base") instead of the replace.
>>
>> Robby
>>
>
> Hi,
>
> I don't know if its related, but I have a big memory leak issue with
> vlc. When trying to play a video with it, if the video output module it
> set to gl or vdpau_display, it consumes all the RAM of the machine in
> a few seconds (and I have to kill it fast to prevent the machine from
> hanging). However if I force the video output module to xcb_xv, it works
> fine.
>
> Do you have the same issue with vlc? If yes, it may indicate a bug
> with video acceleration (VA-API/VDPAU or mesa).
>
> PS: My machine's GPU is an AMD Radeon RX 6800 XT.
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: OBS Studio memory leak
  2023-06-13  8:05     ` Ott Joon via
@ 2023-06-13 12:41       ` Guillaume Le Vaillant
  2023-06-13 13:04         ` Robby Zambito
  2023-06-13 12:41       ` Robby Zambito
  1 sibling, 1 reply; 9+ messages in thread
From: Guillaume Le Vaillant @ 2023-06-13 12:41 UTC (permalink / raw)
  To: Ott Joon; +Cc: Contact, Help Guix

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

Ott Joon <ott.joon@tutanota.com> skribis:

> Hey
>
> Tried the same thing in VLC and it freezes on GPU accel and starts leaking memory while also becoming hard to kill.
> Maybe this also explains why some mpv GPU accel settings don't work also in the exact same way.
> I have an AMD RX 6900 XT on this machine.
>
> I could probably try this on the laptop with Intel and the unmentionable video devices.
>
> PS: Might need to switch to a traditional email service or get my own up and running. Tutanota is just no good for this mailing list stuff.
> Ott

It looks like an issue with the shader cache of mesa.
After clearing it, I don't see the memory leak anymore.

Could you try doing a "rm -r $HOME/.cache/mesa_shader_cache/*" and see
if it also solves the issue for you?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 247 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: OBS Studio memory leak
  2023-06-13  8:05     ` Ott Joon via
  2023-06-13 12:41       ` Guillaume Le Vaillant
@ 2023-06-13 12:41       ` Robby Zambito
  1 sibling, 0 replies; 9+ messages in thread
From: Robby Zambito @ 2023-06-13 12:41 UTC (permalink / raw)
  To: Ott Joon; +Cc: Guillaume Le Vaillant, Help Guix


Hey,

>>
>> Hi,
>>
>> I don't know if its related, but I have a big memory leak issue with
>> vlc. When trying to play a video with it, if the video output module it
>> set to gl or vdpau_display, it consumes all the RAM of the machine in
>> a few seconds (and I have to kill it fast to prevent the machine from
>> hanging). However if I force the video output module to xcb_xv, it works
>> fine.
>>
>> Do you have the same issue with vlc? If yes, it may indicate a bug
>> with video acceleration (VA-API/VDPAU or mesa).
>>
>> PS: My machine's GPU is an AMD Radeon RX 6800 XT.
>>
> Hey
>
> Tried the same thing in VLC and it freezes on GPU accel and starts leaking memory while also becoming hard to kill.
> Maybe this also explains why some mpv GPU accel settings don't work also in the exact same way.
> I have an AMD RX 6900 XT on this machine.
>
> I could probably try this on the laptop with Intel and the unmentionable video devices.

I think we may be on to something here. I have an AMD RX 6650 XT, and
VLC does also start to leak for me.

Guillaume, when you say you forced the video output module to gl,
vdpau_display, or xcb_xv, how did you set that?

Robby


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: OBS Studio memory leak
  2023-06-13 12:41       ` Guillaume Le Vaillant
@ 2023-06-13 13:04         ` Robby Zambito
  2023-06-13 14:03           ` Ott Joon via
  2023-07-22  4:58           ` Dr. Arne Babenhauserheide
  0 siblings, 2 replies; 9+ messages in thread
From: Robby Zambito @ 2023-06-13 13:04 UTC (permalink / raw)
  To: Guillaume Le Vaillant; +Cc: Ott Joon, Help Guix


Guillaume Le Vaillant <glv@posteo.net> writes:

> It looks like an issue with the shader cache of mesa.
> After clearing it, I don't see the memory leak anymore.
>
> Could you try doing a "rm -r $HOME/.cache/mesa_shader_cache/*" and see
> if it also solves the issue for you?

This worked for me! Thank you!


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: OBS Studio memory leak
  2023-06-13 13:04         ` Robby Zambito
@ 2023-06-13 14:03           ` Ott Joon via
  2023-07-22  4:58           ` Dr. Arne Babenhauserheide
  1 sibling, 0 replies; 9+ messages in thread
From: Ott Joon via @ 2023-06-13 14:03 UTC (permalink / raw)
  To: Robby Zambito; +Cc: Guillaume Le Vaillant, Help Guix

Awesome! Worked for me, too! 
Also fixed the issue with the gst-plugin-helper memory leak. 
So it must have all been to do something with the mesa shader cache. 
VLC seems to struggle playing an HEVC encoded 2K video however while mpv does it just fine. 
virt-manager is running smoothly again.


13. juuni 2023 16:04 poolt contact@robbyzambito.me:

>
> Guillaume Le Vaillant <glv@posteo.net> writes:
>
>> It looks like an issue with the shader cache of mesa.
>> After clearing it, I don't see the memory leak anymore.
>>
>> Could you try doing a "rm -r $HOME/.cache/mesa_shader_cache/*" and see
>> if it also solves the issue for you?
>>
>
> This worked for me! Thank you!
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: OBS Studio memory leak
  2023-06-13 13:04         ` Robby Zambito
  2023-06-13 14:03           ` Ott Joon via
@ 2023-07-22  4:58           ` Dr. Arne Babenhauserheide
  1 sibling, 0 replies; 9+ messages in thread
From: Dr. Arne Babenhauserheide @ 2023-07-22  4:58 UTC (permalink / raw)
  To: Robby Zambito; +Cc: Guillaume Le Vaillant, Ott Joon, help-guix

[-- Attachment #1: Type: text/plain, Size: 530 bytes --]


Robby Zambito <contact@robbyzambito.me> writes:

> Guillaume Le Vaillant <glv@posteo.net> writes:
>
>> It looks like an issue with the shader cache of mesa.
>> After clearing it, I don't see the memory leak anymore.
>>
>> Could you try doing a "rm -r $HOME/.cache/mesa_shader_cache/*" and see
>> if it also solves the issue for you?
>
> This worked for me! Thank you!

With this, obs runs again for me! Thank you!

Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-22  5:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-10  0:09 OBS Studio memory leak Robby Zambito
     [not found] <NXj2j6I--3-9@tutanota.com>
2023-06-12 12:49 ` Robby Zambito
2023-06-13  7:31   ` Guillaume Le Vaillant
2023-06-13  8:05     ` Ott Joon via
2023-06-13 12:41       ` Guillaume Le Vaillant
2023-06-13 13:04         ` Robby Zambito
2023-06-13 14:03           ` Ott Joon via
2023-07-22  4:58           ` Dr. Arne Babenhauserheide
2023-06-13 12:41       ` Robby Zambito

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.