Related
I'm on a Linux System and recently enabled SELinux in permissive and enforcing mode.
While executing the login command in a shell with correct username and password I get a "Permission denied" error message on execve() system call.
Debugging all system calls with strace leads to the following output.
...
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a3000
set_tls(0x400a2d90) = 0
mprotect(0x40201000, 8192, PROT_READ) = 0
mprotect(0x40364000, 4096, PROT_READ) = 0
mprotect(0x402e4000, 4096, PROT_READ) = 0
mprotect(0x402b8000, 4096, PROT_READ) = 0
mprotect(0x4021d000, 4096, PROT_READ) = 0
mprotect(0x400aa000, 4096, PROT_READ) = 0
munmap(0x4009e000, 9811) = 0
statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={val=[0, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={val=[0, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
stat64("/sys/fs/selinux", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
brk(NULL) = 0x907000
brk(0x928000) = 0x928000
access("/etc/selinux/config", F_OK) = 0
getuid32() = 0
geteuid32() = 0
open("/dev/null", O_RDWR) = 3
close(3) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
rt_sigaction(SIGALRM, {sa_handler=0x400b76ed, sa_mask=[ALRM], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x4013cae1}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=60, tv_usec=0}}, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=0, tv_usec=0}}) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
fstat64(0, {st_mode=S_IFCHR|0622, st_rdev=makedev(136, 1), ...}) = 0
readlink("/proc/self/fd/0", "/dev/pts/1", 126) = 10
stat64("/dev/pts/1", {st_mode=S_IFCHR|0622, st_rdev=makedev(136, 1), ...}) = 0
ioctl(0, TCFLSH, TCIFLUSH) = 0
uname({sysname="Linux", nodename="node", ...}) = 0
fstat64(1, {st_mode=S_IFCHR|0622, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4009e000
write(1, "node login: ", node login: ) = 12
fstat64(0, {st_mode=S_IFCHR|0622, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4009f000
read(0,
"\n", 1024) = 5
open("/etc/passwd", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=63, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a0000
read(3, ""..., 1024) = 63
close(3) = 0
munmap(0x400a0000, 4096) = 0
open("/etc/securetty", O_RDONLY) = -1 ENOENT (No such file or directory)
ioctl(0, TCFLSH, TCIFLUSH) = 0
write(1, "Password: ", 10Password: ) = 10
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon -echo ...}) = 0
rt_sigaction(SIGINT, {sa_handler=0x400f43b9, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x4013cae1}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x4013cae1}, NULL, 8) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig icanon echo ...}) = 0
write(1, "\n", 1
) = 1
open("/proc/sys/crypto/fips_enabled", O_RDONLY) = -1 ENOENT (No such file or directory)
setitimer(ITIMER_REAL, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=0, tv_usec=0}}, {it_interval={tv_sec=0, tv_usec=0}, it_value={tv_sec=57, tv_usec=707306}}) = 0
open("/etc/selinux/config", O_RDONLY|O_CLOEXEC) = 3
fcntl64(3, F_GETFD) = 0x1 (flags FD_CLOEXEC)
fstat64(3, {st_mode=S_IFREG|0644, st_size=586, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a0000
read(3, "# This file controls the state o"..., 1024) = 586
read(3, "", 1024) = 0
close(3) = 0
munmap(0x400a0000, 4096) = 0
open("/proc/thread-self/attr/current", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
gettid() = 970
open("/proc/self/task/970/attr/current", O_RDONLY|O_CLOEXEC) = 3
read(3, "system_u:system_r:init_t\0", 4095) = 25
close(3) = 0
access("/var/run/setrans/.setrans-unix", F_OK) = -1 ENOENT (No such file or directory)
open("/sys/fs/selinux/user", O_RDWR|O_CLOEXEC) = 3
write(3, "system_u:system_r:init_t root", 29) = 29
read(3, "5\0root:staff_r:shutdown_t\0root:s"..., 4095) = 127
close(3) = 0
open("/etc/selinux/refpolicy/contexts/users/root", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=630, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a0000
read(3, "system_r:crond_t\tunconfined_r:un"..., 1024) = 630
read(3, "", 1024) = 0
close(3) = 0
munmap(0x400a0000, 4096) = 0
open("/etc/selinux/refpolicy/contexts/default_contexts", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=951, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a0000
read(3, "system_r:crond_t\tuser_r:user_t s"..., 1024) = 951
read(3, "", 1024) = 0
close(3) = 0
munmap(0x400a0000, 4096) = 0
open("/etc/selinux/refpolicy/contexts/failsafe_context", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=18, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a0000
read(3, "sysadm_r:sysadm_t\n", 1024) = 18
close(3) = 0
munmap(0x400a0000, 4096) = 0
open("/sys/fs/selinux/context", O_RDWR|O_CLOEXEC) = 3
write(3, "root:sysadm_r:sysadm_t\0", 23) = 23
close(3) = 0
getxattr("/dev/pts/1", "security.selinux", "system_u:object_r:devpts_t", 255) = 27
open("/sys/fs/selinux/relabel", O_RDWR|O_CLOEXEC) = 3
write(3, "root:sysadm_r:sysadm_t system_u:"..., 52) = 52
read(3, "root:object_r:devpts_t\0", 4095) = 23
close(3) = 0
setxattr("/dev/pts/1", "security.selinux", "root:object_r:devpts_t", 23, 0) = 0
fchown32(0, 0, 0) = 0
fchmod(0, 0600) = 0
open("/etc/group", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=10, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a0000
read(3, "root:x:0:\n", 1024) = 10
read(3, "", 1024) = 0
close(3) = 0
munmap(0x400a0000, 4096) = 0
setgroups32(1, [0]) = 0
setgid32(0) = 0
setuid32(0) = 0
chdir("/root") = 0
access(".hushlogin", F_OK) = -1 ENOENT (No such file or directory)
open("/etc/motd", O_RDONLY) = -1 ENOENT (No such file or directory)
gettimeofday({tv_sec=1542874616, tv_usec=399369}, NULL) = 0
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400a0000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10\0\0\0\0"..., 1024) = 1024
_llseek(3, 1257, [2281], SEEK_CUR) = 0
read(3, "\nCET-1CEST,M3.5.0,M10.5.0/3\n", 1024) = 28
close(3) = 0
munmap(0x400a0000, 4096) = 0
getpid() = 970
socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = -1 EPROTOTYPE (Protocol wrong type for socket)
close(3) = 0
socket(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0) = 3
connect(3, {sa_family=AF_UNIX, sun_path="/dev/log"}, 110) = 0
send(3, "<38>Nov 22 09:16:56 login[970]: "..., 54, MSG_NOSIGNAL) = 54
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x4013cae1}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x4013cae1}, 8) = 0
open("/proc/thread-self/attr/exec", O_RDWR|O_CLOEXEC) = -1 ENOENT (No such file or directory)
gettid() = 970
open("/proc/self/task/970/attr/exec", O_RDWR|O_CLOEXEC) = 4
write(4, "root:sysadm_r:sysadm_t\0", 23) = 23
close(4) = 0
execve("/bin/sh", ["-sh"], 0x907b30 /* 6 vars */) = -1 EACCES (Permission denied)
write(2, "login: can't execute '/bin/sh': "..., 50login: can't execute '/bin/sh': Permission denied
) = 50
exit_group(1) = ?
+++ exited with 1 +++
The error message disappears with disabled SELinux and the login command succeeds. See output below.
...
send(3, "<38>Nov 23 16:25:16 login[883]: "..., 54, MSG_NOSIGNAL) = 54
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[INT], sa_flags=SA_RESTORER|SA_RESTART, sa_restorer=0x400fcae1}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x400fcae1}, 8) = 0
execve("/bin/sh", ["-sh"], 0x32a3d0 /* 6 vars */) = 0
brk(NULL) = 0x1e14000
...
Another test trying to run ssh in a specific context will also lead to a "Permission denied" message.
~ # runcon system_u:system_r:sshd_t /usr/sbin/sshd
runcon: can't execute '/usr/sbin/sshd': Permission denied
~ # strace runcon system_u:system_r:sshd_t /usr/sbin/sshd
execve("/usr/bin/runcon", ["runcon", "system_u:system_r:sshd_t", "/usr/sbin/sshd"], 0xbea60de8 /* 12 vars */) = 0
brk(NULL) = 0x120b000
uname({sysname="Linux", nodename="node", ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400cb000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=9811, ...}) = 0
mmap2(NULL, 9811, PROT_READ, MAP_PRIVATE, 3, 0) = 0x400cd000
close(3) = 0
...
various lib loading with no error
...
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x400d2000
set_tls(0x400d1d90) = 0
mprotect(0x40230000, 8192, PROT_READ) = 0
mprotect(0x40393000, 4096, PROT_READ) = 0
mprotect(0x40313000, 4096, PROT_READ) = 0
mprotect(0x402e7000, 4096, PROT_READ) = 0
mprotect(0x4024c000, 4096, PROT_READ) = 0
mprotect(0x400d9000, 4096, PROT_READ) = 0
munmap(0x400cd000, 9811) = 0
statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={val=[0, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
statfs("/sys/fs/selinux", {f_type=SELINUX_MAGIC, f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={val=[0, 0]}, f_namelen=255, f_frsize=4096, f_flags=ST_VALID|ST_RELATIME}) = 0
stat64("/sys/fs/selinux", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
brk(NULL) = 0x120b000
brk(0x122c000) = 0x122c000
access("/etc/selinux/config", F_OK) = 0
access("/var/run/setrans/.setrans-unix", F_OK) = -1 ENOENT (No such file or directory)
open("/sys/fs/selinux/context", O_RDWR|O_CLOEXEC) = 3
write(3, "system_u:system_r:sshd_t\0", 25) = 25
close(3) = 0
open("/proc/thread-self/attr/exec", O_RDWR|O_CLOEXEC) = -1 ENOENT (No such file or directory)
gettid() = 976
open("/proc/self/task/976/attr/exec", O_RDWR|O_CLOEXEC) = 3
write(3, "system_u:system_r:sshd_t\0", 25) = 25
close(3) = 0
execve("/usr/sbin/sshd", ["/usr/sbin/sshd"], 0xbec8dde4 /* 12 vars */) = -1 EACCES (Permission denied)
write(2, "runcon: can't execute '/usr/sbin"..., 58runcon: can't execute '/usr/sbin/sshd': Permission denied
) = 58
exit_group(126) = ?
+++ exited with 126 +++
How can I get this error resolved while SELinux is enabled?
Edit:
After investigating the sys_execve() implementation the error should occur in function do_open_exec() (https://elixir.bootlin.com/linux/v3.18/source/fs/exec.c#L750).
I'm not sure which file access triggers the error.
Found a solution to this problem.
My root partition was mounted with nosuid flag. As mentioned in this blog post https://danwalsh.livejournal.com/68723.html, the process couldn't change its domain.
Mounting the partition without nosuid solved this problem.
When I strace this:
#include <stdio.h>
#include <time.h>
int main()
{
struct timespec ts;
fprintf(stderr, "start!\n");
clock_gettime(CLOCK_REALTIME, &ts);
fprintf(stderr, "realtime %lu %lu\n", ts.tv_sec, ts.tv_nsec);
clock_gettime(CLOCK_MONOTONIC, &ts);
fprintf(stderr, "monotonic %lu %lu\n", ts.tv_sec, ts.tv_nsec);
return 0;
}
I get this:
execve("/tmp/x", ["/tmp/x"], [/* 72 vars */]) = 0
brk(NULL) = 0x13d0000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fed9a0d1000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=126501, ...}) = 0
mmap(NULL, 126501, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fed9a0b2000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\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
fstat(3, {st_mode=S_IFREG|0755, st_size=1864888, ...}) = 0
mmap(NULL, 3967488, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7fed99ae5000
mprotect(0x7fed99ca5000, 2093056, PROT_NONE) = 0
mmap(0x7fed99ea4000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1bf000) = 0x7fed99ea4000
mmap(0x7fed99eaa000, 14848, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fed99eaa000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fed9a0b1000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fed9a0b0000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fed9a0af000
arch_prctl(ARCH_SET_FS, 0x7fed9a0b0700) = 0
mprotect(0x7fed99ea4000, 16384, PROT_READ) = 0
mprotect(0x600000, 4096, PROT_READ) = 0
mprotect(0x7fed9a0d3000, 4096, PROT_READ) = 0
munmap(0x7fed9a0b2000, 126501) = 0
write(2, "start!\n", 7start!
) = 7
write(2, "realtime 1488919932 97097045\n", 29realtime 1488919932 97097045
) = 29
write(2, "monotonic 258985 170149836\n", 27monotonic 258985 170149836
) = 27
exit_group(0) = ?
+++ exited with 0 +++
There doesn't seem to be a system call involved in producing either CLOCK_REALTIME or CLOCK_MONOTONIC values. How is this implemented? I tried to step through it in assembler but I must've not noticed the critical part because I can't figure out how it's done.
This is a virtual system call. That is, calling it does not require switching to the kernel mode -- it is executed in user mode to improve performance. If you have ever wondered what does linux-vdso.so.1 mean in the ldd output, it is where these virtual system calls are implemented. You can learn more here.
I was reading http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html#syscalls when I found that getaddrinfo() is listed under the System Calls or Bust chapter.
I wanted to check if it really is a system call on my Debian 8 Linux system. But I can't find any evidence of it being a system call.
For example, I wrote a program foo.c.
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
int main()
{
struct addrinfo *ai;
int ret;
ret = getaddrinfo("localhost", "http", NULL, &ai);
printf("ret: %d\n", ret);
return 0;
}
When I compile and run this program with strace, I don't see any call to getaddrinfo().
$ gcc foo.c && strace ./a.out
execve("./a.out", ["./a.out"], [/* 40 vars */]) = 0
brk(0) = 0x1190000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a59000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=76177, ...}) = 0
mmap(NULL, 76177, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f99f5a46000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0P\34\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1738176, ...}) = 0
mmap(NULL, 3844640, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99f5490000
mprotect(0x7f99f5632000, 2093056, PROT_NONE) = 0
mmap(0x7f99f5831000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a1000) = 0x7f99f5831000
mmap(0x7f99f5837000, 14880, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f99f5837000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a45000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a44000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a43000
arch_prctl(ARCH_SET_FS, 0x7f99f5a44700) = 0
mprotect(0x7f99f5831000, 16384, PROT_READ) = 0
mprotect(0x7f99f5a5b000, 4096, PROT_READ) = 0
munmap(0x7f99f5a46000, 76177) = 0
socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE) = 3
bind(3, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(3, {sa_family=AF_NETLINK, pid=24206, groups=00000000}, [12]) = 0
sendto(3, "\24\0\0\0\26\0\1\3c\350DX\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"L\0\0\0\24\0\2\0c\350DX\216^\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 252
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"H\0\0\0\24\0\2\0c\350DX\216^\0\0\n\200\200\376\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 216
recvmsg(3, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0c\350DX\216^\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
brk(0) = 0x1190000
brk(0x11b1000) = 0x11b1000
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 4
connect(4, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(4) = 0
close(3) = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/nsswitch.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=529, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# /etc/nsswitch.conf\n#\n# Example"..., 4096) = 529
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=76177, ...}) = 0
mmap(NULL, 76177, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f99f5a46000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/tls/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/tls", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu/x86_64", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
open("/usr/lib/x86_64-linux-gnu/tls/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls/x86_64", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/tls/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/tls", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu/x86_64", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64-linux-gnu/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64-linux-gnu", {st_mode=S_IFDIR|0755, st_size=49152, ...}) = 0
open("/lib/tls/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls/x86_64", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/lib/tls/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/tls", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/lib/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib/x86_64", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/lib/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/usr/lib/tls/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls/x86_64", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/usr/lib/tls/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/tls", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/usr/lib/x86_64/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib/x86_64", 0x7ffee66a14d0) = -1 ENOENT (No such file or directory)
open("/usr/lib/libnss_db.so.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
stat("/usr/lib", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
munmap(0x7f99f5a46000, 76177) = 0
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=76177, ...}) = 0
mmap(NULL, 76177, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f99f5a46000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libnss_files.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\240\"\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=47712, ...}) = 0
mmap(NULL, 2144392, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f99f5284000
mprotect(0x7f99f528f000, 2093056, PROT_NONE) = 0
mmap(0x7f99f548e000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xa000) = 0x7f99f548e000
close(3) = 0
mprotect(0x7f99f548e000, 4096, PROT_READ) = 0
munmap(0x7f99f5a46000, 76177) = 0
open("/etc/services", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19605, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# Network services, Internet sty"..., 4096) = 4096
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
open("/etc/services", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19605, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# Network services, Internet sty"..., 4096) = 4096
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
open("/etc/services", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19605, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# Network services, Internet sty"..., 4096) = 4096
read(3, "\t\t# IPX\nipx\t\t213/udp\nimap3\t\t220/"..., 4096) = 4096
read(3, "nessus\t\t1241/tcp\t\t\t# Nessus vuln"..., 4096) = 4096
read(3, "347/tcp\t\t\t# gnutella\ngnutella-rt"..., 4096) = 4096
read(3, "ureg\t779/udp\t\tmoira_ureg\t# Moira"..., 4096) = 3221
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
open("/etc/services", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19605, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# Network services, Internet sty"..., 4096) = 4096
read(3, "\t\t# IPX\nipx\t\t213/udp\nimap3\t\t220/"..., 4096) = 4096
read(3, "nessus\t\t1241/tcp\t\t\t# Nessus vuln"..., 4096) = 4096
read(3, "347/tcp\t\t\t# gnutella\ngnutella-rt"..., 4096) = 4096
read(3, "ureg\t779/udp\t\tmoira_ureg\t# Moira"..., 4096) = 3221
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
open("/etc/services", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19605, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# Network services, Internet sty"..., 4096) = 4096
read(3, "\t\t# IPX\nipx\t\t213/udp\nimap3\t\t220/"..., 4096) = 4096
read(3, "nessus\t\t1241/tcp\t\t\t# Nessus vuln"..., 4096) = 4096
read(3, "347/tcp\t\t\t# gnutella\ngnutella-rt"..., 4096) = 4096
read(3, "ureg\t779/udp\t\tmoira_ureg\t# Moira"..., 4096) = 3221
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
open("/etc/services", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=19605, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# Network services, Internet sty"..., 4096) = 4096
read(3, "\t\t# IPX\nipx\t\t213/udp\nimap3\t\t220/"..., 4096) = 4096
read(3, "nessus\t\t1241/tcp\t\t\t# Nessus vuln"..., 4096) = 4096
read(3, "347/tcp\t\t\t# gnutella\ngnutella-rt"..., 4096) = 4096
read(3, "ureg\t779/udp\t\tmoira_ureg\t# Moira"..., 4096) = 3221
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
socket(PF_LOCAL, SOCK_STREAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0) = 3
connect(3, {sa_family=AF_LOCAL, sun_path="/var/run/nscd/socket"}, 110) = -1 ENOENT (No such file or directory)
close(3) = 0
open("/etc/host.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=9, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "multi on\n", 4096) = 9
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
getpid() = 24206
open("/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=124, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# Generated by NetworkManager\nse"..., 4096) = 124
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=207, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "127.0.0.1\tlocalhost\n127.0.1.1\tde"..., 4096) = 207
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
open("/etc/gai.conf", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2584, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=2584, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
read(3, "# Configuration for getaddrinfo("..., 4096) = 2584
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f99f5a58000, 4096) = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
getsockname(3, {sa_family=AF_INET, sin_port=htons(60650), sin_addr=inet_addr("127.0.0.1")}, [16]) = 0
close(3) = 0
socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 3
connect(3, {sa_family=AF_INET6, sin6_port=htons(80), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0
getsockname(3, {sa_family=AF_INET6, sin6_port=htons(51869), inet_pton(AF_INET6, "::1", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, [28]) = 0
close(3) = 0
fstat(1, {st_mode=S_IFREG|0644, st_size=13847, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f99f5a58000
write(1, "ret: 0\n", 7ret: 0
) = 7
exit_group(0) = ?
+++ exited with 0 +++
I don't see getaddrinfo() mentioned in man syscalls.
$ man syscalls | grep getaddrinfo
$
So can I conclude that getaddrinfo() is not a system call on my Debian Linux system?
Is there a better way to definitevely determine if a given function is a system call or not on a given Unix or Linux system?
No, it is not. Your investigation proves it.
Additionally, you can try to find it in the Linux syscalls table. Or open man page for it check which chapter it is: 2 - system calls; 3 - c functions.
It is not a system call. It comes from the C standard library (libc).
I am trying to mount a disc with a GIT repo using davfs2 on Ubuntu 15.10. If I mount the disc using SSH or NFS (in the same target dir), I have no problem. When using davfs2, there is apparently no problem with regular file access / creation / edit, but when I try to do git push, I get this error message:
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 367 bytes | 0 bytes/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: error: unable to create temporary file: Invalid argument
remote: fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
To /media/nas/all/repos/setup.git
! [remote rejected] master -> master (unpacker error)
error: failed to push some refs to '/media/nas/all/repos/setup.git'
I have tried setting use_locks to both 0 and 1 in davfs2.conf. It does not change the result.
Running 'strace git push' gives the following result. Please help me understand what I can do in order to make this work. git push seems to fail after some wait statements, as can be seen in the output. What can I do about this?
execve("/usr/bin/git", ["git", "push"], [/* 60 vars */]) = 0
brk(0) = 0x10f8000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a3000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=113621, ...}) = 0
mmap(NULL, 113621, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4dd2687000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\0\26\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=448440, ...}) = 0
mmap(NULL, 2543880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4dd2214000
mprotect(0x7f4dd2280000, 2097152, PROT_NONE) = 0
mmap(0x7f4dd2480000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6c000) = 0x7f4dd2480000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libz.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\360\35\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=104824, ...}) = 0
mmap(NULL, 2199880, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4dd1ffa000
mprotect(0x7f4dd2013000, 2093056, PROT_NONE) = 0
mmap(0x7f4dd2212000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f4dd2212000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\3209\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=101232, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd2686000
mmap(NULL, 2206536, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4dd1ddf000
mprotect(0x7f4dd1df6000, 2097152, PROT_NONE) = 0
mmap(0x7f4dd1ff6000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x17000) = 0x7f4dd1ff6000
mmap(0x7f4dd1ff8000, 6984, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4dd1ff8000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340`\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=142080, ...}) = 0
mmap(NULL, 2217232, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4dd1bc1000
mprotect(0x7f4dd1bd9000, 2097152, PROT_NONE) = 0
mmap(0x7f4dd1dd9000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f4dd1dd9000
mmap(0x7f4dd1ddb000, 13584, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4dd1ddb000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\220!\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=31680, ...}) = 0
mmap(NULL, 2128864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4dd19b9000
mprotect(0x7f4dd19c0000, 2093056, PROT_NONE) = 0
mmap(0x7f4dd1bbf000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6000) = 0x7f4dd1bbf000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\340\v\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1869392, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd2685000
mmap(NULL, 3972864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f4dd15ef000
mprotect(0x7f4dd17af000, 2097152, PROT_NONE) = 0
mmap(0x7f4dd19af000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1c0000) = 0x7f4dd19af000
mmap(0x7f4dd19b5000, 16128, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f4dd19b5000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd2684000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd2683000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd2682000
arch_prctl(ARCH_SET_FS, 0x7f4dd2683700) = 0
mprotect(0x7f4dd19af000, 16384, PROT_READ) = 0
mprotect(0x7f4dd1dd9000, 4096, PROT_READ) = 0
mprotect(0x7f4dd1bbf000, 4096, PROT_READ) = 0
mprotect(0x7f4dd1ff6000, 4096, PROT_READ) = 0
mprotect(0x7f4dd2212000, 4096, PROT_READ) = 0
mprotect(0x7f4dd2480000, 4096, PROT_READ) = 0
mprotect(0x7a9000, 4096, PROT_READ) = 0
mprotect(0x7f4dd26a5000, 4096, PROT_READ) = 0
munmap(0x7f4dd2687000, 113621) = 0
set_tid_address(0x7f4dd26839d0) = 4258
set_robust_list(0x7f4dd26839e0, 24) = 0
rt_sigaction(SIGRTMIN, {0x7f4dd1bc6bb0, [], SA_RESTORER|SA_SIGINFO, 0x7f4dd1bd1d10}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f4dd1bc6c40, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f4dd1bd1d10}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
open("/dev/null", O_RDWR) = 3
close(3) = 0
rt_sigprocmask(SIG_UNBLOCK, [PIPE], NULL, 8) = 0
rt_sigaction(SIGPIPE, {SIG_DFL, [PIPE], SA_RESTORER|SA_RESTART, 0x7f4dd1624250}, {SIG_DFL, [], 0}, 8) = 0
brk(0) = 0x10f8000
brk(0x1119000) = 0x1119000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=7216688, ...}) = 0
mmap(NULL, 7216688, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4dd0f0d000
close(3) = 0
getcwd("/home/oivind/work/setup", 129) = 24
stat(".", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat(".git", {st_mode=S_IFREG|0644, st_size=30, ...}) = 0
open(".git", O_RDONLY) = 3
read(3, "gitdir: ../.git/modules/setup\n", 30) = 30
close(3) = 0
lstat("../.git/modules/setup/HEAD", {st_mode=S_IFREG|0664, st_size=23, ...}) = 0
open("../.git/modules/setup/HEAD", O_RDONLY) = 3
read(3, "ref: refs/heads/master\n", 255) = 23
read(3, "", 232) = 0
close(3) = 0
lstat("../.git/modules/setup/commondir", 0x7ffcfcec3310) = -1 ENOENT (No such file or directory)
access("../.git/modules/setup/objects", X_OK) = 0
access("../.git/modules/setup/refs", X_OK) = 0
stat("../.git/modules/setup/gitfile", {st_mode=S_IFREG|0644, st_size=5, ...}) = 0
stat("../.git/modules/setup", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getcwd("/home/oivind/work/setup", 129) = 24
chdir("../.git/modules/setup") = 0
getcwd("/home/oivind/work/.git/modules/setup", 150) = 37
lstat("/home/oivind/work/.git/modules/setup", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
chdir("/home/oivind/work/setup") = 0
lstat("/home/oivind/work/.git/modules/setup/commondir", 0x7ffcfcec34a0) = -1 ENOENT (No such file or directory)
access("/etc/gitconfig", R_OK) = -1 ENOENT (No such file or directory)
access("/home/oivind/.config/git/config", R_OK) = -1 ENOENT (No such file or directory)
access("/home/oivind/.gitconfig", R_OK) = 0
open("/home/oivind/.gitconfig", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=171, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a2000
read(3, "[user]\n\tname = \303\230ivind Loe\n\temai"..., 4096) = 171
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f4dd26a2000, 4096) = 0
access("/home/oivind/work/.git/modules/setup/config", R_OK) = 0
open("/home/oivind/work/.git/modules/setup/config", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=282, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a2000
read(3, "[core]\n\trepositoryformatversion "..., 4096) = 282
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f4dd26a2000, 4096) = 0
chdir("/home/oivind/work/setup") = 0
stat("/home/oivind/work/.git/modules/setup", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/oivind/work/.git/modules/setup/HEAD", {st_mode=S_IFREG|0664, st_size=23, ...}) = 0
open("/home/oivind/work/.git/modules/setup/HEAD", O_RDONLY) = 3
read(3, "ref: refs/heads/master\n", 255) = 23
read(3, "", 232) = 0
close(3) = 0
lstat("/home/oivind/work/.git/modules/setup/commondir", 0x7ffcfcec3480) = -1 ENOENT (No such file or directory)
access("/home/oivind/work/.git/modules/setup/objects", X_OK) = 0
access("/home/oivind/work/.git/modules/setup/refs", X_OK) = 0
lstat("/home/oivind/work/.git/modules/setup/commondir", 0x7ffcfcec3470) = -1 ENOENT (No such file or directory)
access("/etc/gitconfig", R_OK) = -1 ENOENT (No such file or directory)
access("/home/oivind/.config/git/config", R_OK) = -1 ENOENT (No such file or directory)
access("/home/oivind/.gitconfig", R_OK) = 0
open("/home/oivind/.gitconfig", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=171, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a2000
read(3, "[user]\n\tname = \303\230ivind Loe\n\temai"..., 4096) = 171
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f4dd26a2000, 4096) = 0
access("/home/oivind/work/.git/modules/setup/config", R_OK) = 0
open("/home/oivind/work/.git/modules/setup/config", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=282, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a2000
read(3, "[core]\n\trepositoryformatversion "..., 4096) = 282
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f4dd26a2000, 4096) = 0
chdir("/home/oivind/work/.git/modules/setup") = 0
chdir("../../../setup") = 0
getcwd("/home/oivind/work/setup", 129) = 24
chdir("/home/oivind/work/setup") = 0
stat("/home/oivind/work/setup", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getcwd("/home/oivind/work/setup", 129) = 24
chdir("/home/oivind/work/setup") = 0
getcwd("/home/oivind/work/setup", 249) = 24
lstat("/home/oivind/work/setup", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
chdir("/home/oivind/work/setup") = 0
stat("/home/oivind/work/.git/modules/setup", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home/oivind/work/.git/modules/setup/commondir", 0x7ffcfcec3430) = -1 ENOENT (No such file or directory)
access("/etc/gitconfig", R_OK) = -1 ENOENT (No such file or directory)
access("/home/oivind/.config/git/config", R_OK) = -1 ENOENT (No such file or directory)
access("/home/oivind/.gitconfig", R_OK) = 0
open("/home/oivind/.gitconfig", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=171, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a2000
read(3, "[user]\n\tname = \303\230ivind Loe\n\temai"..., 4096) = 171
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f4dd26a2000, 4096) = 0
access("/home/oivind/work/.git/modules/setup/config", R_OK) = 0
open("/home/oivind/work/.git/modules/setup/config", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=282, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a2000
read(3, "[core]\n\trepositoryformatversion "..., 4096) = 282
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f4dd26a2000, 4096) = 0
lstat("/home/oivind/work/.git/modules/setup/HEAD", {st_mode=S_IFREG|0664, st_size=23, ...}) = 0
open("/home/oivind/work/.git/modules/setup/HEAD", O_RDONLY) = 3
read(3, "ref: refs/heads/master\n", 255) = 23
read(3, "", 232) = 0
close(3) = 0
lstat("/home/oivind/work/.git/modules/setup/refs/heads/master", {st_mode=S_IFREG|0664, st_size=41, ...}) = 0
open("/home/oivind/work/.git/modules/setup/refs/heads/master", O_RDONLY) = 3
read(3, "d89e132b2b99f3fe4fa74b940b442efa"..., 255) = 41
read(3, "", 214) = 0
close(3) = 0
ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7ffcfcec2f40) = -1 ENOTTY (Inappropriate ioctl for device)
stat("/media/nas/all/repos/setup.git", {st_mode=S_IFDIR|0755, st_size=328, ...}) = 0
ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7ffcfcec2fd0) = -1 ENOTTY (Inappropriate ioctl for device)
openat(AT_FDCWD, "/home/oivind/work/.git/modules/setup/refs/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 5 entries */, 32768) = 136
stat("/home/oivind/work/.git/modules/setup/refs/remotes", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/oivind/work/.git/modules/setup/refs/heads", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat("/home/oivind/work/.git/modules/setup/refs/tags", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
openat(AT_FDCWD, "/home/oivind/work/.git/modules/setup/refs/remotes/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 3 entries */, 32768) = 80
stat("/home/oivind/work/.git/modules/setup/refs/remotes/origin", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
openat(AT_FDCWD, "/home/oivind/work/.git/modules/setup/refs/remotes/origin/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 4 entries */, 32768) = 104
stat("/home/oivind/work/.git/modules/setup/refs/remotes/origin/HEAD", {st_mode=S_IFREG|0644, st_size=32, ...}) = 0
lstat("/home/oivind/work/.git/modules/setup/refs/remotes/origin/HEAD", {st_mode=S_IFREG|0644, st_size=32, ...}) = 0
open("/home/oivind/work/.git/modules/setup/refs/remotes/origin/HEAD", O_RDONLY) = 4
read(4, "ref: refs/remotes/origin/master\n", 255) = 32
read(4, "", 223) = 0
close(4) = 0
lstat("/home/oivind/work/.git/modules/setup/refs/remotes/origin/master", {st_mode=S_IFREG|0664, st_size=41, ...}) = 0
open("/home/oivind/work/.git/modules/setup/refs/remotes/origin/master", O_RDONLY) = 4
read(4, "b0df467a4830d631512dee7de9b61e99"..., 255) = 41
read(4, "", 214) = 0
close(4) = 0
stat("/home/oivind/work/.git/modules/setup/refs/remotes/origin/master", {st_mode=S_IFREG|0664, st_size=41, ...}) = 0
lstat("/home/oivind/work/.git/modules/setup/refs/remotes/origin/master", {st_mode=S_IFREG|0664, st_size=41, ...}) = 0
open("/home/oivind/work/.git/modules/setup/refs/remotes/origin/master", O_RDONLY) = 4
read(4, "b0df467a4830d631512dee7de9b61e99"..., 255) = 41
read(4, "", 214) = 0
close(4) = 0
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
openat(AT_FDCWD, "/home/oivind/work/.git/modules/setup/refs/heads/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 3 entries */, 32768) = 80
stat("/home/oivind/work/.git/modules/setup/refs/heads/master", {st_mode=S_IFREG|0664, st_size=41, ...}) = 0
lstat("/home/oivind/work/.git/modules/setup/refs/heads/master", {st_mode=S_IFREG|0664, st_size=41, ...}) = 0
open("/home/oivind/work/.git/modules/setup/refs/heads/master", O_RDONLY) = 4
read(4, "d89e132b2b99f3fe4fa74b940b442efa"..., 255) = 41
read(4, "", 214) = 0
close(4) = 0
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
openat(AT_FDCWD, "/home/oivind/work/.git/modules/setup/refs/tags/", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 2 entries */, 32768) = 48
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
open("/home/oivind/work/.git/modules/setup/packed-refs", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=107, ...}) = 0
fstat(3, {st_mode=S_IFREG|0644, st_size=107, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a2000
read(3, "# pack-refs with: peeled fully-p"..., 4096) = 107
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f4dd26a2000, 4096) = 0
openat(AT_FDCWD, "/home/oivind/work/.git/modules/setup/objects/pack", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
getdents(3, /* 2 entries */, 32768) = 48
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
open("/home/oivind/work/.git/modules/setup/objects/info/alternates", O_RDONLY|O_NOATIME) = -1 ENOENT (No such file or directory)
access("/home/oivind/work/.git/modules/setup/objects/d8/9e132b2b99f3fe4fa74b940b442efa06f222ee", F_OK) = 0
access("/home/oivind/work/.git/modules/setup/objects/b0/df467a4830d631512dee7de9b61e9996689ed9", F_OK) = 0
access("/home/oivind/work/.git/modules/setup/objects/b0/df467a4830d631512dee7de9b61e9996689ed9", F_OK) = 0
rt_sigaction(SIGCHLD, {SIG_DFL, [CHLD], SA_RESTORER|SA_RESTART, 0x7f4dd1624250}, {SIG_DFL, [], 0}, 8) = 0
pipe([3, 4]) = 0
pipe([5, 6]) = 0
pipe([7, 8]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f4dd26839d0) = 4259
close(8) = 0
read(7, "", 1) = 0
close(7) = 0
close(3) = 0
close(6) = 0
read(5, "008e", 4) = 4
read(5, "b0df467a4830d631512dee7de9b61e99"..., 138) = 138
read(5, "0000", 4) = 4
access("/home/oivind/work/.git/modules/setup/objects/b0/df467a4830d631512dee7de9b61e9996689ed9", F_OK) = 0
stat("/home/oivind/work/.git/modules/setup/packed-refs", {st_mode=S_IFREG|0644, st_size=107, ...}) = 0
access("/home/oivind/work/.git/modules/setup/objects/b0/df467a4830d631512dee7de9b61e9996689ed9", F_OK) = 0
open("/home/oivind/work/.git/modules/setup/objects/b0/df467a4830d631512dee7de9b61e9996689ed9", O_RDONLY|O_NOATIME) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=191, ...}) = 0
mmap(NULL, 191, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4dd26a2000
close(3) = 0
munmap(0x7f4dd26a2000, 191) = 0
open("/home/oivind/work/.git/modules/setup/objects/b0/df467a4830d631512dee7de9b61e9996689ed9", O_RDONLY|O_NOATIME) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=191, ...}) = 0
mmap(NULL, 191, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4dd26a2000
close(3) = 0
munmap(0x7f4dd26a2000, 191) = 0
brk(0x1140000) = 0x1140000
open("/home/oivind/work/.git/modules/setup/info/grafts", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/home/oivind/work/.git/modules/setup/shallow", O_RDONLY) = -1 ENOENT (No such file or directory)
mmap(NULL, 524288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd2602000
access("/home/oivind/work/.git/modules/setup/objects/d8/9e132b2b99f3fe4fa74b940b442efa06f222ee", F_OK) = 0
open("/home/oivind/work/.git/modules/setup/objects/d8/9e132b2b99f3fe4fa74b940b442efa06f222ee", O_RDONLY|O_NOATIME) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=163, ...}) = 0
mmap(NULL, 163, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4dd26a2000
close(3) = 0
munmap(0x7f4dd26a2000, 163) = 0
open("/home/oivind/work/.git/modules/setup/objects/d8/9e132b2b99f3fe4fa74b940b442efa06f222ee", O_RDONLY|O_NOATIME) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=163, ...}) = 0
mmap(NULL, 163, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4dd26a2000
close(3) = 0
munmap(0x7f4dd26a2000, 163) = 0
open("/home/oivind/work/.git/modules/setup/objects/e8/702fd2aa79a3c02ce3fd8ed6ee0149d8dbab6c", O_RDONLY|O_NOATIME) = 3
fstat(3, {st_mode=S_IFREG|0444, st_size=163, ...}) = 0
mmap(NULL, 163, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f4dd26a2000
close(3) = 0
munmap(0x7f4dd26a2000, 163) = 0
access("/home/oivind/work/.git/modules/setup/hooks/pre-push", X_OK) = -1 ENOENT (No such file or directory)
write(4, "009ab0df467a4830d631512dee7de9b6"..., 154) = 154
write(4, "0000", 4) = 4
pipe([3, 6]) = 0
fcntl(6, F_GETFD) = 0
fcntl(6, F_SETFD, FD_CLOEXEC) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f4dd070c000
mprotect(0x7f4dd070c000, 4096, PROT_NONE) = 0
clone(child_stack=0x7f4dd0f0bff0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f4dd0f0c9d0, tls=0x7f4dd0f0c700, child_tidptr=0x7f4dd0f0c9d0) = 4262
pipe([7, 8]) = 0
pipe([9, 10]) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f4dd26839d0) = 4263
close(10) = 0
read(9, "", 1) = 0
close(9) = 0
close(7) = 0
close(4) = 0
access("/home/oivind/work/.git/modules/setup/objects/b0/df467a4830d631512dee7de9b61e9996689ed9", F_OK) = 0
write(8, "^b0df467a4830d631512dee7de9b61e9"..., 42) = 42
write(8, "d89e132b2b99f3fe4fa74b940b442efa"..., 41) = 41
close(8) = 0
wait4(4263, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 4263
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=4263, si_status=0, si_utime=0, si_stime=0} ---
read(3, remote: error: unable to create temporary file: Invalid argument
remote: fatal: failed to write object
"0028", 4) = 4
read(3, "unpack unpack-objects abnormal e"..., 36) = 36
write(2, "error: unpack failed: unpack-obj"..., 51error: unpack failed: unpack-objects abnormal exit
) = 51
read(3, "0028", 4) = 4
read(3, "ng refs/heads/master unpacker er"..., 36) = 36
read(3, "0000", 4) = 4
futex(0x7f4dd0f0c9d0, FUTEX_WAIT, 4262, NULL) = 0
close(3) = 0
close(-1) = -1 EBADF (Bad file descriptor)
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=4259, si_status=0, si_utime=0, si_stime=0} ---
close(5) = 0
wait4(4259, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 4259
lstat("/home/oivind/work/.git/modules/setup/HEAD", {st_mode=S_IFREG|0664, st_size=23, ...}) = 0
open("/home/oivind/work/.git/modules/setup/HEAD", O_RDONLY) = 3
read(3, "ref: refs/heads/master\n", 255) = 23
read(3, "", 232) = 0
close(3) = 0
lstat("/home/oivind/work/.git/modules/setup/refs/heads/master", {st_mode=S_IFREG|0664, st_size=41, ...}) = 0
open("/home/oivind/work/.git/modules/setup/refs/heads/master", O_RDONLY) = 3
read(3, "d89e132b2b99f3fe4fa74b940b442efa"..., 255) = 41
read(3, "", 214) = 0
close(3) = 0
write(2, "To /media/nas/all/repos/setup.gi"..., 34To /media/nas/all/repos/setup.git
) = 34
write(2, " ! [remote rejected] ", 21 ! [remote rejected] ) = 21
write(2, "master -> master", 16master -> master) = 16
write(2, " (", 2 () = 2
write(2, "unpacker error", 14unpacker error) = 14
write(2, ")", 1)) = 1
write(2, "\n", 1
) = 1
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2570, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4dd26a2000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2570
read(3, "", 4096) = 0
close(3) = 0
munmap(0x7f4dd26a2000, 4096) = 0
open("/usr/share/locale/en_US/LC_MESSAGES/git.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/git.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_US/LC_MESSAGES/git.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/git.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "error: failed to push some refs "..., 68error: failed to push some refs to '/media/nas/all/repos/setup.git'
) = 68
exit_group(1) = ?
+++ exited with 1 +++
Changing all files on mounted disc to 777 solved this for me. If anyone else has a less intrusive way of testing, that would be great to see!
I am trying load /etc/cgconfig.conf using cgconfigparser to configure cgroup properties of jstorm.
My OS is ubuntu 14.04, username is 'whaty' and I have installed libcgroup1, cgroup-bin, cgroup-lite. There is no cgconfig.conf in /etc. so I create it manually.
Here is my cgconfig.conf
mount {
cpu = /sys/fs/cgroup/cpu;
cpuset = /sys/fs/cgroup/cpuset;
}
group jstorm {
perm {
task {
uid = 1000;
gid = 1000;
}
admin {
uid = 1000;
gid = 1000;
}
}
cpuset {
cpuset.cpus = 0;
cpuset.mems = 0;
}
}
I try to load this config using:
sudo cgconfigparser -l /etc/cgconfig.conf
The result shows:
cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
Here is my /proc/cgroups:
#subsys_name hierarchy num_cgroups enabled
cpuset 12 5 1
cpu 3 5 1
cpuacct 0 1 1
memory 0 1 1
devices 0 1 1
freezer 0 1 1
blkio 0 1 1
perf_event 0 1 1
hugetlb 0 1 1
Here is my mount of cgroup:
whaty#whaty:/sys/fs/cgroup$ ls
blkio cpu cpuacct cpuset devices freezer hugetlb memory perf_event systemd
Here is the strace of cgconfigparsser:
execve("/usr/sbin/cgconfigparser", ["cgconfigparser", "-l", "/etc/cgconfig.conf"], [/* 24 vars */]) = 0
brk(0) = 0x1421000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6499e62000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=98553, ...}) = 0
mmap(NULL, 98553, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f6499e49000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/libcgroup.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\2608\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=76872, ...}) = 0
mmap(NULL, 4640896, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f64997d4000
mprotect(0x7f64997e6000, 2093056, PROT_NONE) = 0
mmap(0x7f64999e5000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x7f64999e5000
mmap(0x7f64999e7000, 2465920, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f64999e7000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\320\37\2\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=1840928, ...}) = 0
mmap(NULL, 3949248, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f649940f000
mprotect(0x7f64995ca000, 2093056, PROT_NONE) = 0
mmap(0x7f64997c9000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1ba000) = 0x7f64997c9000
mmap(0x7f64997cf000, 17088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f64997cf000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0po\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0755, st_size=141574, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6499e48000
mmap(NULL, 2217264, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7f64991f1000
mprotect(0x7f649920a000, 2093056, PROT_NONE) = 0
mmap(0x7f6499409000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x18000) = 0x7f6499409000
mmap(0x7f649940b000, 13616, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7f649940b000
close(3) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6499e47000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6499e45000
arch_prctl(ARCH_SET_FS, 0x7f6499e45b80) = 0
mprotect(0x7f64997c9000, 16384, PROT_READ) = 0
mprotect(0x7f6499409000, 4096, PROT_READ) = 0
mprotect(0x7f64999e5000, 4096, PROT_READ) = 0
mprotect(0x602000, 4096, PROT_READ) = 0
mprotect(0x7f6499e64000, 4096, PROT_READ) = 0
munmap(0x7f6499e49000, 98553) = 0
set_tid_address(0x7f6499e45e50) = 14211
set_robust_list(0x7f6499e45e60, 24) = 0
futex(0x7ffde9414310, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 1, NULL, 7f6499e45b80) = -1 EAGAIN (Resource temporarily unavailable)
rt_sigaction(SIGRTMIN, {0x7f64991f79f0, [], SA_RESTORER|SA_SIGINFO, 0x7f6499201340}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x7f64991f7a80, [], SA_RESTORER|SA_RESTART|SA_SIGINFO, 0x7f6499201340}, NULL, 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [RTMIN RT_1], NULL, 8) = 0
getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0
brk(0) = 0x1421000
brk(0x1442000) = 0x1442000
open("/etc/cgconfig.conf", O_RDONLY|O_CLOEXEC) = 3
mmap(NULL, 319488, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6499df7000
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7ffde9413840) = -1 ENOTTY (Inappropriate ioctl for device)
fstat(3, {st_mode=S_IFREG|0644, st_size=411, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f6499e61000
read(3, "mount {\n cpu = /sys/fs/cgr"..., 8192) = 411
read(3, "", 4096) = 0
read(3, "", 8192) = 0
ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7ffde9413840) = -1 ENOTTY (Inappropriate ioctl for device)
close(3) = 0
munmap(0x7f6499e61000, 4096) = 0
stat("/sys/fs/cgroup/cpu", {st_mode=S_IFDIR|0755, st_size=0, ...}) = 0
mount("cgroup", "/sys/fs/cgroup/cpu", "cgroup", 0, "cpu") = -1 EBUSY (Device or resource busy)
munmap(0x7f6499df7000, 319488) = 0
write(2, "cgconfigparser; error loading /e"..., 73cgconfigparser; error loading /etc/cgconfig.conf: Cgroup mounting failed
) = 73
exit_group(50021) = ?
+++ exited with 101 +++
It seems that certain resource is occupied and busy. What's wrong with my configuration?