We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
do_exit()
There is a reachable unwrap panic in do_exit() at kernel/aster-nix/src/process/posix_thread/exit.rs:32 when make a munmap syscall.
munmap
asterinas/kernel/aster-nix/src/process/posix_thread/exit.rs
Lines 27 to 34 in ce2af1e
#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <sys/mman.h> #include <unistd.h> int main() { void *addr = mmap(NULL, 4096, 0x3, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); munmap(addr, 0xfffff000); return EXIT_SUCCESS; }
Asterinas reports panic and is terminated.
~ # /root/munmap.c [ 10.404] ERROR: page fault handler failed: addr: 0x447e1b, err: Error { errno: EACCES, msg: Some("page fault addr is not in current vmar") } [ 10.405] ERROR: page fault handler failed: addr: 0x10001690, err: Error { errno: EACCES, msg: Some("page fault addr is not in current vmar") } panicked at /root/asterinas/kernel/aster-nix/src/process/posix_thread/exit.rs:32:14: called `Result::unwrap()` on an `Err` value: Error { errno: EFAULT, msg: None } Printing stack trace: 1: fn 0xffffffff8876b810 - pc 0xffffffff8876b828 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010bf160; 2: fn 0xffffffff8876b5f0 - pc 0xffffffff8876b768 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010bf170; 3: fn 0xffffffff88049000 - pc 0xffffffff8804900a / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010bf2f0; 4: fn 0xffffffff8897edf0 - pc 0xffffffff8897ee72 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010bf300; 5: fn 0xffffffff8895c0d0 - pc 0xffffffff8895c1fb / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010bf390; 6: fn 0xffffffff88117a90 - pc 0xffffffff88117ec6 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010bf490; 7: fn 0xffffffff882af3a0 - pc 0xffffffff882af840 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010bf6e0; 8: fn 0xffffffff883196c0 - pc 0xffffffff8831a266 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010bfcf0; 9: fn 0xffffffff88297270 - pc 0xffffffff88297e87 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010c0570; 10: fn 0xffffffff885a9820 - pc 0xffffffff885a982e / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010c0f90; 11: fn 0xffffffff88781b60 - pc 0xffffffff88781b76 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010c0fb0; 12: fn 0xffffffff887b9710 - pc 0xffffffff887b9779 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010c0fd0; 13: fn 0x0 - pc 0x0 / registers: rax 0x12; rdx 0xffffffff889fd928; rcx 0x1; rbx 0x0; rsi 0x0; rdi 0x0; rbp 0x0; rsp 0xffff8000010c1000; [OSDK] The kernel seems panicked. Parsing stack trace for source lines: ( 1) /root/asterinas/ostd/src/panicking.rs:107 ( 2) /root/asterinas/ostd/src/panicking.rs:59 ( 3) 2aghao2n2kcoquuybdyjuveav:? ( 4) ??:? ( 5) ??:? ( 6) /root/.rustup/toolchains/nightly-2024-06-20-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1102 ( 7) /root/asterinas/kernel/aster-nix/src/process/exit.rs:23 ( 8) /root/asterinas/kernel/aster-nix/src/process/signal/mod.rs:108 ( 9) /root/asterinas/kernel/aster-nix/src/thread/task.rs:76 ( 10) /root/.rustup/toolchains/nightly-2024-06-20-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:79 ( 11) /root/.rustup/toolchains/nightly-2024-06-20-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:2077 ( 12) /root/asterinas/ostd/src/task/task/mod.rs:310 make: *** [Makefile:153: run] Error 1
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
There is a reachable unwrap panic in
do_exit()
at kernel/aster-nix/src/process/posix_thread/exit.rs:32 when make amunmap
syscall.asterinas/kernel/aster-nix/src/process/posix_thread/exit.rs
Lines 27 to 34 in ce2af1e
To Reproduce
munmap
:Expected behavior
Asterinas reports panic and is terminated.
Environment
Logs
The text was updated successfully, but these errors were encountered: