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

MacOS Big Sur killing skaffold process -- violates CPU wakes limit #5161

Open
vinceferro opened this issue Dec 17, 2020 · 9 comments
Open

MacOS Big Sur killing skaffold process -- violates CPU wakes limit #5161

vinceferro opened this issue Dec 17, 2020 · 9 comments
Labels
kind/bug Something isn't working platform/mac priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence.

Comments

@vinceferro
Copy link

Expected behavior

Skaffold run should deploy correctly

Actual behavior

The process gets killed by the OS, i can see warnings in the console saying skaffold is waking up the CPU too often

Received CPU wakes trigger:
  skaffold[15156] () woke the CPU 45001 times over 29.59 seconds (average 1520/sec), violating a CPU wakes limit of 45000 over 300 seconds.
RESOURCE_NOTIFY trigger for skaffold [15156] (45001 CPU wakes over 29.00s seconds, violating limit of 45000 CPU wakes over 300.00s seconds)

Information

  • Skaffold version: v1.17.2
  • Operating system: macOS BigSur 11.1
  • Contents of skaffold.yaml: company policy, won't share :(
@briandealwis briandealwis added needs-reproduction needs reproduction from the maintainers to validate the issue is truly a skaffold bug platform/mac labels Dec 18, 2020
@briandealwis
Copy link
Member

Very odd @vinceferro! Could you provide some more details please? Does this happen immediately on every run, or just sometimes? What were you doing? Could you include some debug logs (skaffold ... -vdebug)?

This error message isn't new to Big Sur — I found several references to "violating a CPU wakes limit" going back to 2018. One report tied this to use of JAMF/SentinelOne.com. Do you have some anti-virus or file watcher running? Do you have frequent file changes going on?

@vinceferro
Copy link
Author

hi @briandealwis, it happens as soon a little after the deploy phase starts, on the execution it's at this stage:
kubectl --context test-us-west-2 --namespace web-preprod get -f - --ignore-not-found -ojson
The command is a simple skaffold run. The project is composed by many different deployments, configuration maps, secrets deployed together.
I've looked at the activity monitor, I saw spikes in Idle Wakes up for skaffold, docker and kubectl, but nothing super suspicious..

Anyways, there is the debug log, thanks for the help!
skaffold.log

@briandealwis
Copy link
Member

There's a lot of work happening in parallel according to your logs. Could you try making Skaffold run the build sequentially by altering your skaffold.yml to set build.local.concurrency to 1 and see if that makes a difference?

Did this happen with previous versions of Skaffold? Did you only notice this with the update to BigSur?

@briandealwis briandealwis added the kind/bug Something isn't working label Dec 20, 2020
@vinceferro
Copy link
Author

Same, I've tried with concurrency 1 but still no luck deploying. I think it started happening with skaffold v1.17.2, but really a lot changed.. For some reasons, with skaffold dev it doesn't happen to get the sigkill.. Mistery 😅

@vinceferro
Copy link
Author

It was kubectl version, I downgraded it from v1.20 to v1.7.4!
Now I wonder if that is uniquely an issue with kubectl or the issue is combined with skaffold..

@briandealwis
Copy link
Member

@vinceferro thanks for the update. 1.7.4 is pretty old, so you might be better off using the version corresponding to your kubernetes cluster.

I've since upgraded my personal laptop to Big Sur, and I'm unable to reproduce this problem with the officially provided kubectl 1.20.0. Could you let us know:

  • Which kubernetes distribution are you using?
  • Where did you get kubectl?
  • What Skaffold command-line did you actually run? (skaffold run --tail?)

@vinceferro
Copy link
Author

hey @bryanlarsen, just to give you more context, this is only happening with our fairly big application, with other smaller one this isn't happening.
Here's the answers:

@briandealwis
Copy link
Member

I'm baffled — your debug log only shows kubectl being executed a single time. And it doesn't explain why Skaffold is being killed.

I'll leave this open in case others have a similar issue and can shed some light.

@briandealwis briandealwis added the priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence. label Jan 20, 2021
@tejal29 tejal29 removed the needs-reproduction needs reproduction from the maintainers to validate the issue is truly a skaffold bug label Feb 24, 2021
@cherudim
Copy link

cherudim commented Jul 14, 2021

I had the same issue, this is my environment:

OS X Catalina (10.15.7)
kubectl 1.20 (from homebrew)
skaffold 1.27.0 (from homebew)

Command + output:

$ skaffold -p pricing deploy
Tags used in deployment:
Starting deploy...
running [kubectl --context the-context get -f - --ignore-not-found -ojson]
 - stdout: ""
 - stderr: ""
 - cause: signal: killed

Resolved by downloading the latest kubectl (1.21) from the official site (curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl")

The common denominator seems to be kubectl 1.20 from homebrew

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working platform/mac priority/awaiting-more-evidence Lowest Priority. May be useful, but there is not yet enough supporting evidence.
Projects
None yet
Development

No branches or pull requests

4 participants