Skip to content

Instantly share code, notes, and snippets.

@dogbert17
Created March 7, 2020 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dogbert17/c2b2687ec3ebf2f79cfae86ebedc72ea to your computer and use it in GitHub Desktop.
Save dogbert17/c2b2687ec3ebf2f79cfae86ebedc72ea to your computer and use it in GitHub Desktop.
strace -f ./nqp t/nqp/111-spawnprocasync.t
...
[pid 9137] open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC <unfinished ...>
[pid 9133] futex(0x329623c, FUTEX_WAIT_PRIVATE, 7, NULL <unfinished ...>
[pid 9137] <... open resumed> ) = 3
[pid 9135] epoll_ctl(3, EPOLL_CTL_ADD, 10, {EPOLLIN, {u32=10, u64=10}} <unfinished ...>
[pid 9137] read(3, <unfinished ...>
[pid 9135] <... epoll_ctl resumed> ) = 0
[pid 9137] <... read resumed> "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\t\2\0\0\0\0\0"..., 832) = 832
[pid 9135] epoll_ctl(3, EPOLL_CTL_ADD, 12, {EPOLLIN, {u32=12, u64=12}} <unfinished ...>
[pid 9137] fstat(3, <unfinished ...>
[pid 9135] <... epoll_ctl resumed> ) = 0
[pid 9137] <... fstat resumed> {st_mode=S_IFREG|0755, st_size=1868984, ...}) = 0
[pid 9135] epoll_wait(3, <unfinished ...>
[pid 9137] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f267ac8e000
[pid 9137] mmap(NULL, 3971488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f267a6b9000
[pid 9137] mprotect(0x7f267a879000, 2097152, PROT_NONE) = 0
[pid 9137] mmap(0x7f267aa79000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7f267aa79000
[pid 9137] mmap(0x7f267aa7f000, 14752, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f267aa7f000
[pid 9137] close(3) = 0
[pid 9137] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f267ac8d000
[pid 9137] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f267ac8c000
[pid 9137] arch_prctl(ARCH_SET_FS, 0x7f267ac8d700) = 0
[pid 9137] mprotect(0x7f267aa79000, 16384, PROT_READ) = 0
[pid 9137] mprotect(0x55dd3cb2b000, 8192, PROT_READ) = 0
[pid 9137] mprotect(0x7f267aca8000, 4096, PROT_READ) = 0
[pid 9137] munmap(0x7f267ac8f000, 101435) = 0
[pid 9137] getuid() = 1000
[pid 9137] getgid() = 1000
[pid 9137] getpid() = 9137
[pid 9137] rt_sigaction(SIGCHLD, {0x55dd3c91f540, ~[RTMIN RT_1], SA_RESTORER, 0x7f267a6ee4b0}, NULL, 8) = 0
[pid 9137] geteuid() = 1000
[pid 9137] brk(NULL) = 0x55dd3e5f8000
[pid 9137] brk(0x55dd3e619000) = 0x55dd3e619000
[pid 9137] getppid() = 9133
[pid 9137] stat("/home/dogbert/repos/rakudo/nqp", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 9137] stat(".", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
[pid 9137] geteuid() = 1000
[pid 9137] getegid() = 1000
[pid 9137] rt_sigaction(SIGINT, NULL, {SIG_DFL, [], 0}, 8) = 0
[pid 9137] rt_sigaction(SIGINT, {0x55dd3c91f540, ~[RTMIN RT_1], SA_RESTORER, 0x7f267a6ee4b0}, NULL, 8) = 0
[pid 9137] rt_sigaction(SIGQUIT, NULL, {SIG_DFL, [], 0}, 8) = 0
[pid 9137] rt_sigaction(SIGQUIT, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER, 0x7f267a6ee4b0}, NULL, 8) = 0
[pid 9137] rt_sigaction(SIGTERM, NULL, {SIG_DFL, [], 0}, 8) = 0
[pid 9137] rt_sigaction(SIGTERM, {SIG_DFL, ~[RTMIN RT_1], SA_RESTORER, 0x7f267a6ee4b0}, NULL, 8) = 0
[pid 9137] fcntl(1, F_DUPFD, 10) = 10
[pid 9137] close(1) = 0
[pid 9137] fcntl(10, F_SETFD, FD_CLOEXEC) = 0
[pid 9137] dup2(2, 1) = 1
[pid 9137] write(1, "expected output from stderr\n", 28) = 28
[pid 9135] <... epoll_wait resumed> [{EPOLLIN, {u32=12, u64=12}}], 1024, -1) = 1
[pid 9137] dup2(10, 1 <unfinished ...>
[pid 9135] read(12, <unfinished ...>
[pid 9137] <... dup2 resumed> ) = 1
[pid 9135] <... read resumed> "expected output from stderr\n", 128) = 28
[pid 9137] close(10) = 0
[pid 9135] futex(0x329623c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x3296238, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1} <unfinished ...>
[pid 9137] exit_group(0) = ?
[pid 9133] <... futex resumed> ) = 0
[pid 9135] <... futex resumed> ) = 1
[pid 9133] futex(0x32961e8, FUTEX_WAIT_PRIVATE, 2, NULL <unfinished ...>
[pid 9135] futex(0x32961e8, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 9133] <... futex resumed> ) = -1 EAGAIN (Resource temporarily unavailable)
[pid 9135] <... futex resumed> ) = 0
[pid 9133] futex(0x32961e8, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 9137] +++ exited with 0 +++
[pid 9135] epoll_wait(3, <unfinished ...>
[pid 9133] <... futex resumed> ) = 0
[pid 9133] --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=9137, si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
[pid 9135] <... epoll_wait resumed> [{EPOLLIN|EPOLLHUP, {u32=12, u64=12}}, {EPOLLIN|EPOLLHUP, {u32=10, u64=10}}], 1024, -1) = 2
[pid 9133] read(4, <unfinished ...>
[pid 9135] read(12, <unfinished ...>
[pid 9133] <... read resumed> "*", 1) = 1
[pid 9135] <... read resumed> "", 128) = 0
[pid 9133] write(7, "\210\242)\3\0\0\0\0\21\0\0\0\0\0\0\0", 16 <unfinished ...>
[pid 9135] epoll_ctl(3, EPOLL_CTL_DEL, 12, 0x7efefb9b6070 <unfinished ...>
[pid 9133] <... write resumed> ) = 16
[pid 9135] <... epoll_ctl resumed> ) = 0
[pid 9133] write(5, "*", 1 <unfinished ...>
[pid 9135] close(12 <unfinished ...>
[pid 9133] <... write resumed> ) = 1
[pid 9135] <... close resumed> ) = 0
[pid 9133] rt_sigreturn({mask=[]} <unfinished ...>
[pid 9135] read(10, <unfinished ...>
[pid 9133] <... rt_sigreturn resumed> ) = 0
[pid 9135] <... read resumed> "", 128) = 0
[pid 9133] futex(0x329623c, FUTEX_WAIT_PRIVATE, 9, NULL <unfinished ...>
[pid 9135] epoll_ctl(3, EPOLL_CTL_DEL, 10, 0x7efefb9b6070) = 0
[pid 9135] close(10) = 0
[pid 9135] futex(0x329623c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x3296238, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
[pid 9133] <... futex resumed> ) = 0
[pid 9135] epoll_wait(3, <unfinished ...>
[pid 9133] futex(0x32961e8, FUTEX_WAKE_PRIVATE, 1) = 0
[pid 9135] <... epoll_wait resumed> [{EPOLLIN, {u32=6, u64=6}}], 1024, -1) = 1
[pid 9133] futex(0x329623c, FUTEX_WAIT_PRIVATE, 11, NULL <unfinished ...>
[pid 9135] read(6, "\210\242)\3\0\0\0\0\21\0\0\0\0\0\0\0", 512) = 16
[pid 9135] wait4(9137, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG, NULL) = 9137
[pid 9135] futex(0x329623c, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x3296238, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
[pid 9133] <... futex resumed> ) = 0
[pid 9133] futex(0x32961e8, FUTEX_WAKE_PRIVATE, 1 <unfinished ...>
[pid 9135] rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1], <unfinished ...>
[pid 9133] <... futex resumed> ) = 0
[pid 9135] <... rt_sigprocmask resumed> [], 8) = 0
[pid 9133] write(1, "ok 3 - called the ready callback"..., 38 <unfinished ...>
[pid 9135] read(4, ok 3 - called the ready callback once
<unfinished ...>
[pid 9133] <... write resumed> ) = 38
[pid 9135] <... read resumed> "*", 1) = 1
[pid 9133] write(1, "ok 4 - got the correct output on"..., 40 <unfinished ...>
[pid 9135] rt_sigaction(SIGCHLD, {SIG_DFL, [], SA_RESTORER, 0x7efefd6544b0}, ok 4 - got the correct output on stderr
<unfinished ...>
[pid 9133] <... write resumed> ) = 40
[pid 9135] <... rt_sigaction resumed> NULL, 8) = 0
[pid 9133] close(4 <unfinished ...>
[pid 9135] write(5, "*", 1 <unfinished ...>
[pid 9133] <... close resumed> ) = 0
[pid 9135] <... write resumed> ) = -1 EPIPE (Broken pipe)
[pid 9133] close(5 <unfinished ...>
[pid 9135] rt_sigprocmask(SIG_UNBLOCK, [ABRT], <unfinished ...>
[pid 9133] <... close resumed> ) = 0
[pid 9135] <... rt_sigprocmask resumed> NULL, 8) = 0
[pid 9133] exit_group(0) = ?
[pid 9135] tgkill(9133, 9135, SIGABRT <unfinished ...>
[pid 9134] +++ exited with 0 +++
[pid 9135] +++ exited with 0 +++
+++ exited with 0 +++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment