flatpak / xdg-desktop-portal-gtk

Gtk implementation of xdg-desktop-portal
GNU Lesser General Public License v2.1
129 stars 101 forks source link

High memory usage #420

Open fgervais opened 1 year ago

fgervais commented 1 year ago

I'm not sure what is happening but on my system, xdg-desktop-portal-gtk is using about 10% of 64GB of memory and it keeps growing.

image

I don't have much flatpak things on my system. In terms of applications I only have FreeCAD and KiCad.

I think xdg-desktop-portal-gtk got installed when I installed FreeCAD.

Is there a way I can at least restart this service and hopefully reset the amount of memory it's using?

fgervais@fgervais-System-Product-Name:~$ flatpak list
Name                                         Application ID                                           Version                  Branch                 Installation
FreeCAD                                      org.freecadweb.FreeCAD                                   0.20.2.29603             stable                 system
Mesa                                         org.freedesktop.Platform.GL.default                      22.3.5                   22.08                  system
Mesa (Extra)                                 org.freedesktop.Platform.GL.default                      22.3.5                   22.08-extra            system
nvidia-525-78-01                             org.freedesktop.Platform.GL.nvidia-525-78-01                                      1.4                    system
openh264                                     org.freedesktop.Platform.openh264                        2.1.0                    2.2.0                  system
Freedesktop SDK                              org.freedesktop.Sdk                                      22.08.9                  22.08                  system
Yaru-dark Gtk Theme                          org.gtk.Gtk3theme.Yaru-dark                                                       3.22                   system
KDE Application Platform                     org.kde.Platform                                                                  5.15-22.08             system
KiCad                                        org.kicad.KiCad                                          7.0.1                    stable                 system
KiCad Footprint Libraries                    org.kicad.KiCad.Library.Footprints                       7.0.1                    stable                 system
KiCad 3D Model Libraries                     org.kicad.KiCad.Library.Packages3D                       7.0.1                    stable                 system
KiCad Schematic Symbol Libraries             org.kicad.KiCad.Library.Symbols                          7.0.1                    stable                 system
KiCad Templates                              org.kicad.KiCad.Library.Templates                        7.0.1                    stable                 system
fgervais commented 1 year ago

So through strace it seems like it's constrantly checking up the printer and maybe it's a leaky process?

sendto(31, "\2\0@\2\0\0\0\1\1G\0\22attributes-charset\0\5utf-8H\0\33attributes-natural-language\0\5en-caB\0\24requesting-user-name\0\10fgervaisD\0\24requested-attributes\0\fprinter-nameD\0\0\0\25printer-uri-supportedD\0\0\0\vmember-urisD\0\0\0\20printer-locationD\0\0\0\fprinter-infoD\0\0\0\25printer-state-messageD\0\0\0\25printer-state-reasonsD\0\0\0\rprinter-stateD\0\0\0\20queued-job-countD\0\0\0\31printer-is-accepting-jobsD\0\0\0\24job-sheets-supportedD\0\0\0\22job-sheets-defaultD\0\0\0\fprinter-typeD\0\0\0\22auth-info-requiredD\0\0\0\21number-up-defaultD\0\0\0\26ipp-versions-supportedD\0\0\0$multiple-document-handling-supportedD\0\0\0\20copies-supportedD\0\0\0\23number-up-supportedD\0\0\0\ndevice-uriD\0\0\0\24printer-is-temporary\3", 609, 0, NULL, 0) = 609
poll([{fd=31, events=POLLIN}], 1, 0)    = 0 (Timeout)
sendto(32, "\2\0@\2\0\0\0\1\1G\0\22attributes-charset\0\5utf-8H\0\33attributes-natural-language\0\5en-caB\0\24requesting-user-name\0\10fgervaisD\0\24requested-attributes\0\fprinter-nameD\0\0\0\25printer-uri-supportedD\0\0\0\vmember-urisD\0\0\0\20printer-locationD\0\0\0\fprinter-infoD\0\0\0\25printer-state-messageD\0\0\0\25printer-state-reasonsD\0\0\0\rprinter-stateD\0\0\0\20queued-job-countD\0\0\0\31printer-is-accepting-jobsD\0\0\0\24job-sheets-supportedD\0\0\0\22job-sheets-defaultD\0\0\0\fprinter-typeD\0\0\0\22auth-info-requiredD\0\0\0\21number-up-defaultD\0\0\0\26ipp-versions-supportedD\0\0\0$multiple-document-handling-supportedD\0\0\0\20copies-supportedD\0\0\0\23number-up-supportedD\0\0\0\ndevice-uriD\0\0\0\24printer-is-temporary\3", 609, 0, NULL, 0) = 609
poll([{fd=32, events=POLLIN}], 1, 0)    = 0 (Timeout)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
poll([{fd=0, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN}, {fd=31, events=POLLIN|POLLPRI}, {fd=32, events=POLLIN|POLLPRI}], 7, 189) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\6\0\0\0\0\0\0\0", 16)         = 8
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=0, events=POLLIN|POLLPRI}, {fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN}, {fd=31, events=POLLIN|POLLPRI}, {fd=32, events=POLLIN|POLLPRI}], 7, 186) = 1 ([{fd=0, revents=POLLIN}])
poll([{fd=0, events=POLLIN}], 1, 0)     = 1 ([{fd=0, revents=POLLIN}])
poll([{fd=0, events=POLLIN}], 1, 10000) = 1 ([{fd=0, revents=POLLIN}])
poll([{fd=0, events=POLLIN}], 1, 10000) = 1 ([{fd=0, revents=POLLIN}])
recvfrom(0, "HTTP/1.1 200 OK\r\nConnection: Keep-Alive\r\nContent-Language: en_CA\r\nContent-Length: 943\r\nContent-Type: application/ipp\r\nDate: Mon, 20 Mar 2023 12:06:17 GMT\r\nKeep-Alive: timeout=10\r\nAccept-Encoding: gzip, deflate, identity\r\nServer: CUPS/2.4 IPP/2.1\r\nX-Frame-Options: DENY\r\nContent-Security-Policy: frame-ancestors 'none'\r\n\r\n\2\0\0\0\0\0\0\1\1G\0\22attributes-charset\0\5utf-8H\0\33attributes-natural-language\0\5en-ca\4\"\0\31printer-is-accepting-jobs\0\1\1\"\0\24printer-is-temporary\0\1\0#\0\rprinter-state\0\4\0\0\0\3A\0\25printer-state-message\0\0D\0\25printer-state-reasons\0\4none#\0\fprinter-type\0\4\0\2\20DE\0\25printer-uri-supported\0*ipp://localhost/printers/Brother-MFC-7360N!\0\20queued-job-count\0\4\0\0\0\0B\0\fprinter-name\0\21Brother-MFC-7360NA\0\20printer-location\0\0A\0\fprinter-info\0\21Brother MFC-7360NB\0\22job-sheets-default\0\4noneB\0\0\0\4noneE\0\ndevice-uri\0007dnssd://Brother%20MFC-7360N._pdl-datastream._tcp.local/!\0\21number-up-default\0\4\0\0\0\0013\0\20copies-supported\0\10\0\0\0\1\0\0'\17D\0\26ipp-versions-supported\0\0031.0D\0\0\0\0031.1D\0\0\0\0032.0D\0\0\0\0032.1B\0\24job-sheets-supported\0\4noneB\0\0\0\nclassifiedB\0\0\0\fconfidentialB\0\0\0\4formB\0\0\0\6secretB\0\0\0\10standardB\0\0\0\ttopsecretB\0\0\0\funclassifiedD\0$multiple-document-handling-supported\0$separate-documents-uncollated-copiesD\0\0\0\"separate-documents-collated-copies!\0\23number-up-supported\0\4\0\0\0\1!\0\0\0\4\0\0\0\2!\0\0\0\4\0\0\0\4!\0\0\0\4\0\0\0\6!\0\0\0\4\0\0\0\t!\0\0\0\4\0\0\0\20\3", 2048, 0, NULL, NULL) = 1264
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
close(0)                                = 0
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN}, {fd=31, events=POLLIN|POLLPRI}, {fd=32, events=POLLIN|POLLPRI}], 6, 183) = 3 ([{fd=4, revents=POLLIN}, {fd=31, revents=POLLIN}, {fd=32, revents=POLLIN}])
read(4, "\1\0\0\0\0\0\0\0", 16)         = 8
poll([{fd=31, events=POLLIN}], 1, 0)    = 1 ([{fd=31, revents=POLLIN}])
poll([{fd=31, events=POLLIN}], 1, 10000) = 1 ([{fd=31, revents=POLLIN}])
poll([{fd=31, events=POLLIN}], 1, 10000) = 1 ([{fd=31, revents=POLLIN}])
recvfrom(31, "HTTP/1.1 200 OK\r\nConnection: Keep-Alive\r\nContent-Language: en_CA\r\nContent-Length: 943\r\nContent-Type: application/ipp\r\nDate: Mon, 20 Mar 2023 12:06:17 GMT\r\nKeep-Alive: timeout=10\r\nAccept-Encoding: gzip, deflate, identity\r\nServer: CUPS/2.4 IPP/2.1\r\nX-Frame-Options: DENY\r\nContent-Security-Policy: frame-ancestors 'none'\r\n\r\n\2\0\0\0\0\0\0\1\1G\0\22attributes-charset\0\5utf-8H\0\33attributes-natural-language\0\5en-ca\4\"\0\31printer-is-accepting-jobs\0\1\1\"\0\24printer-is-temporary\0\1\0#\0\rprinter-state\0\4\0\0\0\3A\0\25printer-state-message\0\0D\0\25printer-state-reasons\0\4none#\0\fprinter-type\0\4\0\2\20DE\0\25printer-uri-supported\0*ipp://localhost/printers/Brother-MFC-7360N!\0\20queued-job-count\0\4\0\0\0\0B\0\fprinter-name\0\21Brother-MFC-7360NA\0\20printer-location\0\0A\0\fprinter-info\0\21Brother MFC-7360NB\0\22job-sheets-default\0\4noneB\0\0\0\4noneE\0\ndevice-uri\0007dnssd://Brother%20MFC-7360N._pdl-datastream._tcp.local/!\0\21number-up-default\0\4\0\0\0\0013\0\20copies-supported\0\10\0\0\0\1\0\0'\17D\0\26ipp-versions-supported\0\0031.0D\0\0\0\0031.1D\0\0\0\0032.0D\0\0\0\0032.1B\0\24job-sheets-supported\0\4noneB\0\0\0\nclassifiedB\0\0\0\fconfidentialB\0\0\0\4formB\0\0\0\6secretB\0\0\0\10standardB\0\0\0\ttopsecretB\0\0\0\funclassifiedD\0$multiple-document-handling-supported\0$separate-documents-uncollated-copiesD\0\0\0\"separate-documents-collated-copies!\0\23number-up-supported\0\4\0\0\0\1!\0\0\0\4\0\0\0\2!\0\0\0\4\0\0\0\4!\0\0\0\4\0\0\0\6!\0\0\0\4\0\0\0\t!\0\0\0\4\0\0\0\20\3", 2048, 0, NULL, NULL) = 1264
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
poll([{fd=32, events=POLLIN}], 1, 0)    = 1 ([{fd=32, revents=POLLIN}])
poll([{fd=32, events=POLLIN}], 1, 10000) = 1 ([{fd=32, revents=POLLIN}])
poll([{fd=32, events=POLLIN}], 1, 10000) = 1 ([{fd=32, revents=POLLIN}])
recvfrom(32, "HTTP/1.1 200 OK\r\nConnection: Keep-Alive\r\nContent-Language: en_CA\r\nContent-Length: 943\r\nContent-Type: application/ipp\r\nDate: Mon, 20 Mar 2023 12:06:17 GMT\r\nKeep-Alive: timeout=10\r\nAccept-Encoding: gzip, deflate, identity\r\nServer: CUPS/2.4 IPP/2.1\r\nX-Frame-Options: DENY\r\nContent-Security-Policy: frame-ancestors 'none'\r\n\r\n\2\0\0\0\0\0\0\1\1G\0\22attributes-charset\0\5utf-8H\0\33attributes-natural-language\0\5en-ca\4\"\0\31printer-is-accepting-jobs\0\1\1\"\0\24printer-is-temporary\0\1\0#\0\rprinter-state\0\4\0\0\0\3A\0\25printer-state-message\0\0D\0\25printer-state-reasons\0\4none#\0\fprinter-type\0\4\0\2\20DE\0\25printer-uri-supported\0*ipp://localhost/printers/Brother-MFC-7360N!\0\20queued-job-count\0\4\0\0\0\0B\0\fprinter-name\0\21Brother-MFC-7360NA\0\20printer-location\0\0A\0\fprinter-info\0\21Brother MFC-7360NB\0\22job-sheets-default\0\4noneB\0\0\0\4noneE\0\ndevice-uri\0007dnssd://Brother%20MFC-7360N._pdl-datastream._tcp.local/!\0\21number-up-default\0\4\0\0\0\0013\0\20copies-supported\0\10\0\0\0\1\0\0'\17D\0\26ipp-versions-supported\0\0031.0D\0\0\0\0031.1D\0\0\0\0032.0D\0\0\0\0032.1B\0\24job-sheets-supported\0\4noneB\0\0\0\nclassifiedB\0\0\0\fconfidentialB\0\0\0\4formB\0\0\0\6secretB\0\0\0\10standardB\0\0\0\ttopsecretB\0\0\0\funclassifiedD\0$multiple-document-handling-supported\0$separate-documents-uncollated-copiesD\0\0\0\"separate-documents-collated-copies!\0\23number-up-supported\0\4\0\0\0\1!\0\0\0\4\0\0\0\2!\0\0\0\4\0\0\0\4!\0\0\0\4\0\0\0\6!\0\0\0\4\0\0\0\t!\0\0\0\4\0\0\0\20\3", 2048, 0, NULL, NULL) = 1264
write(4, "\1\0\0\0\0\0\0\0", 8)         = 8
close(31)                               = 0
close(32)                               = 0
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN}], 4, 181) = 1 ([{fd=4, revents=POLLIN}])
read(4, "\2\0\0\0\0\0\0\0", 16)         = 8
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0)          = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(13, {msg_namelen=0}, 0)         = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=9, events=POLLIN}, {fd=13, events=POLLIN}], 4, 181