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

Python hits 100% CPU #147

Closed
wangki opened this issue Feb 27, 2017 · 3 comments
Closed

Python hits 100% CPU #147

wangki opened this issue Feb 27, 2017 · 3 comments
Assignees

Comments

@wangki
Copy link

wangki commented Feb 27, 2017

image

Not know why, but, I guess the python script in wunderlist workflow hits 100% CPU If you need detailed info, please let me know how I can obtain them.

Environment

Recurring, I don't know when, but it suddenly happens, mostly In 5 hours after I opened up computer. I usually put computer to sleep.

Here below is the one I could get from Activity Monitor.

cwd /Users/dennis/WK/ETC/Alfred.alfredpreferences/workflows/user.workflow.69A7C13B-26BC-41D4-81FA-83AD7E200C4F txt /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python txt /System/Library/Frameworks/Python.framework/Versions/2.7/Python txt /usr/lib/dyld txt /private/var/db/dyld/dyld_shared_cache_x86_64h 0 /dev/null 1 /dev/null 2 /dev/null 3 /Users/dennis/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.ipaterson.alfred.wunderlist/com.ipaterson.alfred.wunderlist.log 5 /Users/dennis/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/com.ipaterson.alfred.wunderlist/com.ipaterson.alfred.wunderlist.log

I believe that It will be okay If I delete cache by resetting all. I saved sample data from activity monitor.

@idpaterson
Copy link
Owner

How long will it continue running at 100% CPU? The screenshot shows 4 minutes, which is longer than even the initial sync should take so something is misbehaving.

The best way to debug this is to enable verbose logging.

  1. In Alfred, find Wunderlist in the Workflows pane
  2. Right-click Wunderlist and select Open in Finder
  3. Open the logging_config.ini file in a text editor
  4. Change the logger_wunderlist section to match the following:
[logger_wunderlist]
level=INFO
handlers=stream_handler,file_handler
qualname=wunderlist
propagate=0
  1. Save the logging_config.ini file
  2. Use the workflow as you normally do
  3. When you notice Python stuck at 100%, wait a few minutes then attach the workflow.log file (located in the same directory as the logging_config.ini file) to this issue or email it to me at alfred-wunderlist-workflow-147@forward.cat

@idpaterson
Copy link
Owner

idpaterson commented Mar 31, 2017

I would like to confirm that this problem is real and may affect anyone using the Alfred Wunderlist workflow or other workflows based on the Alfred-Workflow python library. It seems like an OS-level bug affecting macOS Sierra. Please stay tuned to deanishe/alfred-workflow#111 for progress on a resolution and to this topic for demo builds of the Wunderlist workflow once an acceptable workaround is found.

@idpaterson
Copy link
Owner

Please update your workflow to version 0.6.5! This has been fixed in version 0.6.5 but since the problem directly affects the background update task you may need to manually download and install the new version. I recommend looking for manual updates within the next week to other workflows that you use since the fix is in Alfred-Workflow which is used by many workflows.

In my case the update was hanging about 80% of the time, so once I got the update prompt it took a few tries to actually install the update. If you are reading this, I recommend downloading the release here and opening it with Alfred to update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants