Skip to content

Illegal Instruction in amd64 .sif on macOS/aarch64 rosetta #3195

Open
@n-io

Description

@n-io

Description

I encountered Illegal instruction (core dumped) when running apps from an sdk that's provided in a .sif file. The sif is built for amd64, and my system is a aarch64 (M2) machine with macOS 15.3. This is what I'm running:

$ limactl start template://apptainer --vm-type=vz --rosetta --mount-writable --mount-type=virtiofs --name apptainer
$ limactl shell apptainer
me@lima-apptainer$ singularity shell /path/to/sdk.sif
singularity> vi /viewing/files/works/fine.txt
singularity> sdk_debug_shell
Illegal instruction (core dumped)

Using these commands, I can set up my lima vm with apptainer, get shell access to the sif, and can browse around to view files. However, running any of the sdk apps (python apps) will error as shown above. I'm trying to use rosetta/vz for performance reasons.

I get the same error when running with qemu in system-mode, where I can also get shell access to the sif and browse around, but running bigger apps will crash in the exact same way as shown above (replace the first line with limactl start template://apptainer --vm-type=qemu --arch=x86_64 --mount-writable --name apptainer).

However, the error disappears when adding --set '.cpuType.x86_64="max"'.

Please could you advise if there is a similar work-around for rosetta/vz?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions