Closed wallrj closed 3 years ago
Hey, thanks for reporting this! I take it this is the armv7 build and not arm64?
Yes, armv7. No problem.
# arch
armv7l
Thanks! Two more follow up questions:
-config.expand-env
to evaluate environment variables?$STATE_DIRECTORY
? Is it pointing to tmpfs? Network mount? SD card?Yes, I'm using config.expand-env
and the $STATE_DIRECTORY
is tmpfs
.
This is running on a Raspberry Pi and overlay-root, which overlays a squashfs rootfs with a tmpfs.
And systemd will be creating that STATE_DIRECTORY dynamically, in the tmpfs rootfs.
# xargs -0 -n1 < /proc/$(pidof grafana-agent)/environ
LANG=en_GB.UTF-8
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
LOGNAME=grafana-agent
USER=grafana-agent
INVOCATION_ID=e81f51bdbdc74f8fa4ca4e1483ec1196
JOURNAL_STREAM=9:13089
RUNTIME_DIRECTORY=/run/grafana-agent
STATE_DIRECTORY=/var/lib/grafana-agent
CREDENTIALS_DIRECTORY=/run/credentials/grafana-agent.service
# cat /etc/systemd/system/grafana-agent.service
[Unit]
Description=Grafana Cloud Agent
[Service]
DynamicUser=true
SupplementaryGroups=systemd-journal
LoadCredential=agent_config:/etc/%N/agent-config.yaml
ExecStart=/usr/local/bin/grafana-agent --config.expand-env --config.file=${CREDENTIALS_DIRECTORY}/agent_config
Restart=always
RuntimeDirectory=%N
RuntimeDirectoryPreserve=restart
StateDirectory=%N
CapabilityBoundingSet=
LockPersonality=true
MemoryDenyWriteExecute=true
NoNewPrivileges=yes
PrivateTmp=yes
PrivateUsers=true
ProtectControlGroups=true
ProtectHome=yes
ProtectKernelModules=true
ProtectKernelTunables=true
ProtectSystem=strict
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=true
RestrictRealtime=true
SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
SystemCallFilter=~@privileged
SystemCallFilter=~@resources
UMask=0077
[Install]
WantedBy=multi-user.target
I've looked into this a bit and I don't have anything to share yet. It seems like it crashed when trying to write to stderr, which is extremely strange.
Have you seen this more than once?
Thanks for looking into it.
It has only happened once since I began sending logs to Grafana Cloud on 2021-01-25. And only on one of three identical Raspberry PI devices with very similar work loads.
Maybe it was a hardware glitch.
I'll let you know if it happens again.
This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.
Grafana Agent crashed with this traceback: panic.txt
Config:
Raspbian GNU/Linux 10 (buster) Raspberry Pi 3 Model B Plus Rev 1.3