Parser test suite fails on mips64el: Failed setting up policy cache (/tmp/aa-caching-l8pvywl8/cache): Operation not supported

Bug #1709360 reported by intrigeri
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Invalid
Undecided
Unassigned
apparmor (Debian)
New
Undecided
Unassigned
gcc-7 (Debian)
Fix Released
Unknown

Bug Description

Full build log: https://buildd.debian.org/status/fetch.php?pkg=apparmor&arch=mips64el&ver=2.11.0-9&stamp=1502149450&raw=0

Details about (first) failure:

======================================================================
FAIL: test_cache_when_requested (__main__.AAParserBasicCachingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/parser/tst/testlib.py", line 50, in new_unittest_func
    return unittest_func(self)
  File "./caching.py", line 149, in test_cache_when_requested
    self.run_cmd_check(cmd)
  File "/<<PKGBUILDDIR>>/parser/tst/testlib.py", line 73, in run_cmd_check
    self.assertEqual(rc, expected_rc, "Got return code %d, expected %d\nCommand run: %s\nOutput: %s" % (rc, expected_rc, (' '.join(command)), report))
AssertionError: 1 != 0 : Got return code 1, expected 0
Command run: ../apparmor_parser --base /tmp/aa-caching-l8pvywl8 --skip-kernel-load -M ./features_files/features.all -q --write-cache -r /tmp/aa-caching-l8pvywl8/sbin.pingy
Output: Failed setting up policy cache (/tmp/aa-caching-l8pvywl8/cache): Operation not supported

I've reproduced this on the eller.debian.org porterbox in a mips64el chroot.

Tags: aa-parser
Revision history for this message
intrigeri (intrigeri) wrote :
Download full text (6.3 KiB)

eller% strace ../apparmor_parser --debug --base /tmp/aa-caching-_5sxbkdo --skip-kernel-load -M ./features_files/features.all --cache-loc /tmp/aa-caching-_5sxbkdo/aa-alt-cache8eia9fdh --write-cache -r /tmp/aa-caching-_5sxbkdo/sbin.pingy
execve("../apparmor_parser", ["../apparmor_parser", "--debug", "--base", "/tmp/aa-caching-_5sxbkdo", "--skip-kernel-load", "-M", "./features_files/features.all", "--cache-loc", "/tmp/aa-caching-_5sxbkdo/aa-alt-"..., "--write-cache", "-r", "/tmp/aa-caching-_5sxbkdo/sbin.pi"...], [/* 18 vars */]) = 0
brk(NULL) = 0xaab9436000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffebe05000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
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=15753, ...}) = 0
mmap(NULL, 15753, PROT_READ, MAP_PRIVATE, 3, 0) = 0xffebe01000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/mips64el-linux-gnuabi64/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\10\0\1\0\0\0\360\204\0\0\0\0\0\0"..., 832) = 832
lseek(3, 8944, SEEK_SET) = 8944
read(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0\257\374\36\345\304\3317$\252{-7u(9\330"..., 36) = 36
lseek(3, 9608, SEEK_SET) = 9608
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\3\0\0\0\2\0\0\0\0\0\0\0", 32) = 32
fstat(3, {st_mode=S_IFREG|0755, st_size=169816, ...}) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xffebdff000
mmap(NULL, 206600, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffebda1000
mprotect(0xffebdbf000, 61440, PROT_NONE) = 0
mmap(0xffebdce000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1d000) = 0xffebdce000
mmap(0xffebdd0000, 14088, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xffebdd0000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/mips64el-linux-gnuabi64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\200\262\0\0\0\0\0\0"..., 832) = 832
lseek(3, 19016, SEEK_SET) = 19016
read(3, "\4\0\0\0\24\0\0\0\3\0\0\0GNU\0-0\327W\10\270`\223m\214\204\374!\237W\236"..., 36) = 36
lseek(3, 19648, SEEK_SET) = 19648
read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\3\0\0\0\2\0\0\0\0\0\0\0", 32) = 32
fstat(3, {st_mode=S_IFREG|0644, st_size=849872, ...}) = 0
mmap(NULL, 895920, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xffebcc6000
mprotect(0xffebd90000, 61440, PROT_NONE) = 0
mmap(0xffebd9f000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xc9000) = 0xffebd9f000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/mips64el-linux-gnuabi64/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\10\0\1\0\0\0\230\310\3\...

Read more...

Revision history for this message
Tyler Hicks (tyhicks) wrote :

A quick observation is that the strace output doesn't show any syscalls failing with -EOPNOTSUPP.

Revision history for this message
intrigeri (intrigeri) wrote :

Built the library with --enable-debug-output and set LIBAPPARMOR_DEBUG=1:

======================================================================
FAIL: test_cache_when_requested (__main__.AAParserBasicCachingTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/intrigeri/apparmor-2.11.0/parser/tst/testlib.py", line 50, in new_unittest_func
    return unittest_func(self)
  File "./caching.py", line 149, in test_cache_when_requested
    self.run_cmd_check(cmd)
  File "/home/intrigeri/apparmor-2.11.0/parser/tst/testlib.py", line 73, in run_cmd_check
    self.assertEqual(rc, expected_rc, "Got return code %d, expected %d\nCommand run: %s\nOutput: %s" % (rc, expected_rc, (' '.join(command)), report))
AssertionError: 1 != 0 : Got return code 1, expected 0
Command run: ../apparmor_parser --base /tmp/aa-caching-qjd0b2ml --skip-kernel-load -M ./features_files/features.all -q --write-cache -r /tmp/aa-caching-qjd0b2ml/sbin.pingy
Output: libapparmor: Opened features "./features_files/features.all"
Failed setting up policy cache (/tmp/aa-caching-qjd0b2ml/cache): Operation not supported

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks for rebuilding with debug output! Could you apply this patch and then rebuild once again with debug output? Then run the command by hand and include the output? Thank you!

Changed in gcc-7 (Debian):
status: Unknown → New
Changed in gcc-7 (Debian):
status: New → Confirmed
Changed in gcc-7 (Debian):
status: Confirmed → Fix Released
Revision history for this message
Tyler Hicks (tyhicks) wrote :

This turned out to be a miscompilation bug in the mips64el toolchain and not a bug in AppArmor.

Changed in apparmor:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.