Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

100% CPU on one core when loading dashboard #1488

Open
NicolasGoeddel opened this issue Mar 30, 2024 · 5 comments
Open

100% CPU on one core when loading dashboard #1488

NicolasGoeddel opened this issue Mar 30, 2024 · 5 comments
Labels
bug TYPE: a report on something that isn't working stale ATTRIBUTE: this issue has not had recent activity

Comments

@NicolasGoeddel
Copy link

What happened:
When I open the Dashboard of Portmaster it looks like this for around 30 seconds while the process is using one full CPU core.
image
When it is finally loaded the CPU is still used at 100%:
image
It takes around a minute until the high CPU usage goes away before it starts over again. I can only stop the high CPU usage when I close the UI, but even after closing it takes a while until it really stops.

What did you expect to happen?:
A fast loading GUI without a lot of CPU usage.

How did you reproduce it?:
Just open the UI and load the Dashboard.

Debug Information:

Version 1.6.5
Portmaster
version 1.6.5

commit tags/v1.6.5-0-ge9940d77a01f32cc11d3ed70e19482bdea773fc5
built with go1.21.2 (gc) linux/amd64
  using options 
  by user@docker
  on 11.01.2024

Licensed under the AGPLv3 license.
The source code is available here: https://github.com/safing/portmaster
Platform: ubuntu 22.04
System: ubuntu linux (debian) 22.04
Kernel: 5.15.0-101-generic x86_64

No Module Error
Unexpected Logs
240330 08:29:26.757 on/nfq/nfq:212 ▶ WARN 172 nfqueue: no verdict set for packet pkt:52878 qid:17040 (192.168.178.25 -> 1.1.1.1) after 20.000118281s, dropping
240330 08:30:33.335 work/ports:049 ▶ WARN 174 network: took 13 attempts to find a suitable unused port for pre-auth
240330 08:30:38.552 on/nfq/nfq:212 ▶ WARN 176 nfqueue: no verdict set for packet pkt:53010 qid:17040 (192.168.178.25 -> 1.1.1.1) after 20.000494029s, dropping
240330 08:30:38.552 on/nfq/nfq:212 ▶ WARN 178 nfqueue: no verdict set for packet pkt:53011 qid:17040 (192.168.178.25 -> 1.1.1.1) after 20.000441508s, dropping
240330 08:30:48.336 on/nfq/nfq:212 ▶ WARN 180 nfqueue: no verdict set for packet pkt:53029 qid:17040 (192.168.178.25 -> 1.1.1.1) after 20.00052008s, dropping
240330 08:30:48.336 on/nfq/nfq:212 ▶ WARN 182 nfqueue: no verdict set for packet pkt:53028 qid:17040 (192.168.178.25 -> 1.1.1.1) after 20.000582588s, dropping
240330 08:30:59.616 on/nfq/nfq:212 ▶ WARN 184 nfqueue: no verdict set for packet pkt:53050 qid:17040 (192.168.178.25 -> 1.1.1.1) after 20.000652011s, dropping
240330 08:30:59.616 on/nfq/nfq:212 ▶ WARN 186 nfqueue: no verdict set for packet pkt:53049 qid:17040 (192.168.178.25 -> 1.1.1.1) after 20.000685185s, dropping
240330 08:32:45.210 ry_handler:210 ▶ ERRO 188 failed to encode JSON response: write tcp 127.0.0.1:817->127.0.0.1:54066: write: broken pipe
240330 08:32:45.210 ry_handler:210 ▶ ERRO 190 failed to encode JSON response: write tcp 127.0.0.1:817->127.0.0.1:54102: write: broken pipe
240330 08:33:31.708 CURRENT TIME
Status: Online
OnlineStatus:          Online
CaptivePortal:         
SPN: disabled (module disabled)
HomeHubID:    
HomeHubName:  
HomeHubIP:    
Transport:    
---
Client:       true
PublicHub:    false
HubHasIPv4:   false
HubHasIPv6:   false
Resolvers: 8/8
Cloudflare (dot://cloudflare-dns.com:853#config)
  dot://cloudflare-dns.com:853#config
  Failing: false

Cloudflare (dot://cloudflare-dns.com:853#config)
  dot://cloudflare-dns.com:853#config
  Failing: false

9.9.9.9 (dns://9.9.9.9:53#system)
  dns://9.9.9.9:53#system
  Failing: false

1.1.1.1 (dns://1.1.1.1:53#system)
  dns://1.1.1.1:53#system
  Failing: false

2620:fe::fe (dns://2620:fe::fe:53#system)
  dns://2620:fe::fe:53#system
  Failing: false

2606:4700:4700::1001 (dns://2606:4700:4700::1001:53#system)
  dns://2606:4700:4700::1001:53#system
  Failing: false

8.8.8.8 (dns://8.8.8.8:53#system)
  dns://8.8.8.8:53#system
  Failing: false

8.8.4.4 (dns://8.8.4.4:53#system)
  dns://8.8.4.4:53#system
  Failing: false
Config: 8
core/devMode: false
core/expertiseLevel: developer
dns/nameservers: [redacted]
dns/noInsecureProtocols: false
dns/useStaleCache: true
filter/blockInbound: false
filter/removeOutOfScopeDNS: false
filter/serviceEndpoints: [redacted]
Updates: stable (13/29)
Active:
all/intel/geoip/geoipv4.mmdb.gz: 20231201.0.1
all/intel/geoip/geoipv6.mmdb.gz: 20231201.0.1
all/intel/lists/base.dsdl: 20240301.0.7
all/intel/lists/index.dsd: 2023.6.13
all/intel/lists/intermediate.dsdl: 20240324.0.0
all/intel/lists/urgent.dsdl: 20240330.3.25
all/intel/portmaster/news.yaml: 20240301.12.34
all/intel/portmaster/notifications.yaml: 20231218.17.37
all/ui/modules/assets.zip: 0.3.1
all/ui/modules/portmaster.zip: 0.8.3
linux_amd64/app/portmaster-app.zip: 0.2.8
linux_amd64/core/portmaster-core: 1.6.5
linux_amd64/start/portmaster-start: 1.6.0

Selected:
all/dashboards/hubs.json: 0.0.2
all/intel/geoip/geoipv4-mini.mmdb.gz: 20231201.0.1
all/intel/geoip/geoipv4.mmdb.gz: 20231201.0.1
all/intel/geoip/geoipv4.mmdb: 20231201.0.1
all/intel/geoip/geoipv6-mini.mmdb.gz: 20231201.0.1
all/intel/geoip/geoipv6.mmdb.gz: 20231201.0.1
all/intel/geoip/geoipv6.mmdb: 20231201.0.1
all/intel/lists/base.dsdl: 20240301.0.7
all/intel/lists/index.dsd: 2023.6.13
all/intel/lists/intermediate.dsdl: 20240324.0.0
all/intel/lists/urgent.dsdl: 20240330.3.25
all/intel/portmaster/news.yaml: 20240301.12.34
all/intel/portmaster/notifications.yaml: 20231218.17.37
all/intel/spn/main-intel.yaml: 20240213.17.8
all/ui/modules/assets.zip: 0.3.1
all/ui/modules/base.zip: 0.2.11
all/ui/modules/console.zip: 0.1.11
all/ui/modules/monitor.zip: 0.2.4
all/ui/modules/portmaster.zip: 0.8.3
all/ui/modules/profilemgr.zip: 0.1.7
all/ui/modules/settings.zip: 0.1.8
linux_amd64/app/portmaster-app.zip: 0.2.8
linux_amd64/core/portmaster-core: 1.6.5
linux_amd64/hub/spn-hub: 0.7.3
linux_amd64/jess/jess: 0.3.3
linux_amd64/notifier/portmaster-notifier: 0.3.6
linux_amd64/packages/portmaster-installer.deb: 1.0.0
linux_amd64/packages/portmaster-installer.rpm: 1.0.0
linux_amd64/start/portmaster-start: 1.6.0
Compatibility: IPTables Chains (55)
v4
  filter
    INPUT
    FORWARD
    OUTPUT
    DOCKER
    DOCKER-ISOLATION-STAGE-1
    DOCKER-ISOLATION-STAGE-2
    DOCKER-USER
    LIBVIRT_FWI
    LIBVIRT_FWO
    LIBVIRT_FWX
    LIBVIRT_INP
    LIBVIRT_OUT
    PORTMASTER-FILTER
  nat
    PREROUTING
    INPUT
    OUTPUT
    POSTROUTING
    DOCKER
    LIBVIRT_PRT
    PORTMASTER-REDIRECT
  mangle
    PREROUTING
    INPUT
    FORWARD
    OUTPUT
    POSTROUTING
    LIBVIRT_PRT
    PORTMASTER-INGEST-INPUT
    PORTMASTER-INGEST-OUTPUT
  raw
    PREROUTING
    OUTPUT
v6
  filter
    INPUT
    FORWARD
    OUTPUT
    LIBVIRT_FWI
    LIBVIRT_FWO
    LIBVIRT_FWX
    LIBVIRT_INP
    LIBVIRT_OUT
    PORTMASTER-FILTER
  nat
    PREROUTING
    INPUT
    OUTPUT
    POSTROUTING
    LIBVIRT_PRT
    PORTMASTER-REDIRECT
  mangle
    PREROUTING
    INPUT
    FORWARD
    OUTPUT
    POSTROUTING
    LIBVIRT_PRT
    PORTMASTER-INGEST-INPUT
    PORTMASTER-INGEST-OUTPUT
  raw
    PREROUTING
    OUTPUT
Goroutine Stack
Removed because the issue description was too long for Github.

@NicolasGoeddel NicolasGoeddel added the bug TYPE: a report on something that isn't working label Mar 30, 2024
@NicolasGoeddel
Copy link
Author

It seems Portmaster uses 100% of one core the whole time the UI is open. I am using my computer since a while now while having the UI open in the background and the process was using the CPU the whole time.
As soon as I closed the UI it took 10-15 seconds and the usage dropped to a maximum of 1%.

@Raphty
Copy link
Member

Raphty commented Apr 2, 2024

@NicolasGoeddel thanks for the added info, we are currently working towards ditching electron, this change will come in the coming months.

@NicolasGoeddel
Copy link
Author

@NicolasGoeddel thanks for the added info, we are currently working towards ditching electron, this change will come in the coming months.

Sounds interesting. What will you use instead? Can I just use my default browser to use the UI?

@Raphty
Copy link
Member

Raphty commented Apr 2, 2024

here is a guide to open the UI in any browser
https://wiki.safing.io/en/FAQ/ElectronUI

we are working on tauri

Copy link

github-actions bot commented Jun 5, 2024

This issue has been automatically marked as inactive because it has not had activity in the past two months.

If no further activity occurs, this issue will be automatically closed in one week in order to increase our focus on active topics.

@github-actions github-actions bot added the stale ATTRIBUTE: this issue has not had recent activity label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug TYPE: a report on something that isn't working stale ATTRIBUTE: this issue has not had recent activity
Projects
None yet
Development

No branches or pull requests

2 participants