Skip to content

[BUG] SIGSEGV when "compose logs -f" stops with podman #13597

@gautaz

Description

@gautaz

Description

Hello,

Podman support is probably out of scope for compose but I'll try to explain the current behavior I am encountering anyway.
So I am using docker compose on top of podman.
The bug occurs when looking at a service's logs with the follow option, i.e. docker compose logs -f <service_name>.
When the service stops, the compose logs command also stops, but with the following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0xf75452]

goroutine 51 [running]:
github.com/docker/compose/v5/pkg/compose.(*monitor).Start(0xc00050e180, {0x1597680, 0xc00079a320})
        github.com/docker/compose/v5/pkg/compose/monitor.go:150 +0xc12
github.com/docker/compose/v5/pkg/compose.(*composeService).Logs.func3()
        github.com/docker/compose/v5/pkg/compose/logs.go:108 +0x25
golang.org/x/sync/errgroup.(*Group).Go.func1()
        golang.org/x/sync@v0.19.0/errgroup/errgroup.go:93 +0x50
created by golang.org/x/sync/errgroup.(*Group).Go in goroutine 1
        golang.org/x/sync@v0.19.0/errgroup/errgroup.go:78 +0x95
Error: executing /home/del/.nix-profile/bin/docker-compose logs -f: exit status 2

The bug is minor as there is no other consequence.

Steps To Reproduce

  1. Use compose on top of podman (docker aliased as podman).
  2. Start a service which executes a task that stops after a time.
  3. Follow the logs of this service with docker compose logs -f <service>.
  4. When the service ends its task and stops, the compose logs command also stops but with a SIGSEGV.

Compose Version

❯ docker compose version
Docker Compose version 5.0.2

Docker Environment

❯ docker version
Client:       Podman Engine
Version:      5.7.0
API Version:  5.7.0
Go Version:   go1.25.5
Built:        Tue Jan  1 01:00:00 1980
OS/Arch:      linux/amd64

❯ docker info
host:
  arch: amd64
  buildahVersion: 1.42.0
  cgroupControllers:
  - cpu
  - io
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: Unknown
    path: /nix/store/iz84n9cgv9c5d9b9wvvbahi46lb8r3xl-podman-helper-binary-wrapper/bin/conmon
    version: 'conmon version 2.2.0, commit: ff908cce92cf89167b6b97ed240e91a6b147acc1'
  cpuUtilization:
    idlePercent: 95.4
    systemPercent: 0.54
    userPercent: 4.06
  cpus: 16
  databaseBackend: sqlite
  distribution:
    codename: yarara
    distribution: nixos
    version: "26.05"
  eventLogger: journald
  freeLocks: 2036
  hostname: hepao
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 100
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 6.12.68
  linkmode: dynamic
  logDriver: journald
  memFree: 19646300160
  memTotal: 33350987776
  networkBackend: netavark
  networkBackendInfo:
    backend: netavark
    dns:
      package: Unknown
      path: /nix/store/fq1syq8lqgmhalh23xdkv2f4k71ipigw-podman-5.7.0/libexec/podman/aardvark-dns
      version: aardvark-dns 1.17.0
    package: Unknown
    path: /nix/store/fq1syq8lqgmhalh23xdkv2f4k71ipigw-podman-5.7.0/libexec/podman/netavark
    version: netavark 1.17.1
  ociRuntime:
    name: crun
    package: Unknown
    path: /nix/store/iz84n9cgv9c5d9b9wvvbahi46lb8r3xl-podman-helper-binary-wrapper/bin/crun
    version: |-
      crun version 1.26
      commit: 3241e671f92c33b0c003cd7de319e4f32add6231
      rundir: /run/user/1000/crun
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  pasta:
    executable: /nix/store/fq1syq8lqgmhalh23xdkv2f4k71ipigw-podman-5.7.0/libexec/podman/pasta
    package: Unknown
    version: |
      pasta 2025_09_19.623dbf6
      Copyright Red Hat
      GNU General Public License, version 2 or later
        <https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
      This is free software: you are free to change and redistribute it.
      There is NO WARRANTY, to the extent permitted by law.
  remoteSocket:
    exists: true
    path: /run/user/1000/podman/podman.sock
  rootlessNetworkCmd: pasta
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: ""
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: ""
    package: ""
    version: ""
  swapFree: 45126402048
  swapTotal: 50054819840
  uptime: 360h 14m 40.00s (Approximately 15.00 days)
  variant: ""
plugins:
  authorization: null
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /home/del/.config/containers/storage.conf
  containerStore:
    number: 3
    paused: 0
    running: 1
    stopped: 2
  graphDriverName: overlay
  graphOptions: {}
  graphRoot: /home/del/.local/share/containers/storage
  graphRootAllocated: 449495171072
  graphRootUsed: 318847557632
  graphStatus:
    Backing Filesystem: btrfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Supports shifting: "false"
    Supports volatile: "true"
    Using metacopy: "false"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 1929
  runRoot: /run/user/1000/containers
  transientStore: false
  volumePath: /home/del/.local/share/containers/storage/volumes
version:
  APIVersion: 5.7.0
  Built: 315532800
  BuiltTime: Tue Jan  1 01:00:00 1980
  GitCommit: ""
  GoVersion: go1.25.5
  Os: linux
  OsArch: linux/amd64
  Version: 5.7.0

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions