-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
k3s crashes completely with "Observed a panic: "integer divide by zero"" #10384
Comments
I'm not seeing any K3s code here, this appears to be a bug in the Kubernetes scheduler. Have you reported this upstream, or looked for an existing issue that covers it? |
I have not reported it anywhere else just yet. However, after a deep dive into the issue, it seems that it's somehow GO specifically related. For example, Prometheus has also had an "Observed a panic: 'integer divide by zero'" issue. |
I mean yes, divide by zero will cause golang to panic. It is however the responsibility of the application code (Kubernetes in this case) to ensure that this does not occur. It is not golangs fault that Kubernetes or Prometheus is trying to divide by zero, the bug is in the application code that attempts an invalid mathematical operation. |
I figured, yea. Well, in case you're interested I'll keep you updated either here or elsewhere how it goes further, as I will publish it then to k8s repo specifically. |
Feel free to link this issue from your issue in k/k, or vice versa. |
I am also facing same issue with |
Looks like its fixed in this kubernetes/kubernetes#124933. |
No still have that issue with 1.30.1 too.
|
Try with v1.30.2-rc3+k3s1 - if you still get a crash please post the logs. |
Had the same occur on k3s version
Looking at the linked commit, i suppose the bit that created the trouble was: nodeAffinity:
required:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/hostname
operator: In
values:
- mydevice.lan Updated to |
Environmental Info:
K3s Version:
v1.29.5+k3s1 (4e53a32)
Node(s) CPU architecture, OS, and Version:
Rocky Linux k3s.hostname 5.14.0-427.20.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jun 7 14:51:39 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Cluster Configuration:
Single server configuration
Describe the bug:
Once we deploy a Persistent volume that contains shortname rather than FQDN in the hostname section the whole cluster crashes immediately. The only way to recover from this is complete reinstall. After the reinstall if we deploy using the fully qualified domain there is no such behavior.
Steps To Reproduce:
apiVersion: v1
kind: PersistentVolume
metadata:
name: master-data
spec:
capacity:
storage: 20Gi
accessModes:
persistentVolumeReclaimPolicy: Retain
storageClassName: local-path
local:
path: /data/master
nodeAffinity:
required:
nodeSelectorTerms:
operator: In
values:
operator: In
values:
- k3s.domain.com
Expected behavior:
It should, theoretically, work just as normal as with FQDN
Actual behavior:
The cluster crashes immediately after the PV is being applied with "integer divide by zero" critical panic error.
Additional context / logs:
The text was updated successfully, but these errors were encountered: