Skip to content

[Bug]: Cannot stop amd64 Arch Linux container #754

Closed as duplicate
Closed as duplicate

Description

@osalbahr

I have done the following

  • I have searched the existing issues
  • If possible, I've reproduced the issue using the 'main' branch of this project

Steps to reproduce

I cannot reproduce it again, but it happened twice. I currently have two containers hanging container stop and container system stop. So I can't remove them. What I did looked something like this:

Terminal tab 1:

  1. container run --rm -it --arch amd64 archlinux

Terminal tab 2:

  1. container ls
  2. container exec -it f338cc47-a3e4-4321-b5e5-1a52b8ec3166 bash
  3. ctrl-D (to exit)

Terminal tab 1:

  1. ctrl-D (to exit)
  2. it hangs

Terminal tap 2:

  1. container stop f338cc47-a3e4-4321-b5e5-1a52b8ec3166
  2. it hangs
  3. ctrl-C
  4. container system stop
  5. it hangs
  6. ctrl-C

Current behavior

% container stop --debug f338cc47-a3e4-4321-b5e5-1a52b8ec3166
[no output]
^C
% container system stop
2025-10-12T16:15:27+0300 info com.apple.container.cli: [ContainerCommands] checking if APIServer is alive
2025-10-12T16:15:27+0300 info com.apple.container.cli: stopTimeoutSeconds=5 [ContainerCommands] stopping containers

It's hanging. So I can't container rm the containers.

Note: the following hangs and I can't ctrl-C

% container exec -it f338cc47-a3e4-4321-b5e5-1a52b8ec3166 bash

Expected behavior

Container stops.

Environment

- OS: macOS 26.0.1 (25A362)
- Xcode: N/A
- Container: container CLI version 0.5.0 (build: release, commit: 48230f3)

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added theissue type on Oct 12, 2025
  2. osalbahr commented on Oct 12, 2025

    @osalbahr
    Author

    For reference, I also tried to container stop the other container. And it's been hanging for like 3 minutes with no debug output.

    % container ls
    ID                                    IMAGE                               OS     ARCH   STATE    ADDR          CPUS  MEMORY
    f338cc47-a3e4-4321-b5e5-1a52b8ec3166  docker.io/library/archlinux:latest  linux  amd64  running  192.168.73.4  4     8192 MB
    84c481d2-7468-49e7-aec7-0966853cde71  docker.io/library/archlinux:latest  linux  amd64  running  192.168.73.3  4     4096 MB
    % container stop --debug 84c481d2-7468-49e7-aec7-0966853cde71
  3. katiewasnothere commented on Oct 13, 2025

    @katiewasnothere
    Contributor

    Hi @osalbahr, thanks for the report!

    You mentioned you aren't able to get a consistent repro. When you see the issue, could you run container system logs --debug --last <insert minutes ago that you started the container plus another minute for more context> and include those logs here?

    Additionally, can you grab the boot logs of the problematic container from ~/Library/Application\ Support/com.apple.container/containers/<container ID>/vminitd.log? This will include the kernel's dmesg output and our agent vminitd's debug output.

  4. osalbahr commented on Oct 13, 2025

    @osalbahr
    Author

    You mentioned you aren't able to get a consistent repro. When you see the issue, could you run container system logs --debug --last <insert minutes ago that you started the container plus another minute for more context> and include those logs here?

    % container system logs --debug
    Filtering the log data using "subsystem ==[cd] "com.apple.container""
    Timestamp                       Thread     Type        Activity             PID    TTL  
    2025-10-13 20:52:39.755676+0300 0xc68ba    Info        0x0                  9448   0    container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] `stop` xpc handler [uuid=f338cc47-a3e4-4321-b5e5-1a52b8ec3166]
    2025-10-13 20:53:07.422443+0300 0xc68b9    Error       0x0                  8836   0    container-apiserver: [com.apple.container:APIServer] xpc client handler connection error Connection invalid
    2025-10-13 20:54:27.608234+0300 0xc7111    Info        0x0                  9448   0    container-runtime-linux: [com.apple.container:RuntimeLinuxHelper] `createProcess` xpc handler [uuid=f338cc47-a3e4-4321-b5e5-1a52b8ec3166]
    --------------------------------------------------------------------------------------------------------------------
    Log      - Default:          0, Info:                2, Debug:             0, Error:          1, Fault:          0
    Activity - Create:           0, Transition:          0, Actions:           0

    Additionally, can you grab the boot logs of the problematic container from ~/Library/Application\ Support/com.apple.container/containers/<container ID>/vminitd.log? This will include the kernel's dmesg output and our agent vminitd's debug output.

    f338cc47-a3e4-4321-b5e5-1a52b8ec3166: vminitd.log
    84c481d2-7468-49e7-aec7-0966853cde71: vminitd.log

    Note that execing hangs too. For example, container exec -it f338cc47-a3e4-4321-b5e5-1a52b8ec3166 bash.

  5. katiewasnothere commented on Oct 13, 2025

    @katiewasnothere
    Contributor

    From the dmesg, it looks like the exec hits an oomkill:

    [  524.527304] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=84c481d2-7468-49e7-aec7-0966853cde71,mems_allowed=0,global_oom,task_memcg=/container/84c481d2-7468-49e7-aec7-0966853cde71,task=rustc,pid=6811,uid=1000
    [  524.527415] Out of memory: Killed process 6811 (rustc) total-vm:5529816kB, anon-rss:3852932kB, file-rss:164kB, shmem-rss:0kB, UID:1000 pgtables:9108kB oom_score_adj:0
    

    it also looks like the container exits and then we hit a kernel panic:

    2025-10-12T12:49:17+0000 info vminitd : id=90 [vminitd] got back pid data
    ...
    2025-10-12T13:02:19+0000 debug vminitd : exits=[90: 0] processes=1 [vminitd] checking for exit of managed process
    2025-10-12T13:02:19+0000 debug vminitd : count=0 pid=90 status=0 [vminitd] managed process exited
    ...
    [  782.873247] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
    [  782.873577] Mem abort info:
    [  782.873584]   ESR = 0x0000000096000046
    [  782.873612]   EC = 0x25: DABT (current EL), IL = 32 bits
    [  782.873641]   SET = 0, FnV = 0
    [  782.873650]   EA = 0, S1PTW = 0
    [  782.873674]   FSC = 0x06: level 2 translation fault
    [  782.873699] Data abort info:
    [  782.873710]   ISV = 0, ISS = 0x00000046, ISS2 = 0x00000000
    [  782.873733]   CM = 0, WnR = 1, TnD = 0, TagAccess = 0
    [  782.873757]   GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
    [  782.873780] user pgtable: 4k pages, 48-bit VAs, pgdp=00000001002cc000
    [  782.873818] [0000000000000000] pgd=08000001002c4003, p4d=08000001002c4003, pud=0800000101c9e003, pmd=0000000000000000
    [  782.873868] Internal error: Oops: 0000000096000046 [#1] SMP
    [  782.873895] CPU: 3 UID: 0 PID: 18206 Comm: vminitd Not tainted 6.12.28 #1
    [  782.873934] pstate: 21400005 (nzCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
    [  782.873963] pc : selinux_inode_free_security+0x7c/0xbc
    [  782.874013] lr : security_inode_free+0x58/0x74
    [  782.874049] sp : ffff80008667bb60
    [  782.874068] x29: ffff80008667bb60 x28: ffff213281e05548 x27: ffff213281e0d000
    [  782.874110] x26: ffff213280798ec8 x25: 00000000000000c1 x24: ffffb60ffc95ac68
    [  782.874160] x23: ffff80008667bcf8 x22: 0000000000000000 x21: ffff213299d0d018
    [  782.874195] x20: ffff21328129e420 x19: ffff213299d0d010 x18: 0000000000000000
    [  782.874246] x17: 0000000000000000 x16: ffff2132812338a8 x15: 0000000000000003
    [  782.874275] x14: ffff213281e0d080 x13: 00000000001010a8 x12: 0000000000000005
    [  782.874340] x11: 0000000000000001 x10: 0000000000000001 x9 : 0000000000000000
    [  782.874386] x8 : 00000000ffffffe3 x7 : 0000000000000000 x6 : 0000000000000000
    [  782.874424] x5 : ffff213281e0d000 x4 : 0000000000000000 x3 : 0000000000000001
    [  782.874463] x2 : 0000000000000000 x1 : ffff21328129e450 x0 : 0000000000000000
    [  782.874502] Call trace:
    [  782.874515]  selinux_inode_free_security+0x7c/0xbc
    [  782.874553]  security_inode_free+0x58/0x74
    [  782.874570]  __destroy_inode+0x74/0x1ec
    [  782.874599]  destroy_inode+0x2c/0x70
    [  782.874627]  evict+0x180/0x2d4
    [  782.874647]  evict_inodes+0x164/0x210
    [  782.874657]  generic_shutdown_super+0x44/0x15c
    [  782.874716]  kill_block_super+0x18/0x38
    [  782.874741]  ext4_kill_sb+0x1c/0x48
    [  782.874780]  deactivate_locked_super+0x50/0x160
    [  782.874811]  deactivate_super+0x68/0x7c
    [  782.874833]  cleanup_mnt+0x94/0x11c
    [  782.874848]  __cleanup_mnt+0x10/0x18
    [  782.874869]  task_work_run+0xb0/0x118
    [  782.874886]  do_notify_resume+0x138/0x13c
    [  782.874908]  el0_svc+0x100/0x1b8
    [  782.874958]  el0t_64_sync_handler+0x134/0x150
    [  782.874984]  el0t_64_sync+0x160/0x164
    [  782.875008] Code: 35ffff84 35000221 a9408261 f9000420 (f9000001) 
    [  782.875037] ---[ end trace 0000000000000000 ]---
    

    Looks like this panic is a dup of #614.

    Do you still run into the issue if you provide more memory to the container on run? Something like container run --rm -it -m <target amount of memory><M/K/G> --arch amd64 archlinux. The default is 2GB.

  6. osalbahr commented on Oct 13, 2025

    @osalbahr
    Author

    These 2 containers that are hanging have 8GB and 4GB of RAM.

    % container ls
    ID                                    IMAGE                               OS     ARCH   STATE    ADDR          CPUS  MEMORY
    f338cc47-a3e4-4321-b5e5-1a52b8ec3166  docker.io/library/archlinux:latest  linux  amd64  running  192.168.73.4  4     8192 MB
    84c481d2-7468-49e7-aec7-0966853cde71  docker.io/library/archlinux:latest  linux  amd64  running  192.168.73.3  4     4096 MB
  7. sveba commented on Oct 14, 2025

    @sveba

    Same issue

  8. katiewasnothere commented on Oct 15, 2025

    @katiewasnothere
    Contributor

    Interesting. Seems like there's something going on when unmounting our ext4 images. Closing as a dup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions