Skip to content

source=main.go:768 msg="Leaving GOMAXPROCS=12: CPU quota undefined" component=automaxprocs #16469

@baryluk

Description

@baryluk

What did you do?

Updated from v3.1.0 to v3.3.0 on one of the machines.

docker container, using images from quay.io

Host system centos 9 amd64. Some in AWS (x86), some VMs on proxmox.

I have very similar setup (all with same configs and flags, but in terms of host system, 2 are on proxmox, others are on some AWS EC2 instances, but all inside docker containers), and update was fine on 6 different instances (all same flags and env variables if any), but last one failed (one on proxmox, with possibly a bit older Linux kernel and kernel flags).

[foo@bar ~]$ docker logs -f prometheus 
time=2025-04-22T17:12:47.644Z level=INFO source=main.go:228 msg="Experimental memory snapshot on shutdown enabled"
time=2025-04-22T17:12:47.658Z level=INFO source=main.go:687 msg="Starting Prometheus Server" mode=server version="(version=3.3.0, branch=HEAD, revision=3c49e69330ceee9c587a1d994c78535695edff16)"
time=2025-04-22T17:12:47.658Z level=INFO source=main.go:692 msg="operational information" build_context="(go=go1.24.1, platform=linux/amd64, user=root@b362765c931d, date=20250415-13:32:00, tags=netgo,builtinassets,stringlabels)" host_details="(Linux 5.14.0-533.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 22 15:05:06 UTC 2024 x86_64 enrico-prometheus (none))" fd_limits="(soft=1073741816, hard=1073741816)" vm_limits="(soft=unlimited, hard=unlimited)"
time=2025-04-22T17:12:47.668Z level=INFO source=main.go:768 msg="Leaving GOMAXPROCS=12: CPU quota undefined" component=automaxprocs

then prometheus process just exits without continuing, or any more error messages.

[foo@bar ~]$ lscpu
Architecture:             x86_64
  CPU op-mode(s):         32-bit, 64-bit
  Address sizes:          52 bits physical, 57 bits virtual
  Byte Order:             Little Endian
CPU(s):                   12
  On-line CPU(s) list:    0-11
Vendor ID:                AuthenticAMD
  Model name:             AMD EPYC 9454P 48-Core Processor

If I set environment variable GOMAXPROCS=12 it starts:

[foo@bar ~]$ docker logs -f prometheus 
time=2025-04-22T17:15:58.836Z level=INFO source=main.go:228 msg="Experimental memory snapshot on shutdown enabled"
time=2025-04-22T17:15:58.841Z level=INFO source=main.go:687 msg="Starting Prometheus Server" mode=server version="(version=3.3.0, branch=HEAD, revision=3c49e69330ceee9c587a1d994c78535695edff16)"
time=2025-04-22T17:15:58.841Z level=INFO source=main.go:692 msg="operational information" build_context="(go=go1.24.1, platform=linux/amd64, user=root@b362765c931d, date=20250415-13:32:00, tags=netgo,builtinassets,stringlabels)" host_details="(Linux 5.14.0-533.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 22 15:05:06 UTC 2024 x86_64 enrico-prometheus (none))" fd_limits="(soft=1073741816, hard=1073741816)" vm_limits="(soft=unlimited, hard=unlimited)"
time=2025-04-22T17:15:58.842Z level=INFO source=main.go:768 msg="Honoring GOMAXPROCS=\"12\" as set in environment" component=automaxprocs
time=2025-04-22T17:15:58.846Z level=INFO source=web.go:654 msg="Start listening for connections" component=web address=0.0.0.0:9090
time=2025-04-22T17:15:58.849Z level=INFO source=main.go:1228 msg="Starting TSDB ..."
time=2025-04-22T17:15:58.856Z level=INFO source=tls_config.go:347 msg="Listening on" component=web address=[::]:9090
...

Maybe because of this:

[foo@bar ~]$ cat /proc/cmdline 
BOOT_IMAGE=(hd0,msdos2)/vmlinuz-5.14.0-533.el9.x86_64 root=/dev/mapper/vg_root-root ro audit=1 resume=/dev/mapper/vg_root-swap rd.lvm.lv=vg_root/root rd.lvm.lv=vg_root/swap LANG=en_US.UTF-8 transparent_hugepage=never systemd.unified_cgroup_hierarchy=0 crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M
[foo@bar ~]$ 

???

This disabled cgroup v2, and uses legacy cgroup v1. I will for switch to v2, but I do not want to reboot this host atm.

Still prometheus should not crash?

[root@bar ~]# docker version
Client: Docker Engine - Community
 Version:           27.3.1
 API version:       1.47
 Go version:        go1.22.7
 Git commit:        ce12230
 Built:             Fri Sep 20 11:42:48 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          27.3.1
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.7
  Git commit:       41ca978
  Built:            Fri Sep 20 11:41:09 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.24
  GitCommit:        88bf19b2105c8b17560993bee28a01ddc2f97182
 runc:
  Version:          1.2.2
  GitCommit:        v1.2.2-0-g7cb3632
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0
[root@bar ~]# 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions