Problems when test networking features on D1
shzhxh opened this issue · 1 comments
shzhxh commented
-
通过
cd zCore && make run_d1 PLATFORM=d1 ARCH=riscv64 LINUX=d1
会提示错误:panicked at 'page fault from kernel mode @ 0x0(EXECUTE)', zCore/src/handler.rs:21:9
而
cd zCore && make run_d1 PLATFORM=d1 ARCH=riscv64 LINUX=d1 MODE=release
则可正常运行,
我理解debug和release两种模式在运行结果上不应有差异。 -
libc测试里的socket.exe测例不能正常运行,错误提示如下:
[9816.029484 WARN 0 0:0 linux_syscall::task] sys_clone is calling sys_fork instead, ignoring other args
[9816.063109 WARN 0 0:0 linux_syscall] setpgid: unimplemented
[9816.071316 WARN 0 0:0 linux_object::fs::stdio] stdout TCGETS | TIOCSPGRP, pretend to be tty.
[9816.082586 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x116908(WRITE), pid=1028
[9816.356007 WARN 0 0:0 linux_syscall] setpgid: unimplemented
[9816.364199 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x11895c(WRITE), pid=1028
[9816.384045 WARN 0 0:0 linux_syscall] brk: unimplemented
[9816.391966 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x10c790(WRITE), pid=1028
[9816.403528 WARN 0 0:0 linux_syscall] brk: unimplemented
[9816.411666 WARN 0 0:0 linux_syscall::vm] mprotect: unimplemented
[9816.420370 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x117420(WRITE), pid=1028
[9816.432633 WARN 0 0:0 linux_syscall::vm] mprotect: unimplemented
[9816.441338 WARN 0 0:0 linux_syscall::net] sys_socket: domain: 2, socket_type: 2, protocol: 17
[9816.453750 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x119b58(WRITE), pid=1028
[9816.465344 WARN 0 0:0 linux_syscall::net] sys_setsockopt : sockfd : 10000, level : 1, optname : 20, optval : 0xa6e10 , optlen : 16
[9816.479684 WARN 0 0:0 linux_object::net::udp] setsockopt is unimplemented
[9816.489394 WARN 0 0:0 linux_syscall::net] sys_socket: domain: 2, socket_type: 2, protocol: 17
[9816.501732 WARN 0 0:0 linux_syscall::net] sys_sendto : sockfd : 10001, buffer : 0xa82c8, length : 1, flags : 0 , optlen : 0xa6e90, addrlen : 16
[9816.517218 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.527896 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.538194 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.548757 WARN 0 0:0 linux_syscall::net] sys_socket: domain: 2, socket_type: 524289, protocol: 6
[9816.560297 WARN 0 0:0 linux_syscall::net] sys_socket: domain: 2, socket_type: 1, protocol: 6
[9816.580288 WARN 0 0:0 linux_syscall::net] sys_socket: domain: 2, socket_type: 2049, protocol: 6
[9816.591659 WARN 0 0:0 linux_syscall::net] sys_socket: domain: 2, socket_type: 1, protocol: 6
[9816.611559 WARN 0 0:0 linux_syscall::net] sys_connect: fd: 10003, addr: 0xa6e90, addr_len: 16
[9816.622734 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.633830 WARN 0 0:0 linux_syscall::net] sys_accept: fd=10002 addr=0xa6e90 addr_len=0xa6dfc
[9816.644884 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.663942 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.674638 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.684977 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.695364 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.705750 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.716553 ERROR 0 0:0 zcore_drivers::net::rtlx] poll, SOCKET_ACTIVITY unimplemented
[9816.727354 WARN 0 0:0 linux_object::fs::stdio] stdout TCGETS | TIOCSPGRP, pretend to be tty.
[9816.738547 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x10db44(WRITE), pid=1028
[9816.750069 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x11cff0(WRITE), pid=1028
[9816.761675 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x10e128(WRITE), pid=1028
[9816.773173 WARN 0 0:0 linux_object::fs::stdio] stdin TCGETS | TIOCSPGRP, pretend to be tty.
[9816.784231 WARN 0 0:0 zcore_loader::linux] page fault from user mode @ 0x11adb0(WRITE), pid=1028
[9816.795824 WARN 0 0:0 linux_syscall] geteuid: unimplemented
[9816.805120 WARN 0 0:0 linux_syscall] geteuid: unimplemented
GCYYfun commented
关于libc网络测试,其socket.exe使用127.0.0.1地址,选用loopback网卡对其进行测试。测试tcp和udp基本功的实现。