Skip to content

SIGILL (Illegal instruction) when running multiple threads #169

Description

@it1shka

Operating system: macOS 15.1
Architecture: ARM

Problem:
when running in single-threaded mode:

zap.start({
  .threads = 1,
})

everything is fine,

but when running in multithreaded mode:

zap.start({
  .threads = 2,
})

program crashes when faces high workload with "SIGILL (Illegal instruction)" error.

On each request I am running an algorithm that does a lot of stack allocations,
therefore my speculation is that the program runs out of stack memory and starts executing garbage instructions.

However, the problem preserves when I execute my app with sudo ulimit -s unlimited which should technically relax the stack size constraint. Additionally, it seems suspicious to me that program handles any workload when threads = 1, but immediately starts failing when threads = 2.

Any help would be appreciated

Activity

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

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions