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

Crash: plat/common/bootinfo causes segmentation fault of Linuxu debug executables #1271

Open
Julius1991 opened this issue Jan 22, 2024 · 1 comment
Labels
kind/bug Something isn't working

Comments

@Julius1991
Copy link

Julius1991 commented Jan 22, 2024

Describe the bug

Linuxu debug executables cause segmentation fault - app-helloworld is just one example.

Steps to reproduce

  1. Build app-helloworld (https://github.com/unikraft/app-helloworld) for Unikraft v0.16.1 (Telesto).
  2. ./app-helloworld_linuxu-x86_64.dbg.

Expected behavior

Linuxu debug executables do not cause a segmentation fault.
app-helloworld debug executable prints the same output as the release version.

Which architectures were you using or does this bug affect?

x86_64

Which platforms were you using or does this bug affect?

linuxu

Relevant log output

[28263.583609] Info: [liblinuxuplat] <setup.c @ 66> Allocate memory for heap (4 MiB)
Segmentation fault

No response

@Julius1991 Julius1991 added the kind/bug Something isn't working label Jan 22, 2024
@Julius1991
Copy link
Author

I found a workaround. The segmentation fault is caused by accessing checking bi members in

if (unlikely(bi->magic != UKPLAT_BOOTINFO_MAGIC ||
and by returning NULL as a result of a failed check.
When commenting return NULL the check in
if (unlikely(list->count == list->capacity))
fails afterwards with [ 7223.007874] CRIT: [libukboot] <boot.c @ 301> Failed to initialize memory allocator.
Commenting the if statement makes the debug executable boot up and running as expected (in the tested use case).

@Julius1991 Julius1991 changed the title Linuxu debug executables cause segmentation fault. Crash: Linuxu debug executables cause segmentation fault in bootinfo Jan 24, 2024
@Julius1991 Julius1991 changed the title Crash: Linuxu debug executables cause segmentation fault in bootinfo Crash: plat/common/bootinfo causes segmentation fault of Linuxu debug executables Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant