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

🐛 BUG:wrangler 3.15.0 still not work on Raspberry Pi OS bookworm #4312

Closed
excelsior091224 opened this issue Oct 31, 2023 · 5 comments
Closed
Labels
bug Something that isn't working

Comments

@excelsior091224
Copy link

excelsior091224 commented Oct 31, 2023

Which Cloudflare product(s) does this pertain to?

Pages

What version(s) of the tool(s) are you using?

3.15.0

What version of Node are you using?

20.9.0

What operating system are you using?

Linux(Raspberry Pi OS (Debian GNU/Linux 12 (bookworm)))

Describe the Bug

I installed Wrangler 3.15.0 on Raspberry Pi OS 12 (bookworm) and started a development server with npx wrangler pages dev to test the Cloudflare pages Function, but I get the following error Failure.

tadashi@raspberrypi:~/dev/astro_test/new_blog $ npx wrangler pages dev --proxy 3000 -- npm run dev -- --host --port 3000
Running npm run dev -- --host --port 3000...
▲ [WARNING] No compatibility_date was specified. Using today's date: 2023-10-31.
  Pass it in your terminal:
  /`/`/`
  --compatibility-date=2023-10-31
  /`/`/`
  See https://developers.cloudflare.com/workers/platform/compatibility-dates/
  for more information.
Compiling worker to "/home/tadashi/dev/astro_test/new_blog/.wrangler/tmp/pages-EyLfBA/functionsWorker-0.02272155090298167.mjs"...
✨⛅ Compiled Worker successfully
 ⛅-️ wrangler 3.15.0
-------------------
▲ [WARNING] --local is no longer required and will be removed in a future version.
  `wrangler dev` now uses the local Cloudflare Workers runtime by default. 🎉
Using vars defined in .dev.vars
Your worker has access to the following bindings:
- Vars:
  - MICROCMS_SERVICE_DOMAIN: "(hidden)"
  - MICROCMS_API_KEY: "(hidden)"
  - SITE_TITLE: "(hidden)"
  - SITE_DESCRIPTION: "(hidden)"
  - TWITTER: "(hidden)"
  - PIXIV: "(hidden)"
  - FANBOX: "(hidden)"
  - DEVIANTART: "(hidden)"
  - CARD_IMAGE: "(hidden)"
⎔ Starting local server...
[proxy]:
> @example/[email protected] dev
> astro dev --host --port 3000
external/com_google_tcmalloc/tcmalloc/system-alloc.cc:661] MmapAligned() failed - unable to allocate with tag (hint, size, alignment) - is something limiting address placement? 0x177740000000 1073741824 1073741824 @ 0x558cd24114 0x558cd205b0 0x558cd1fcfc 0x558cd004dc 0x558cd1d2b8 0x558cd1d07c 0x558ccf56b4 0x558cc61444 0x558cc88568 0x558bae1400 0x558bae1168 0x558bae4b50 0x558ccec7e0 0x7fb126783c
external/com_google_tcmalloc/tcmalloc/arena.cc:58] 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 @ 0x558cd24478 0x558cd0056c 0x558cd1d2b8 0x558cd1d07c 0x558ccf56b4 0x558cc61444 0x558cc88568 0x558bae1400 0x558bae1168 0x558bae4b50 0x558ccec7e0 0x7fb126783c
✘ [ERROR] Error reloading local server: Error: write EPIPE
      at WriteWrap.onWriteComplete [as oncomplete]
  (node:internal/stream_base_commons:94:16) {
    errno: -32,
    code: 'EPIPE',
    syscall: 'write'
  }
[proxy]:   🚀  astro  v3.4.0 started in 1150ms
  ┃ Local    http://localhost:3000/
  ┃ Network  http://192.168.1.81:3000/
 @  12 0:-*                4h4m 0.46 4x0.9GHz 3.7G35% 470G3% 2023-10-31 15:21:00

#3457 claims to have solved the problem, but it does not appear to be resolved.
I have also done sudo apt install libc++-dev and sudo apt install libc++1, but they don't seem to be working at all.
Is there a solution? If there isn't, you should clearly say "Raspberry Pi OS is not supported".

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@excelsior091224 excelsior091224 added the bug Something that isn't working label Oct 31, 2023
@lesiw
Copy link

lesiw commented Nov 3, 2023

Likely related to raspberrypi/linux#4375

@lesiw
Copy link

lesiw commented Nov 3, 2023

Rebuilt the kernel with CONFIG_ARM64_VA_BITS_48=y and wrangler works for me now.

mkdir -p ~/.local/src
git clone --depth=1 https://github.com/raspberrypi/linux ~/.local/src/linux
cd ~/.local/src/linux
sudo modprobe configs
zcat /proc/config.gz > .config
sed -i 's/CONFIG_ARM64_VA_BITS_39=y/CONFIG_ARM64_VA_BITS_48=y/' .config
make -j $(nproc) Image.gz modules dtbs
sudo make modules_install
sudo cp arch/arm64/boot/dts/broadcom/*.dtb /boot/firmware/
sudo cp arch/arm64/boot/dts/overlays/*.dtb* /boot/firmware/overlays/
sudo cp arch/arm64/boot/dts/overlays/README /boot/firmware/overlays/
sudo cp arch/arm64/boot/Image.gz /boot/firmware/kernel8.img
sudo reboot

@excelsior091224
Copy link
Author

Sorry for the late reply.
I changed OS to Ubuntu 22.04 LTS because of many other problems with the Raspberry Pi OS (Bookworm), but it worked normally there.
It seems that the problem is only with Raspberry Pi OS.

@CarmenPopoviciu
Copy link
Contributor

Hi folks, seems like this issue is resolved. Closing, but if the problem persists, feel free to re-open

@lesiw
Copy link

lesiw commented Apr 24, 2024

This is not resolved because raspberrypi/linux#4375 is not resolved. It would be nice if that issue were at least referenced in documentation, since wrangler still doesn't work out-of-the-box on Raspberry Pi OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
Development

No branches or pull requests

3 participants