Skip to content

Tests Randomly Fail on M2 Chips #2463

@andrewvaughan

Description

@andrewvaughan

Describe the bug
Virtualization workarounds on the macOS M1/M2 chips seem to still fail occasionally with megalinter, inconsistently.

To Reproduce
Steps to reproduce the behavior:

  1. Have an Apple M1 or M2 Silicon chipset
  2. Turn on "Use Rosetta for x86/amd64 emulation on Apple Silicon" in Docker (workaround 1)
  3. Use act to run the Megalinter script with act --container-architecture linux/amd64 (workaround 2)
  4. Inconsistently see errors in various tests (and have them pass other times) the error is fairly consistent and seems to be related so how the containers are configured:
[MegaLinter/MegaLinter]   ❓  ::group::❌ Linted [JSON] files with [eslint-plugin-jsonc]: Found 1 error(s) - (3.31s) (expand for details)
| - Using [eslint-plugin-jsonc v2.6.0] https://megalinter.io/7411316caa2897b3839af1834e5fd8ebd5b7b81e/descriptors/json_eslint_plugin_jsonc
| - MegaLinter key: [JSON_ESLINT_PLUGIN_JSONC]
| - Rules config: [.eslintrc-json.json]
| - Number of files analyzed: [2]
| --Error detail:
| assertion failed [result.value != EEXIST]: VmTracker attempted to allocate existing mapping
| (ThreadContextVm.cpp:47 mmap)

(This is just an example, this error can randomly appear seemingly on any test, inconsistently).

Expected behavior
A successful run on M1 and M2 devices.

Screenshots
N/A

Additional context

Additional references from my debugging:

❯ act -l
WARN  ⚠ You are using Apple M1 chip and you have not specified container architecture, you might encounter issues while running act. 
If so, try running it with '--container-architecture linux/amd64'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    O: stale 🤖This issue or pull request is stale, it will be closed if there is no activitybugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions