chyyuu / ucore_os_plus

232 stars 132 forks source link

bionic libc test test_clone fails #18

Open tomxice opened 12 years ago

tomxice commented 12 years ago

Description

test_clone.c fails. The father process calls "clone" function and gets pid of its child process. But something goes wrong before father finish "waitpid" function.

Reproduce Steps

cd ~/ucore_plus/ucore ./uCore_test -s bionic -w 15 -t 45 -f src/user-ucore/testspecs/test_clone.testpec

Current Result

From the serial console:

kernel_execve: pid = 4, name = "/bionic-test/test_clone". child pid 5 trapframe at 0x7b64fb0 r00 0x00000000 r01 0x00000000 r02 0x00000000 r03 0x00000000 r04 0x00000000 r05 0x30800750 r06 0x00000000 r07 0x0000001a r08 0x00000000 r09 0x00000000 r10 0x00000000 fp 0x3080cfe4 ip 0x3080903c usr_lr 0x6fe8529c sp 0x3080cfb0 lr 0x6fe81124 spsr 0xa0000050 User trap 0x00000002 Software interrupt err 0x00000000 undefined syscall 0, pid = 5, name = . file->fd:3 kernel panic at fs.c:64: assertion failed: file->status == FD_NONE Welcome to the kernel debug monitor!!

Expected Result

child pid 5 waitpid returned 5 child 5, status 0x137f

geraint0923 commented 11 years ago

The undefined syscall is ptrace. After removing the calling of ptrace from source code, this error will gone.