question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hang with 100% cpu during preview of ConfigFile resources

See original GitHub issue

Hello!

  • Vote on this issue by adding a 👍 reaction
  • To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already)

Issue details

Trying to pulumi up my prod environment after not touching it for a while, and it is hanging (100% cpu on python process) in preview. I believe is it related to the large (alb and cert-manager) k8s.yaml.ConfigFile resources I have. Everything has been fine for many months, but since the last time I touched it, pulumi, python, pulumi-kubernetes, and my laptop (new m1) have gone through many updates (which I have just applied). I’ve tried logging as suggested on the troubleshooting page, but can’t see anything interesting. pulumi refresh seems to work ok. aws cli and kubectl are connecting. If I comment out the ConfigFile resource, then preview completes normally (and offers to delete my resources).

$ pulumi version
v3.22.0

$ pip freeze
Arpeggio==1.10.2
attrs==21.4.0
certifi==2021.10.8
charset-normalizer==2.0.10
dill==0.3.4
grpcio==1.43.0
idna==3.3
parver==0.3.1
protobuf==3.19.3
pulumi==3.22.0
pulumi-aws==4.34.0
pulumi-eks==0.36.0
pulumi-kubernetes==3.14.0
PyYAML==6.0
requests==2.27.1
semver==2.13.0
six==1.16.0
urllib3==1.26.8```

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:2
  • Comments:13 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
cbcmgcommented, Apr 23, 2022

So it was pretty simple in the end. The current protobuf python package does not build the extension for M1, and the pure python implementation either doesn’t work at all, or works too slowly with large chunks of yaml.

see: https://github.com/protocolbuffers/protobuf/issues/9839

Forcing the build of the local extension in the venv of my pulumi project resolves the issue.

A recipe for users with brew:

$ cd my-project
$ source venv/bin/activate
$ export CFLAGS="-I$(brew --prefix protobuf)/include"; export LDFLAGS="-L$(brew --prefix protobuf)/lib"
$ pip install --force-reinstall protobuf=="$(brew list --version protobuf | awk '{print $2}')" --install-option="--cpp_implementation"
1reaction
gabrielmccollcommented, May 2, 2022

Yes, installing pulumi will install protobuf-3.20.1. Brew does not yet have that version, but 3.19.4 seems to work fine with pulumi.

Pulumi seemed to think the sdk wasn’t installed anymore

Not sure what happened there. If you have a clean pulumi project, brew installed, and protobuf installed with brew, and the script above completes without errors, it should work.

Okay got it thank you. I ran pip uninstall protobuf. then brew install protobuf then ran your script above and it seems to work now.

thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guidance for troubleshooting high CPU usage - Windows Server
Introduces general guidance for troubleshooting scenarios in which you experience high CPU usage.
Read more >
High CPU usage when cutting videos - Bug - Shotcut Forum
When I load clip from playlist to preview, it first plays ok, but when I start to cut it (mark teh start of...
Read more >
Android emulator uses 100% cpu even if nothing i running on it
I have a celeron processor :/ and android emulator on eclipse uses 100% of cpu and hangs everything unless I kill ...
Read more >
How to fix 100% CPU Utilization Bug (When no processes are ...
For those who want to give a little thanks, I just set up a page over at buymeacoffee as a new way to...
Read more >
R6 save files
Move your config file into the root of your Xcode project. ... Solutions & Tips, Download Manual, Contact Us. The previews are saved...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found