wasabi
wasabi copied to clipboard
TcpStream error on toybr
$ git clone [email protected]:d0iasm/toybr.git $ ./run_on_wasabi.sh
Execute toybr on QEMU.
The code to call http APIs in noli: https://github.com/d0iasm/toybr/blob/main/net/wasabi/src/http.rs#L27-L44
Error log:
["toybr"]
App_vaddr_range: addr(0x0000000000000000-0x0000000000063000)
App region allocated = addr(0x000000003C836000-0x000000003C899000)
[INFO] os/src/memory.rs:110: Setting page attr for addr(0x000000003C836000-0x000000003C899000) to ReadWriteUser
Loading Segment: addr(0x0000000000000000-0x000000000000A9BC)...
Loading Segment: addr(0x000000000000B9C0-0x000000000003CC26)...
Loading Segment: addr(0x000000000003DC28-0x00000000000413B8)...
Loading Segment: addr(0x00000000000423B8-0x00000000000623C8)...
DYNAMIC segment found
dyn tag 0x000000000000001E value 0x0000000000000008
dyn tag 0x000000006FFFFFFB value 0x0000000008000001
dyn tag 0x0000000000000015 value 0x0000000000000000
dyn tag 0x0000000000000007 value 0x0000000000000280
dyn tag 0x0000000000000008 value 0x0000000000004E30
dyn tag 0x0000000000000009 value 0x0000000000000018
dyn tag 0x000000006FFFFFF9 value 0x0000000000000342
dyn tag 0x0000000000000006 value 0x0000000000000238
dyn tag 0x000000000000000B value 0x0000000000000018
dyn tag 0x0000000000000005 value 0x000000000000027C
dyn tag 0x000000000000000A value 0x0000000000000001
dyn tag 0x000000006FFFFEF5 value 0x0000000000000250
dyn tag 0x0000000000000004 value 0x000000000000026C
dyn tag 0x0000000000000000 value 0x0000000000000000
RELA found. addr = 0x0000000000000280 size = 0x0000000000004E30
[INFO] os/src/memory.rs:110: Setting page attr for addr(0x000000003C824000-0x000000003C826000) to ReadWriteUser
TcpStream::write: TcpStream { addr: IpV4 { addr: [ERROR] os/src/x86_64/idt.rs:249: Interrupt Info:
{
rip: 0x000000003C86DBD0, CS: 0x002B,
rsp: 0x000000003C824000, SS: 0x0023,
rbp: 0x0000000000000003,
rflags: 0x0000000000000046,
error_code: 0x0000000000000007,
rax: 0x0000000000110000, rcx: 0x0000000000000000,
rdx: 0x0000000000110000, rbx: 0x000000003C82445F,
rsi: 0x000000003C875F90, rdi: 0x000000003C82445F,
r8: 0x0000000000000000, r9: 0x0000000000000003,
r10: 0x000000003C876290, r11: 0x0000000000000046,
r12: 0x0000000000000000, r13: 0x0000000000000000,
r14: 0x000000003C875F90, r15: 0x000000003C8240A0,
}
[ERROR] os/src/x86_64/idt.rs:250: Exception 0x0E:
[ERROR] os/src/x86_64/idt.rs:265: Page Fault
[ERROR] os/src/x86_64/idt.rs:266: CR2=0x000000003C823FF8
[ERROR] os/src/x86_64/idt.rs:267: Caused by: A user mode data write on a present page, page structures are valid
[PANIC] PanicInfo { payload: Any { .. }, message: Some(fatal exception), location: Location { file: "os/src/x86_64/idt.rs", line: 297, col: 5 }, can_unwind: true, force_no_backtrace: false }
[PANIC] PanicInfo { payload: Any { .. }, message: Some(fatal exception), location: Location { file: "os/src/x86_64/idt.rs", line: 297, col: 5 }, can_unwind: true, force_no_backtrace: false }
Ah, it looks like the stack allocated for the app is used up completely:
rsp: 0x000000003C824000, SS: 0x0023,
CR2: 0x000000003C823FF8
Let me increase the stack size a bit for now...
It should be fixed now after https://github.com/hikalium/wasabi/commit/1e71e0dc96213a6e3ea4ad67f67a75a8053d6329 . Please confirm and close if it is fixed!
I believe this is fixed now. Mark as fixed.