gasmask icon indicating copy to clipboard operation
gasmask copied to clipboard

After Being Opened for a While, Uses too Much CPU & RAM

Open stvhanna opened this issue 7 years ago • 6 comments

Using Gasmask v0.8.5 and host file from https://github.com/StevenBlack/hosts. After Gasmask is opened in the tray icon for several minutes, it starts to consume too much CPU. I have to force quit to stop it. This issue started recently (2-3 weeks ago). I just updated macOS High Sierra (10.13.3) and the issue still exists. Any ideas what's going on? Suggestions for a fix?

screen shot 2018-02-18 at 11 43 11 pm

stvhanna avatar Feb 19 '18 01:02 stvhanna

Please provide the log file from ~/Library/Logs/Gas\ Mask.log

2ndalpha avatar Mar 17 '18 20:03 2ndalpha

@2ndalpha

[DEBUG]          - int                       - Starting Gas Mask 0.8.5
[DEBUG]          - Network                   - Starting listening for network changes
[DEBUG]          - int                       - Reopen
[DEBUG]          - HostsMainController       - Creating Hosts Controller
[DEBUG]          - Menulet                   - Initializing Status Bar with Yosemite and later options
[DEBUG]          - ApplicationController     - Init structure
[DEBUG]          - HostsMainController       - Adding groups
[DEBUG]          - LocalHostsController      - Loading local hosts
[DEBUG]          - LocalHostsController      - Loaded file: "host1.hst"
[DEBUG]          - LocalHostsController      - Loaded file: "host0.hst"
[DEBUG]          - RemoteHostsController     - Loading remote hosts
[DEBUG]          - RemoteHostsManager        - Loading remote hosts properties
[DEBUG]          - CombinedHostsController   - Loading combined hosts
[INFO]           - HostsMainController       - All hosts files are loaded

stvhanna avatar Mar 18 '18 17:03 stvhanna

@2ndalpha the resource usage issue is still happening on the latest version. Any suggestions?

stvhanna avatar Oct 14 '18 22:10 stvhanna

@2ndalpha Any ideas on how to fix this issue? I'd really appreciate your help! :)

stvhanna avatar Nov 13 '18 20:11 stvhanna

I see your measley 56,5% CPU time and raise you 99,5%!

2019-01-30_14-38-41

I can't even get it to launch by double-clicking the app. The GUI doesn't appear, my laptop's fans spin up to "prepare for take-off" speed and the CPU maxes out. Log below.

$:  tail -100 ~/Library/Logs/Gas\ Mask.log
[DEBUG]          - int                       - Starting Gas Mask 0.8.6
[DEBUG]          - Network                   - Starting listening for network changes
[DEBUG]          - HostsMainController       - Creating Hosts Controller
[DEBUG]          - Menulet                   - Initializing Status Bar with Yosemite and later options
[DEBUG]          - ApplicationController     - Init structure
[DEBUG]          - HostsMainController       - Adding groups
[DEBUG]          - LocalHostsController      - Loading local hosts
[DEBUG]          - LocalHostsController      - Loaded file: "Original File.hst"
[DEBUG]          - RemoteHostsController     - Loading remote hosts
[DEBUG]          - RemoteHostsManager        - Loading remote hosts properties
[INFO]           - RemoteHostsManager        - Starting updater
[DEBUG]          - RemoteHostsManager        - Searching updates for "raw.githubusercontent.com"
[DEBUG]          - HostsDownloader           - Downloading: https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts
[DEBUG]          - AbstractHostsManager      - Downloading started
[DEBUG]          - CombinedHostsController   - Loading combined hosts
[DEBUG]          - CombinedHosts             - Type: Local, name: Original File
[DEBUG]          - CombinedHosts             - Type: Remote, name: raw.githubusercontent.com
[DEBUG]          - CombinedHostsController   - Loaded file: "Combined Hosts File.hst"
[INFO]           - HostsMainController       - All hosts files are loaded
[DEBUG]          - ListController            - Expanding all items
[INFO]           - ListController            - Selecting active item: Combined Hosts File
[DEBUG]          - Hosts                     - Loading contents for file "Original File"
[DEBUG]          - Hosts                     - Loading contents for file "raw.githubusercontent.com"
[DEBUG]          - AbstractHostsManager      - Hosts up to date
[DEBUG]          - AbstractHostsManager      - Hosts file "raw.githubusercontent.com" is up-to-date
[DEBUG]          - RemoteHostsManager        - Starting timer for remote hosts files. Interval: 1440 minutes

BTW: for what it's worth, I'm using the PR #155 patch by @softwarebouwer –just in case the problem is related to that.

Oddly, if I open the binary directly from a terminal:

$:  /Applications/Utilities/Gas\ Mask.app/Contents/MacOS/Gas\ Mask

the GUI opens fine and CPU usage is negligible. So it looks like it's either a problem with the patch, or the .app package.

2019-01-30_14-47-33

madranet avatar Jan 30 '19 14:01 madranet

EDIT: Bloody typical!

After seeing this behaviour three times in a row, when trying to launch the GasMask app, I've just tried it again and it's opened normally, without any turbo-prop fan activity. So looks like one of those annoying intermittent issues.

madranet avatar Jan 30 '19 14:01 madranet