princeton-sns / firecracker-tools

5 stars 5 forks source link

Python's `time.sleep` hangs at `select` syscall when boot from a snapshot #18

Open tan-yue opened 5 years ago

tan-yue commented 5 years ago

Relevant strace output from strace python2 /bin/runtime-workload:

open("/dev/ttyS1", O_RDONLY)            = 3
fstat(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(4, 65), ...}) = 0
pipe([4, 6])                            = 0
fcntl(4, F_GETFD)                       = 0
fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
fcntl(6, F_GETFD)                       = 0
fcntl(6, F_SETFD, FD_CLOEXEC)           = 0
rt_sigprocmask(SIG_BLOCK, ~[], [], 8)   = 0
fork()                                  = 856
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
close(6)                                = 0
mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdf4fc62000
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=856, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
read(4, "", 1048576)                    = 0
munmap(0x7fdf4fc62000, 1052672)         = 0
close(4)                                = 0
wait4(856, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 856
read(3, "{\"request\": \"haha\"}\n", 1024) = 20
select(0, NULL, NULL, NULL, {tv_sec=0, tv_usec=500000}