Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trunk+VSCode on raspberry Pi 4 aarch64 fails #742

Closed
platu opened this issue Apr 12, 2024 · 4 comments
Closed

Trunk+VSCode on raspberry Pi 4 aarch64 fails #742

platu opened this issue Apr 12, 2024 · 4 comments

Comments

@platu
Copy link

platu commented Apr 12, 2024

Hello,

I'm trying to use Trunk+VSCode in remote mode on a headless Pi 4 4GB and I get a mmap crash.

uname -m
aarch64
command -v trunk
/home/etu/.cache/trunk/launcher/trunk
trunk init
external/tcmalloc/tcmalloc/system-alloc.cc:662] MmapAligned() failed - unable to allocate with tag (hint, size, alignment) - is something limiting address placement? 0x241a40000000 1073741824 1073741824 @ 0x556cf3caa8 0x556cf3a740 0x556cf3a324 0x556cf29a78 0x556cf37638 0x556cf25ba0 0x556ca8230c 0x556bd3e618 0x556bd0b848 0x7fb427783c
external/tcmalloc/tcmalloc/arena.cc:64] FATAL ERROR: Out of memory trying to allocate internal tcmalloc data (bytes, object-size); is something preventing mmap from succeeding (sandbox, VSS limitations)? 131072 640 @ 0x556cf3d328 0x556cf29af4 0x556cf37638 0x556cf25ba0 0x556ca8230c 0x556bd3e618 0x556bd0b848 0x7fb427783c

Has anyone met the same issue ?

TIA,

@TylerJang27
Copy link
Collaborator

Hi @platu! Sorry you're running into this. We haven't seen this issue before. Does this happen consistently? When you manually create a .trunk/trunk.yaml, e.g.:

version: 0.1
cli:
  version: 1.21.0
lint:
  enabled:
    - ...

does this issue still show up when you run trunk check -a?

@platu
Copy link
Author

platu commented Apr 18, 2024

Hello,

Thanks for your prompt reply. The memory allocation error happens whenever I try to run the trunk command, and whatever the option used.

I created the following .trunk/trunk.yaml file manually from another working repository on an amd64 host.

# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
  version: 1.21.0
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
  sources:
    - id: trunk
      uri: https://github.com/trunk-io/plugins
      ref: v1.4.4
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
  enabled:
    - python@3.11.2
    - nodejs@18.19
lint:
  enabled:
    - bandit@1.7.7

When I run the bash -x trunk ckeck -a command, I get :

 exec env TRUNK_LAUNCHER_VERSION=1.3.1 env TRUNK_LAUNCHER_PATH=/usr/local/bin/trunk /home/etu/.cache/trunk/cli/1.21.0-linux-arm64/trunk check -a
external/tcmalloc/tcmalloc/system-alloc.cc:662] MmapAligned() failed - unable to allocate with tag (hint, size, alignment) - is something limiting address placement? 0x250280000000 1073741824 1073741824 @ 0x5582decaa8 0x5582dea740 0x5582dea324 0x5582dd9a78 0x5582de7638 0x5582dd5ba0 0x558293230c 0x5581bee618 0x5581bbb848 0x7f8b43783c
external/tcmalloc/tcmalloc/arena.cc:64] FATAL ERROR: Out of memory trying to allocate internal tcmalloc data (bytes, object-size); is something preventing mmap from succeeding (sandbox, VSS limitations)? 131072 640 @ 0x5582ded328 0x5582dd9af4 0x5582de7638 0x5582dd5ba0 0x558293230c 0x5581bee618 0x5581bbb848 0x7f8b43783c

I couldn't find the repository from which I could compile the trunk binary on my Raspberry aarch64 host. Is it possible?

@TylerJang27
Copy link
Collaborator

Hi! It looks like tcmalloc isn't universally supported on aarch64. I'll look into getting a fix out for you--should have updates shortly.

@TylerJang27
Copy link
Collaborator

This issue is fixed in CLI version 1.22.0. Let me know if you have any other issues!

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

No branches or pull requests

2 participants