Repository navigation
Description
Checks
- I've already read https://github.com/actions/actions-runner-controller/blob/master/TROUBLESHOOTING.md and I'm sure my issue is not covered in the troubleshooting guide.
- I'm not using a custom entrypoint in my runner image
Controller Version
2.299.1-ubuntu-20.04-aa6dab5
Helm Chart Version
0.22.0
CertManager Version
1.11.0
Deployment Method
ArgoCD
cert-manager installation
- Cert manager installed from upstream chart - confirmed it's official
- We did follow the setup at the beginning / since then we've changed things around but are back to very similar setup to upstream with minor diff
Checks
- This isn't a question or user support case (For Q&A and community support, go to Discussions. It might also be a good idea to contract with any of contributors and maintainers if your business is so critical and therefore you need priority support
- I've read releasenotes before submitting this issue and I'm sure it's not due to any recently-introduced backward-incompatible changes
- My actions-runner-controller version (v0.x.y) does support the feature
- I've already upgraded ARC (including the CRDs, see charts/actions-runner-controller/docs/UPGRADING.md for details) to the latest and it didn't fix the issue
- I've migrated to the workflow job webhook event (if you using webhook driven scaling)
Resource Definitions
Not a problem with runners per se - problem with actions-metrics-server
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app.kubernetes.io/managed-by: Helm
app.kubernetes.io/name: github-runner-controller
app.kubernetes.io/version: 0.27.0
helm.sh/chart: actions-runner-controller-0.22.0
name: actions-metrics
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app.kubernetes.io/instance: actions-metrics-server
app.kubernetes.io/name: actions-runner-controller
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/instance: actions-metrics-server
app.kubernetes.io/name: actions-runner-controller
spec:
containers:
- args:
- --metrics-addr=0.0.0.0:8443
- --log-format=text
command:
- /actions-metrics-server
env:
- name: GITHUB_WEBHOOK_SECRET_TOKEN
valueFrom:
secretKeyRef:
key: github_webhook_secret_token
name: actions-metrics-server
optional: true
- name: GITHUB_ENTERPRISE_URL
value: redacted
- name: GITHUB_TOKEN
valueFrom:
secretKeyRef:
key: github_token
name: controller-manager
optional: true
- name: GITHUB_APP_ID
valueFrom:
secretKeyRef:
key: github_app_id
name: controller-manager
optional: true
- name: GITHUB_APP_INSTALLATION_ID
valueFrom:
secretKeyRef:
key: github_app_installation_id
name: controller-manager
optional: true
- name: GITHUB_APP_PRIVATE_KEY
valueFrom:
secretKeyRef:
key: github_app_private_key
name: controller-manager
optional: true
- name: GITHUB_BASICAUTH_PASSWORD
valueFrom:
secretKeyRef:
key: github_basicauth_password
name: controller-manager
optional: true
image: summerwind/actions-runner-controller:v0.27.0
imagePullPolicy: IfNotPresent
name: actions-metrics-server
ports:
- containerPort: 8000
name: http
protocol: TCP
- containerPort: 8443
name: metrics-port
protocol: TCP
resources: {}
securityContext: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: actions-metrics
serviceAccountName: actions-metrics
terminationGracePeriodSeconds: 10To Reproduce
1. Run actions-metrics-server with webhook from GHES
2. Observe segfaults seemingly at random intervals after webhook is received - different jobs trigger thisDescribe the bug
Getting below at random:
"panic: runtime error: invalid memory address or nil pointer dereference"
"[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1344074]"
"goroutine 71 [running]:"
"github.com/actions/actions-runner-controller/pkg/actionsmetrics.(*EventReader).ProcessWorkflowJobEvent(0xc000272000, {0x18c4650, 0xc0002fe000}, {0x152af80?, 0xc002b03470})"
"\tgithub.com/actions/actions-runner-controller/pkg/actionsmetrics/event_reader.go:123 +0xad4"
"github.com/actions/actions-runner-controller/pkg/actionsmetrics.(*EventReader).ProcessWorkflowJobEvents(0xc000272000, {0x18c4650, 0xc0002fe000})"
"\tgithub.com/actions/actions-runner-controller/pkg/actionsmetrics/event_reader.go:44 +0x59"
"main.main.func1()"
"\tgithub.com/actions/actions-runner-controller/cmd/actionsmetricsserver/main.go:157 +0x6c"
"created by main.main"
"\tgithub.com/actions/actions-runner-controller/cmd/actionsmetricsserver/main.go:154 +0xdef"
After the pod restarts it keeps running again with no issues.
Describe the expected behavior
Container doesn't segfault at random
Whole Controller Logs
n/a too random to catch it in the actWhole Runner Pod Logs
Since this is metrics-server issue not able to pinpoint specific runner pod causing this if any.Additional Context
Run into SIGSEGV on the beginning before adding credentials to the actions-metrics-server pod. Since then the above SIGSEGV only happened 4 times in space of a day and all of them within 2 hours. Will try to catch it in the act to try and narrow down but decided to open an issue in case if anybody else is running into this.
Activity
github-actions commentedon Feb 22, 2023
Hello! Thank you for filing an issue.
The maintainers will triage your issue shortly.
In the meantime, please take a look at the troubleshooting guide for bug reports.
If this is a feature request, please review our contribution guidelines.
ozlotusflare commentedon Feb 23, 2023
Hey @endriu0
Maybe you already faced with this type of error in
actions-metrics-serverI've provided webhoock secret token, but still the same error :/
Thank you and sorry for offtop
mumoshu commentedon Feb 26, 2023
Hey @endriu0 and @ozlotusflare! Thanks for reporting this.
According to the logs, it's failing at:
actions-runner-controller/pkg/actionsmetrics/event_reader.go
Line 123 in e1fcd63
It might indicate that step.conclusion can be empty for some workflow job events emitted by GitHub, although I don't know exactly which case it might happen.
In the meantime, the best we could do might be to add a nil check, so that it skips the problematic "step" object in the webhook event.
Fix actions-metrics-server segfault issue
mumoshu commentedon Feb 26, 2023
Please see #2325 for the fix
endriu0 commentedon Feb 27, 2023
Thank you @mumoshu.
endriu0 commentedon Feb 27, 2023
Hey @ozlotusflare , unfortunately we're not using secret for our webhooks due to everything being internal but if I were to guess then something is up with the secret.
Maybe double check that the secret doesn't by any chance have newline at the end (run into this before) . On Mac there's a diff between running 'echo "something" | base64' and 'echo -n "something" | base64'
ozlotusflare commentedon Feb 27, 2023
@endriu0 thank you!
I will take a look 🙂
ivanivicrho commentedon Mar 14, 2023
For me, it always fails for
workflow_job.completedevent. Logs from actions-metrics-server:Image is
summerwind/actions-runner-controller:v0.27.0. Installation is just basic helm chart installation: