|
Message-ID: <CAA3hR4cev+SDCyE3pTu31woZ4JFOXbAnaup++VAzA4ZmdvjB1g@mail.gmail.com>
Date: Thu, 4 Oct 2018 16:54:43 +0200
From: Rabbitstack <rabbitstack7@...il.com>
To: musl@...ts.openwall.com
Subject: Re: setrlimit hangs the process
Hi,
Sorry for the delay. I managed to build a minimal example that only uses
gobpf to load ebpf program into the kernel. Surprisingly, it works fine (it
doesn't hang the process). Here I attach the full strace output:
execve("./muslrlimit/musltest", ["./muslrlimit/musltest"], 0x7ffbffff96b0
/* 65 vars */) = 0
arch_prctl(ARCH_SET_FS, 0xe79100) = 0
set_tid_address(0xe79138) = 4454
brk(NULL) = 0x2e7c000
brk(0x2e7d000) = 0x2e7d000
sched_getaffinity(0, 8192, [0, 1, 2, 3]) = 40
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbff6c1000
mmap(0xc000000000, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xc000000000
mmap(0xc000000000, 67108864, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 33554432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7efbfd6c1000
mmap(NULL, 2162688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbfd4b1000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd4a1000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd491000
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc000002000, ss_flags=0, ss_size=32768}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettid() = 4454
rt_sigaction(SIGHUP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGINT, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGILL, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGILL, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGTRAP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGTRAP, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGABRT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGBUS, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGFPE, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGUSR1, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGUSR1, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGUSR2, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGUSR2, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGALRM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGSTKFLT, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGCHLD, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGCHLD, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGURG, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGURG, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGXCPU, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGXFSZ, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGVTALRM, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGPROF, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGPROF, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGWINCH, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGWINCH, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGIO, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGIO, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGPWR, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGPWR, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGSYS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGSYS, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_1, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_2, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_2, {sa_handler=0x4589b0, sa_mask=~[],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x458a70}, NULL, 8) = 0
rt_sigaction(SIGRT_3, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_3, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_4, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_4, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_5, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_5, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_6, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_6, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_7, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_7, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_8, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_8, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_9, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_9, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_10, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_10, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_11, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_11, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_12, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_12, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_13, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_13, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_14, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_14, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_15, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_15, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_16, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_16, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_17, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_17, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_18, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_18, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_19, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_19, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_20, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_20, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_21, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_21, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_22, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_22, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_23, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_23, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_24, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_24, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_25, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_25, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_26, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_26, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_27, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_27, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_28, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_28, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_29, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_29, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_30, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_30, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_31, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_31, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigaction(SIGRT_32, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_32, {sa_handler=0x4589b0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x7dff74}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd47a000
mprotect(0x7efbfd47c000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd490eb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd490f20, tls=0x7efbfd490ee8,
child_tidptr=0x7efbfd490f20) = 4455
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd463000
mprotect(0x7efbfd465000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd479eb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd479f20, tls=0x7efbfd479ee8,
child_tidptr=0x7efbfd479f20) = 4456
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd44c000
mprotect(0x7efbfd44e000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd462eb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd462f20, tls=0x7efbfd462ee8,
child_tidptr=0x7efbfd462f20) = 4457
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0xc000046bc0, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd435000
mprotect(0x7efbfd437000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd44beb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd44bf20, tls=0x7efbfd44bee8,
child_tidptr=0x7efbfd44bf20) = 4458
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/tmp/alpine/muslrlimit/musltest",
128) = 31
fcntl(0, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbfd3f5000
fcntl(1, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fcntl(2, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
openat(AT_FDCWD, "/proc/sys/net/core/somaxconn", O_RDONLY|O_CLOEXEC) = 3
epoll_create1(EPOLL_CLOEXEC) = 4
epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET,
{u32=4248805120, u64=139620750696192}}) = 0
fcntl(3, F_GETFL) = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
read(3, "128\n", 65536) = 4
read(3, "", 65532) = 0
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc00009bc74) = 0
close(3) = 0
openat(AT_FDCWD, "/proc/version_signature", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/proc/version", O_RDONLY|O_CLOEXEC) = 3
epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET,
{u32=4248805120, u64=139620750696192}}) = 0
fcntl(3, F_GETFL) = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "Linux version 4.17.5-1-ARCH (bui"..., 512) = 131
read(3, "", 1405) = 0
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc0001238e4) = 0
close(3) = 0
uname({sysname="Linux", nodename="archrabbit", ...}) = 0
mmap(NULL, 1439992, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbfd295000
openat(AT_FDCWD, "/proc/version_signature", O_RDONLY|O_CLOEXEC) = -1 ENOENT
(No such file or directory)
openat(AT_FDCWD, "/proc/version", O_RDONLY|O_CLOEXEC) = 3
epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET,
{u32=4248805120, u64=139620750696192}}) = 0
fcntl(3, F_GETFL) = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(3, "Linux version 4.17.5-1-ARCH (bui"..., 512) = 131
read(3, "", 1405) = 0
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc000123544) = 0
close(3) = 0
uname({sysname="Linux", nodename="archrabbit", ...}) = 0
bpf(BPF_MAP_CREATE, {map_type=BPF_MAP_TYPE_PERF_EVENT_ARRAY, key_size=4,
value_size=4, max_entries=1024, map_flags=0, inner_map_fd=0, map_name="",
map_ifindex=0}, 48) = 3
bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_KPROBE, insn_cnt=45,
insns=0xc0001de180, license="GPL", log_level=1, log_size=524288,
log_buf="", kern_version=KERNEL_VERSION(4, 17, 5), prog_flags=0}, 48) = -1
EPERM (Operation not permitted)
prlimit64(0, RLIMIT_MEMLOCK, NULL, {rlim_cur=RLIM64_INFINITY,
rlim_max=RLIM64_INFINITY}) = 0
rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_BLOCK, ~[], NULL, 8) = 0
rt_sigaction(SIGRT_2, {sa_handler=0x7e3132, sa_mask=~[],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7dff74}, NULL, 8) = 0
getpid() = 4454
gettid() = 4454
open("/proc/self/task", O_RDONLY|O_CLOEXEC|O_DIRECTORY) = 5
fcntl(5, F_SETFD, FD_CLOEXEC) = 0
kill(4454, SIGRT_2) = 0
kill(4454, SIGRT_2) = 0
kill(4454, SIGRT_2) = 0
kill(4454, SIGRT_2) = 0
getdents64(5, /* 7 entries */, 2048) = 168
getdents64(5, /* 0 entries */, 2048) = 0
close(5) = 0
futex(0x7efbfd44b75c, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7efbfd46265c, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7efbfd47965c, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7efbfd49075c, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigaction(SIGRT_2, {sa_handler=SIG_IGN, sa_mask=~[],
sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x7dff74}, NULL, 8) = 0
prlimit64(0, RLIMIT_MEMLOCK, {rlim_cur=RLIM64_INFINITY,
rlim_max=RLIM64_INFINITY}, NULL) = 0
futex(0x7efbfd44b75c, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7efbfd46265c, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7efbfd47965c, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7efbfd49075c, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xe79050, FUTEX_WAKE_PRIVATE, 2147483647) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
bpf(BPF_PROG_LOAD, {prog_type=BPF_PROG_TYPE_KPROBE, insn_cnt=45,
insns=0xc0001de180, license="GPL", log_level=1, log_size=524288,
log_buf="", kern_version=KERNEL_VERSION(4, 17, 5), prog_flags=0}, 48) = -1
EPERM (Operation not permitted)
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, "\33[31mERRO\33[0m[0000] unable to in"..., 143) = 143
exit_group(0) = ?
+++ exited with 0 +++
Conversely, the offending binary does not even issue the bpf syscall, which
is quite strange. Once I remove ebpf code from the program, it does start
fine, so I'm prety sure ebpf prog loading is the culpirt here. Here's
strace output:
execve("./agent", ["./agent", "--token=1"], 0x7ffbffff96a8 /* 65 vars */) =
0
arch_prctl(ARCH_SET_FS, 0x2d0d9a0) = 0
set_tid_address(0x2d0d9d8) = 4361
brk(NULL) = 0x4d11000
brk(0x4d12000) = 0x4d12000
sched_getaffinity(0, 8192, [0, 1, 2, 3]) = 40
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbff6c1000
mmap(0xc000000000, 67108864, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xc000000000
mmap(0xc000000000, 67108864, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xc000000000
mmap(NULL, 33554432, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0x7efbfd6c1000
mmap(NULL, 2162688, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbfd4b1000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd4a1000
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd491000
rt_sigprocmask(SIG_SETMASK, NULL, [], 8) = 0
sigaltstack(NULL, {ss_sp=NULL, ss_flags=SS_DISABLE, ss_size=0}) = 0
sigaltstack({ss_sp=0xc000002000, ss_flags=0, ss_size=32768}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
gettid() = 4361
rt_sigaction(SIGHUP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
rt_sigaction(SIGHUP, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGINT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGINT, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGQUIT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGQUIT, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGILL, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGILL, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGTRAP, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGTRAP, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGABRT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGABRT, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGBUS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGBUS, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGFPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGFPE, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGUSR1, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGUSR1, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGSEGV, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGSEGV, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGUSR2, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGUSR2, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGPIPE, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGPIPE, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGALRM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGALRM, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGTERM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGTERM, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGSTKFLT, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGSTKFLT, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGCHLD, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGCHLD, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGURG, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGURG, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGXCPU, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGXCPU, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGXFSZ, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGXFSZ, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGVTALRM, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGVTALRM, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGPROF, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGPROF, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGWINCH, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGWINCH, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGIO, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGIO, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGPWR, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGPWR, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGSYS, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8)
= 0
rt_sigaction(SIGSYS, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRTMIN, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_1, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_2, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_2, {sa_handler=0x45dea0, sa_mask=~[],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x45df60}, NULL, 8) = 0
rt_sigaction(SIGRT_3, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_3, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_4, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_4, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_5, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_5, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_6, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_6, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_7, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_7, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_8, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_8, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_9, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_9, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_10, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_10, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_11, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_11, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_12, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_12, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_13, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_13, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_14, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_14, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_15, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_15, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_16, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_16, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_17, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_17, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_18, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_18, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_19, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_19, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_20, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_20, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_21, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_21, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_22, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_22, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_23, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_23, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_24, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_24, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_25, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_25, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_26, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_26, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_27, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_27, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_28, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_28, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_29, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_29, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_30, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_30, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_31, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_31, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigaction(SIGRT_32, NULL, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0},
8) = 0
rt_sigaction(SIGRT_32, {sa_handler=0x45dea0, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RT_1 RT_2], NULL, 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd47a000
mprotect(0x7efbfd47c000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd490eb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd490f20, tls=0x7efbfd490ee8,
child_tidptr=0x7efbfd490f20) = 4362
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd463000
mprotect(0x7efbfd465000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd479eb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd479f20, tls=0x7efbfd479ee8,
child_tidptr=0x7efbfd479f20) = 4363
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd435000
mprotect(0x7efbfd437000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd44beb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd44bf20, tls=0x7efbfd44bee8,
child_tidptr=0x7efbfd44bf20) = 4365
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd41e000
mprotect(0x7efbfd420000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd434eb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd434f20, tls=0x7efbfd434ee8,
child_tidptr=0x7efbfd434f20) = 4366
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
readlinkat(AT_FDCWD, "/proc/self/exe", "/tmp/alpine/agent", 128) = 27
fcntl(0, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbfd3de000
fcntl(1, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fcntl(2, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
futex(0xc000086140, FUTEX_WAKE_PRIVATE, 1) = 1
openat(AT_FDCWD, "/sys/kernel/mm/hugepages", O_RDONLY|O_CLOEXEC) = 3
epoll_create1(EPOLL_CLOEXEC) = 4
epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET,
{u32=4248710912, u64=139620750601984}}) = -1 EPERM (Operation not permitted)
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc0000d3b74) = -1 EPERM (Operation not
permitted)
getdents64(3, /* 4 entries */, 8192) = 128
getdents64(3, /* 0 entries */, 8192) = 0
lstat("/sys/kernel/mm/hugepages/hugepages-2048kB", {st_mode=S_IFDIR|0755,
st_size=0, ...}) = 0
lstat("/sys/kernel/mm/hugepages/hugepages-1048576kB",
{st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
close(3) = 0
openat(AT_FDCWD, "/proc/sys/net/core/somaxconn", O_RDONLY|O_CLOEXEC) = 3
epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN|EPOLLOUT|EPOLLRDHUP|EPOLLET,
{u32=4248710912, u64=139620750601984}}) = 0
fcntl(3, F_GETFL) = 0x8000 (flags
O_RDONLY|O_LARGEFILE)
fcntl(3, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 0
read(3, "128\n", 65536) = 4
read(3, "", 65532) = 0
epoll_ctl(4, EPOLL_CTL_DEL, 3, 0xc0000d3bfc) = 0
close(3) = 0
getrandom("\x61\x80\xec\x0d\xa6\xac\xb2\xb2", 8, 0) = 8
ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0
mmap(NULL, 1439992, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbfd27e000
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x2cdc340, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0xc000060f40, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060f40, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060f40, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060f40, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060f40, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbfd227000
getpid() = 4361
futex(0xc000060f40, FUTEX_WAKE_PRIVATE, 1) = 1
uname({sysname="Linux", nodename="archrabbit", ...}) = 0
getuid() = 1000
open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
readv(3, [{iov_base="", iov_len=0},
{iov_base="root:x:0:0:root:/root:/bin/bash\n"..., iov_len=1024}], 2) = 1024
lseek(3, -105, SEEK_CUR) = 919
close(3) = 0
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc000060840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x2cdb4c0, FUTEX_WAIT_PRIVATE, 0, {tv_sec=0, tv_nsec=100000}) = -1
ETIMEDOUT (Connection timed out)
epoll_pwait(4, [], 128, 0, NULL, 2) = 0
futex(0xc000060bc0, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigprocmask(SIG_SETMASK, ~[RTMIN RT_1 RT_2], [], 8) = 0
mmap(NULL, 94208, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd1f9000
mprotect(0x7efbfd1fb000, 86016, PROT_READ|PROT_WRITE) = 0
clone(child_stack=0x7efbfd20feb8,
flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID|0x400000,
parent_tidptr=0x7efbfd20ff20, tls=0x7efbfd20fee8,
child_tidptr=0x7efbfd20ff20) = 4369
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x7efbfd1e9000
futex(0xc0003db9c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc0003db9c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0xc0003db9c0, FUTEX_WAKE_PRIVATE, 1) = 1
sched_yield() = 0
futex(0x2cdb3f0, FUTEX_WAKE_PRIVATE, 1) = 0
mmap(NULL, 262144, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0)
= 0x7efbfd169000
futex(0xc00036a4c0, FUTEX_WAKE_PRIVATE, 1) = 1
getuid() = 1000
getgid() = 1000
futex(0xc00036a4c0, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigprocmask(SIG_SETMASK, ~[HUP INT QUIT ILL TRAP ABRT BUS FPE SEGV TERM
STKFLT CHLD PROF SYS RTMIN RT_1], NULL, 8) = 0
futex(0xc00036a4c0, FUTEX_WAKE_PRIVATE, 1) = 1
rt_sigprocmask(SIG_SETMASK, ~[HUP INT QUIT ILL TRAP ABRT BUS FPE SEGV TERM
STKFLT CHLD PROF SYS RTMIN RT_1], NULL, 8) = 0
futex(0xc00036a4c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x2cdc340, FUTEX_WAIT_PRIVATE, 0, NULL) = ? ERESTARTSYS (To be
restarted if SA_RESTART is set)
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
futex(0x2d0e6e0, FUTEX_WAKE_PRIVATE, 1) = 0
rt_sigreturn({mask=~[HUP INT QUIT ILL TRAP ABRT BUS FPE KILL SEGV TERM
STKFLT CHLD STOP PROF SYS RTMIN RT_1]}) = 202
futex(0x2cdc340, FUTEX_WAIT_PRIVATE, 0, NULL) = ? ERESTARTSYS (To be
restarted if SA_RESTART is set)
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
rt_sigreturn({mask=~[HUP INT QUIT ILL TRAP ABRT BUS FPE KILL SEGV TERM
STKFLT CHLD STOP PROF SYS RTMIN RT_1]}) = 202
futex(0x2cdc340, FUTEX_WAIT_PRIVATE, 0, NULL) = ? ERESTARTSYS (To be
restarted if SA_RESTART is set)
--- SIGINT {si_signo=SIGINT, si_code=SI_KERNEL} ---
rt_sigreturn({mask=~[HUP INT QUIT ILL TRAP ABRT BUS FPE KILL SEGV TERM
STKFLT CHLD STOP PROF SYS RTMIN RT_1]}) = 202
futex(0x2cdc340, FUTEX_WAIT_PRIVATE, 0, NULL) = ? ERESTARTSYS (To be
restarted if SA_RESTART is set)
--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=4392, si_uid=1000}
---
rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0
gettid() = 4361
tkill(4361, SIGTERM) = 0
--- SIGTERM {si_signo=SIGTERM, si_code=SI_TKILL, si_pid=4361, si_uid=1000}
---
rt_sigaction(SIGTERM, {sa_handler=SIG_DFL, sa_mask=~[RTMIN RT_1 RT_2],
sa_flags=SA_RESTORER|SA_ONSTACK|SA_RESTART|SA_SIGINFO,
sa_restorer=0x14b7849}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [TERM], NULL, 8) = 0
gettid() = 4361
tkill(4361, SIGTERM) = 0
--- SIGTERM {si_signo=SIGTERM, si_code=SI_TKILL, si_pid=4361, si_uid=1000}
---
+++ killed by SIGTERM +++
Hope this will be helpful
Regards,
Nedim
On Tue, Sep 25, 2018 at 6:39 PM Rich Felker <dalias@...c.org> wrote:
> On Tue, Sep 25, 2018 at 05:36:05PM +0200, Szabolcs Nagy wrote:
> > * Rabbitstack <rabbitstack7@...il.com> [2018-09-25 16:54:37 +0200]:
> > > Sorry. Let me describe the problem in more detail.
> > >
> > > The process only hangs when launched without root privileges on the
> host
> > > (Arch Linux x64 with kernel 4.17.5-1) where Alpine docker container is
> > > running. Once with root privileges, it starts up correctly (but this is
> > > obvious since it doesn't hit setrlimit call). The odd side is that on
> other
> > > hosts it hangs even when started with root. No error messages so far.
> > > Strace output:
> > >
> > > $ sudo strace -p 9285
> > >
> > > futex(0x2cddfc0, FUTEX_WAIT_PRIVATE, 0, NULL
> > >
> > > $ sudo strace -f -p 9285
> > >
> > > .....
> > > [pid 9287] getdents64(10, /* 14 entries */, 2048) = 336
> > > [pid 9287] tgkill(9285, 9285, SIGRT_2) = 0
> > > [pid 9287] futex(0x7efbff70008c, FUTEX_LOCK_PI_PRIVATE,
> > > {tv_sec=1537887068, tv_nsec=51442144}) = -1 ETIMEDOUT (Connection
> timed out)
> >
> > it looks like musl tries to sync a setuid call across
> > all threads (which is necessary since the linux syscall
> > only changes the uid for the current thread instead of
> > all threads so you can end up with different privileges
> > in the same address space which is dangerous as well as
> > non-posix conform setuid behaviour)
> >
> > it's possible that the setuid syncing is somehow wrong
> > in musl, but it's more likely that there are threads
> > that are not created by the c runtime (but from go) and
> > thus the sync cannot possibly work.
>
> It actually can kinda work with such threads. musl's stop-the-world
> __synccall pokes all kernel-level threads in the same process (thread
> group) as the caller using signals and /proc/self/task to ensure it
> didn't miss any, so it will work as long as they haven't blocked
> libc-internal signals. There may be problems with the thread pointer
> being invalid, though. The __synccall framework itself does not use
> the TCB, but other stuff in the callback might. This should probably
> be fixed.
>
> > so try to look for where set*id is called and ensure it
> > is not called or called before any threads are created
> > (or at least before any go threads are created)
> >
> > note that syscall.Set*id from go does not work either,
> > it does not sync the threads (which is dangerously
> > broken for a runtime that's always multi-threaded).
>
> Yep, that's unsafe to use. Any use is likely exploitable.
>
> Rich
>
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.