Repository navigation
Vanadis: Fix openat for containers - #2724
gvoskuilen wants to merge 1 commit into
Conversation
|
Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection is Not Necessary for this Pull Request. |
|
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements
Build InformationTest Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_Make-Dist
Build InformationTest Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MT-2
Build InformationTest Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MR-2
Build InformationTest Name: SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements
Using Repos:
Pull Request Author: gvoskuilen |
|
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements
Build InformationTest Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_Make-Dist
Build InformationTest Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MT-2
Build InformationTest Name: SST__Autotest_sst-test_OMPI-4.1.4_PY3.9_sst-elements_MR-2
Build InformationTest Name: SST__Autotest_OSX-15-XC16_OMPI-4.1.6_PY3.10_sst-elements
|
|
Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
|
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
|
Status Flag 'Pre-Merge Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
|
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
5 similar comments
|
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
|
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
|
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
|
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
|
All Jobs Finished; status = PASSED, However Inspection must be performed before merge can occur... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
14 similar comments
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
2 similar comments
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
This is still causing a diff. |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
2 similar comments
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
I'm investigating this. There are differences in the |
|
Here are strace results from with this PR. On the left is bare metal (with paths cleaned up) and on the right is inside a container. The container is built and run with the user as diff --git bare_clean.log container.log
index 06ea8d2b2..948b65d64 100644
--- bare_clean.log
+++ container.log
@@ -1,52 +1,54 @@
-execve("./a.out", ["./a.out"], 0x7ffff6178118 /* 83 vars */) = 0
-brk(NULL) = 0x24aa000
-arch_prctl(0x3001 /* ARCH_??? */, 0x7fff1a469360) = -1 EINVAL (Invalid argument)
-mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcbcbe0c000
+execve("./a.out", ["./a.out"], 0x7ffcfcc38198 /* 40 vars */) = 0
+brk(NULL) = 0x1854000
+arch_prctl(0x3001 /* ARCH_??? */, 0x7ffc6d423220) = -1 EINVAL (Invalid argument)
+mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdd5035d000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD</code/sst-elements/src/sst/elements/vanadis/tests/small/basic-io/openat>, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3</etc/ld.so.cache>
-fstat(3</etc/ld.so.cache>, {st_mode=S_IFREG|0644, st_size=85495, ...}) = 0
-mmap(NULL, 85495, PROT_READ, MAP_PRIVATE, 3</etc/ld.so.cache>, 0) = 0x7fcbcbdf7000
+fstat(3</etc/ld.so.cache>, {st_mode=S_IFREG|0644, st_size=11071, ...}) = 0
+mmap(NULL, 11071, PROT_READ, MAP_PRIVATE, 3</etc/ld.so.cache>, 0) = 0x7fdd5035a000
close(3</etc/ld.so.cache>) = 0
openat(AT_FDCWD</code/sst-elements/src/sst/elements/vanadis/tests/small/basic-io/openat>, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3</usr/lib64/libc-2.28.so>
read(3</usr/lib64/libc-2.28.so>, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0@\251\3\0\0\0\0\0"..., 832) = 832
fstat(3</usr/lib64/libc-2.28.so>, {st_mode=S_IFREG|0755, st_size=2164744, ...}) = 0
lseek(3</usr/lib64/libc-2.28.so>, 808, SEEK_SET) = 808
read(3</usr/lib64/libc-2.28.so>, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\0\0\300\4\0\0\0\3\0\0\0\0\0\0\0", 32) = 32
-mmap(NULL, 4020384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</usr/lib64/libc-2.28.so>, 0) = 0x7fcbcb809000
-mprotect(0x7fcbcb9d5000, 2097152, PROT_NONE) = 0
-mmap(0x7fcbcbbd5000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</usr/lib64/libc-2.28.so>, 0x1cc000) = 0x7fcbcbbd5000
-mmap(0x7fcbcbbdb000, 14496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fcbcbbdb000
+mmap(NULL, 4020384, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3</usr/lib64/libc-2.28.so>, 0) = 0x7fdd4fd5a000
+mprotect(0x7fdd4ff26000, 2097152, PROT_NONE) = 0
+mmap(0x7fdd50126000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3</usr/lib64/libc-2.28.so>, 0x1cc000) = 0x7fdd50126000
+mmap(0x7fdd5012c000, 14496, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7fdd5012c000
close(3</usr/lib64/libc-2.28.so>) = 0
-mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcbcbdf5000
-arch_prctl(ARCH_SET_FS, 0x7fcbcbe0d600) = 0
-mprotect(0x7fcbcbbd5000, 16384, PROT_READ) = 0
+mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdd50358000
+arch_prctl(ARCH_SET_FS, 0x7fdd5035e600) = 0
+mprotect(0x7fdd50126000, 16384, PROT_READ) = 0
mprotect(0x600000, 4096, PROT_READ) = 0
-mprotect(0x7fcbcbe0e000, 4096, PROT_READ) = 0
-munmap(0x7fcbcbdf7000, 85495) = 0
-openat(-10, "/openat.test", O_RDWR|O_CREAT|O_TRUNC, 0700) = -1 EACCES (Permission denied)
-fstat(1</dev/pts/102<char 136:102>>, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0x66), ...}) = 0
-getrandom("\x5b\x48\x08\x91\x98\x8d\x15\x18", 8, GRND_NONBLOCK) = 8
-brk(NULL) = 0x24aa000
-brk(0x24cb000) = 0x24cb000
-brk(NULL) = 0x24cb000
-write(1</dev/pts/102<char 136:102>>, "openat(dirfd=-10, /openat.test) "..., 60openat(dirfd=-10, /openat.test) failed `Permission denied`
-) = 60
+mprotect(0x7fdd5035f000, 4096, PROT_READ) = 0
+munmap(0x7fdd5035a000, 11071) = 0
+openat(-10, "/openat.test", O_RDWR|O_CREAT|O_TRUNC, 0700) = 3</openat.test>
+fstat(1</dev/pts/0<char 136:0>>, {st_mode=S_IFCHR|0620, st_rdev=makedev(0x88, 0), ...}) = 0
+getrandom("\x17\x74\x8b\xdc\xfe\x6d\x1b\x13", 8, GRND_NONBLOCK) = 8
+brk(NULL) = 0x1854000
+brk(0x1875000) = 0x1875000
+brk(NULL) = 0x1875000
+write(1</dev/pts/0<char 136:0>>, "openat(dirfd=-10, /openat.test) "..., 43openat(dirfd=-10, /openat.test) returned 3
+) = 43
+close(3</openat.test>) = 0
+unlinkat(-10, "/openat.test", 0) = 0
openat(AT_FDCWD</code/sst-elements/src/sst/elements/vanadis/tests/small/basic-io/openat>, "openat.test", O_RDWR|O_CREAT|O_TRUNC, 0700) = 3</code/sst-elements/src/sst/elements/vanadis/tests/small/basic-io/openat/openat.test>
-write(1</dev/pts/102<char 136:102>>, "openat(dirfd=-100, openat.test) "..., 43openat(dirfd=-100, openat.test) returned 3
+write(1</dev/pts/0<char 136:0>>, "openat(dirfd=-100, openat.test) "..., 43openat(dirfd=-100, openat.test) returned 3
) = 43
close(3</code/sst-elements/src/sst/elements/vanadis/tests/small/basic-io/openat/openat.test>) = 0
unlinkat(AT_FDCWD</code/sst-elements/src/sst/elements/vanadis/tests/small/basic-io/openat>, "openat.test", 0) = 0
openat(AT_FDCWD</code/sst-elements/src/sst/elements/vanadis/tests/small/basic-io/openat>, "/tmp", O_RDONLY) = 3</tmp>
-write(1</dev/pts/102<char 136:102>>, "open('tmp') dirfd=3\n", 20open('tmp') dirfd=3
+write(1</dev/pts/0<char 136:0>>, "open('tmp') dirfd=3\n", 20open('tmp') dirfd=3
) = 20
openat(3</tmp>, "openat.test", O_RDWR|O_CREAT|O_TRUNC, 0700) = 4</tmp/openat.test>
-write(1</dev/pts/102<char 136:102>>, "openat(dirfd=3, openat.test) ret"..., 40openat(dirfd=3, openat.test) returned 4
+write(1</dev/pts/0<char 136:0>>, "openat(dirfd=3, openat.test) ret"..., 40openat(dirfd=3, openat.test) returned 4
) = 40
close(4</tmp/openat.test>) = 0
unlinkat(3</tmp>, "openat.test", 0) = 0
close(3</tmp>) = 0
openat(20, "openat.test", O_RDWR|O_CREAT|O_TRUNC, 0700) = -1 EBADF (Bad file descriptor)
-write(1</dev/pts/102<char 136:102>>, "openat(dirfd=20, openat.test) fa"..., 60openat(dirfd=20, openat.test) failed `Bad file descriptor`
+write(1</dev/pts/0<char 136:0>>, "openat(dirfd=20, openat.test) fa"..., 60openat(dirfd=20, openat.test) failed `Bad file descriptor`
) = 60
exit_group(0) = ?
+++ exited with 0 +++ |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
7 similar comments
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
All Jobs Finished; status = PASSED, However PR is now STALE, and must be retested. Set the AT: RETEST Label to force retest.... |
|
I've confirmed that this isn't an issue when running inside a container as a non-root user and have a solution for us. |
This fixes an issue where some vanadis tests would diff when run in containers.