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

Caddy server static PIE (go) fails to start: fatal error: failed to reserve page summary memory #76

Open
bttger opened this issue Oct 23, 2022 · 0 comments

Comments

@bttger
Copy link

bttger commented Oct 23, 2022

Describe the bug
The caddy server built with go fails to start due to the following error:

[    0.171790] CRIT: [appelfloader] <brk.c @   27> Cannot handle multiple user space heaps: Not implemented!
[    0.176019] CRIT: [appelfloader] <brk.c @   44> Failed to increase heap: Not implemented!
fatal error: failed to reserve page summary memory

runtime stack:
runtime.throw({0x398d21a9?, 0x3ff8fb30?})
	/usr/lib/go/src/runtime/panic.go:1047 +0x5f fp=0x3ff8fae0 sp=0x3ff8fab0 pc=0x384becbf
runtime.(*pageAlloc).sysInit(0x3ac6e710)
	/usr/lib/go/src/runtime/mpagealloc_64bit.go:82 +0x195 fp=0x3ff8fb68 sp=0x3ff8fae0 pc=0x384b3475
runtime.(*pageAlloc).init(0x3ac6e710, 0x3ac6e700, 0x0?)
	/usr/lib/go/src/runtime/mpagealloc.go:324 +0x70 fp=0x3ff8fb90 sp=0x3ff8fb68 pc=0x384b10d0
runtime.(*mheap).init(0x3ac6e700)
	/usr/lib/go/src/runtime/mheap.go:721 +0x13f fp=0x3ff8fbc8 sp=0x3ff8fb90 pc=0x384ae4df
runtime.mallocinit()
	/usr/lib/go/src/runtime/malloc.go:407 +0xb2 fp=0x3ff8fbf0 sp=0x3ff8fbc8 pc=0x384910f2
runtime.schedinit()
	/usr/lib/go/src/runtime/proc.go:693 +0xab fp=0x3ff8fc50 sp=0x3ff8fbf0 pc=0x384c268b
runtime.rt0_go()
	/usr/lib/go/src/runtime/asm_amd64.s:345 +0x120 fp=0x3cd Documents/munich-hack-challenges/apps/run-app-elfloader

To Reproduce
Steps to reproduce the behavior:

  1. Set up the correct directory structure (clone the repositories, see snippet below)
  2. Build the caddy server static PIE executable
  3. Run it with ./run_elfloader ../static-pie-apps/caddy/caddy-2.6.2/cmd/caddy/caddy
  4. See error
# dir structure:
.
├── apps
│   ├── app-elfloader
│   ├── run-app-elfloader
│   └── static-pie-apps
├── libs
│   ├── lib-libelf
│   ├── lib-lwip
│   └── lib-zydis
└── unikraft
     ├── ...

Expected behavior
I expect it to run without errors.

Desktop (please complete the following information):

  • OS: Manjaro
  • Version: Kernel: 5.19.16-2-MANJARO
  • Arch: x86_64
  • Shell: zsh 5.9 (x86_64-pc-linux-gnu)
  • GCC: gcc (GCC) 12.2.0
  • pip 22.2.2 from /usr/lib/python3.10/site-packages/pip (python 3.10)
  • Python 3.10.7
  • kraft, version 0.5.0.dev491
@andraprs andraprs changed the title Caddy server (go) fails to start: fatal error: failed to reserve page summary memory Caddy server static PIE (go) fails to start: fatal error: failed to reserve page summary memory Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant