global.get_metadata in seccomp_bpf test from ubuntu_kernel_selftests fails [X & B]

Bug #1811057 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Invalid
Undecided
Unassigned
Bionic
Invalid
Undecided
Unassigned
Cosmic
Fix Released
Undecided
Unassigned
Disco
Fix Released
Undecided
Unassigned

Bug Description

 selftests: seccomp_bpf
 ========================================
 [==========] Running 64 tests from 1 test cases.
 [ RUN ] global.mode_strict_support
 [ OK ] global.mode_strict_support
 [ RUN ] global.mode_strict_cannot_call_prctl
 [ OK ] global.mode_strict_cannot_call_prctl
 [ RUN ] global.no_new_privs_support
 [ OK ] global.no_new_privs_support
 [ RUN ] global.mode_filter_support
 [ OK ] global.mode_filter_support
 [ RUN ] global.mode_filter_without_nnp
 [ OK ] global.mode_filter_without_nnp
 [ RUN ] global.filter_size_limits
 [ OK ] global.filter_size_limits
 [ RUN ] global.filter_chain_limits
 [ OK ] global.filter_chain_limits
 [ RUN ] global.mode_filter_cannot_move_to_strict
 [ OK ] global.mode_filter_cannot_move_to_strict
 [ RUN ] global.mode_filter_get_seccomp
 [ OK ] global.mode_filter_get_seccomp
 [ RUN ] global.ALLOW_all
 [ OK ] global.ALLOW_all
 [ RUN ] global.empty_prog
 [ OK ] global.empty_prog
 [ RUN ] global.log_all
 [ OK ] global.log_all
 [ RUN ] global.unknown_ret_is_kill_inside
 [ OK ] global.unknown_ret_is_kill_inside
 [ RUN ] global.unknown_ret_is_kill_above_allow
 [ OK ] global.unknown_ret_is_kill_above_allow
 [ RUN ] global.KILL_all
 [ OK ] global.KILL_all
 [ RUN ] global.KILL_one
 [ OK ] global.KILL_one
 [ RUN ] global.KILL_one_arg_one
 [ OK ] global.KILL_one_arg_one
 [ RUN ] global.KILL_one_arg_six
 [ OK ] global.KILL_one_arg_six
 [ RUN ] global.KILL_thread
 [==========] Running 64 tests from 1 test cases.
 [ RUN ] global.mode_strict_support
 [ OK ] global.mode_strict_support
 [ RUN ] global.mode_strict_cannot_call_prctl
 [ OK ] global.mode_strict_cannot_call_prctl
 [ RUN ] global.no_new_privs_support
 [ OK ] global.no_new_privs_support
 [ RUN ] global.mode_filter_support
 [ OK ] global.mode_filter_support
 [ RUN ] global.mode_filter_without_nnp
 [ OK ] global.mode_filter_without_nnp
 [ RUN ] global.filter_size_limits
 [ OK ] global.filter_size_limits
 [ RUN ] global.filter_chain_limits
 [ OK ] global.filter_chain_limits
 [ RUN ] global.mode_filter_cannot_move_to_strict
 [ OK ] global.mode_filter_cannot_move_to_strict
 [ RUN ] global.mode_filter_get_seccomp
 [ OK ] global.mode_filter_get_seccomp
 [ RUN ] global.ALLOW_all
 [ OK ] global.ALLOW_all
 [ RUN ] global.empty_prog
 [ OK ] global.empty_prog
 [ RUN ] global.log_all
 [ OK ] global.log_all
 [ RUN ] global.unknown_ret_is_kill_inside
 [ OK ] global.unknown_ret_is_kill_inside
 [ RUN ] global.unknown_ret_is_kill_above_allow
 [ OK ] global.unknown_ret_is_kill_above_allow
 [ RUN ] global.KILL_all
 [ OK ] global.KILL_all
 [ RUN ] global.KILL_one
 [ OK ] global.KILL_one
 [ RUN ] global.KILL_one_arg_one
 [ OK ] global.KILL_one_arg_one
 [ RUN ] global.KILL_one_arg_six
 [ OK ] global.KILL_one_arg_six
 [ RUN ] global.KILL_thread
 [ OK ] global.KILL_thread
 [ RUN ] global.KILL_process
 [ OK ] global.KILL_process
 [ RUN ] global.arg_out_of_range
 [ OK ] global.arg_out_of_range
 [ RUN ] global.ERRNO_valid
 [ OK ] global.ERRNO_valid
 [ RUN ] global.ERRNO_zero
 [ OK ] global.ERRNO_zero
 [ RUN ] global.ERRNO_capped
 [ OK ] global.ERRNO_capped
 [ RUN ] global.ERRNO_order
 [ OK ] global.ERRNO_order
 [ RUN ] TRAP.dfl
 [ OK ] TRAP.dfl
 [ RUN ] TRAP.ign
 [ OK ] TRAP.ign
 [ RUN ] TRAP.handler
 [ OK ] TRAP.handler
 [ RUN ] precedence.allow_ok
 [ OK ] precedence.allow_ok
 [ RUN ] precedence.kill_is_highest
 [ OK ] precedence.kill_is_highest
 [ RUN ] precedence.kill_is_highest_in_any_order
 [ OK ] precedence.kill_is_highest_in_any_order
 [ RUN ] precedence.trap_is_second
 [ OK ] precedence.trap_is_second
 [ RUN ] precedence.trap_is_second_in_any_order
 [ OK ] precedence.trap_is_second_in_any_order
 [ RUN ] precedence.errno_is_third
 [ OK ] precedence.errno_is_third
 [ RUN ] precedence.errno_is_third_in_any_order
 [ OK ] precedence.errno_is_third_in_any_order
 [ RUN ] precedence.trace_is_fourth
 [ OK ] precedence.trace_is_fourth
 [ RUN ] precedence.trace_is_fourth_in_any_order
 [ OK ] precedence.trace_is_fourth_in_any_order
 [ RUN ] precedence.log_is_fifth
 [ OK ] precedence.log_is_fifth
 [ RUN ] precedence.log_is_fifth_in_any_order
 [ OK ] precedence.log_is_fifth_in_any_order
 [ RUN ] TRACE_poke.read_has_side_effects
 [ OK ] TRACE_poke.read_has_side_effects
 [ RUN ] TRACE_poke.getpid_runs_normally
 [ OK ] TRACE_poke.getpid_runs_normally
 [ RUN ] TRACE_syscall.ptrace_syscall_redirected
 [ OK ] TRACE_syscall.ptrace_syscall_redirected
 [ RUN ] TRACE_syscall.ptrace_syscall_dropped
 [ OK ] TRACE_syscall.ptrace_syscall_dropped
 [ RUN ] TRACE_syscall.syscall_allowed
 [ OK ] TRACE_syscall.syscall_allowed
 [ RUN ] TRACE_syscall.syscall_redirected
 [ OK ] TRACE_syscall.syscall_redirected
 [ RUN ] TRACE_syscall.syscall_dropped
 [ OK ] TRACE_syscall.syscall_dropped
 [ RUN ] TRACE_syscall.skip_after_RET_TRACE
 [ OK ] TRACE_syscall.skip_after_RET_TRACE
 [ RUN ] TRACE_syscall.kill_after_RET_TRACE
 [ OK ] TRACE_syscall.kill_after_RET_TRACE
 [ RUN ] TRACE_syscall.skip_after_ptrace
 [ OK ] TRACE_syscall.skip_after_ptrace
 [ RUN ] TRACE_syscall.kill_after_ptrace
 [ OK ] TRACE_syscall.kill_after_ptrace
07:34:03 ERROR| [stderr] seccomp_bpf.c:2913:global.get_metadata:Expected sizeof(md) (16) == ptrace(0x420d, pid, sizeof(md), &md) (18446744073709551615)
07:34:03 ERROR| [stderr] global.get_metadata: Test terminated by assertion
 [ RUN ] global.seccomp_syscall
 [ OK ] global.seccomp_syscall
 [ RUN ] global.seccomp_syscall_mode_lock
 [ OK ] global.seccomp_syscall_mode_lock
 [ RUN ] global.detect_seccomp_filter_flags
 [ OK ] global.detect_seccomp_filter_flags
 [ RUN ] global.TSYNC_first
 [ OK ] global.TSYNC_first
 [ RUN ] TSYNC.siblings_fail_prctl
 [ OK ] TSYNC.siblings_fail_prctl
 [ RUN ] TSYNC.two_siblings_with_ancestor
 [ OK ] TSYNC.two_siblings_with_ancestor
 [ RUN ] TSYNC.two_sibling_want_nnp
 [ OK ] TSYNC.two_sibling_want_nnp
 [ RUN ] TSYNC.two_siblings_with_no_filter
 [ OK ] TSYNC.two_siblings_with_no_filter
 [ RUN ] TSYNC.two_siblings_with_one_divergence
 [ OK ] TSYNC.two_siblings_with_one_divergence
 [ RUN ] TSYNC.two_siblings_not_under_filter
 [ OK ] TSYNC.two_siblings_not_under_filter
 [ RUN ] global.syscall_restart
 [ OK ] global.syscall_restart
 [ RUN ] global.filter_flag_log
 [ OK ] global.filter_flag_log
 [ RUN ] global.get_action_avail
 [ OK ] global.get_action_avail
 [ RUN ] global.get_metadata
 [ FAIL ] global.get_metadata
 [==========] 63 / 64 tests passed.
 [ FAILED ]
 not ok 1..1 selftests: seccomp_bpf [FAIL]

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-43-generic 4.15.0-43.46
ProcVersionSignature: User Name 4.15.0-43.46-generic 4.15.18
Uname: Linux 4.15.0-43-generic x86_64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Jan 9 07:18 seq
 crw-rw---- 1 root audio 116, 33 Jan 9 07:18 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CurrentDmesg:

Date: Wed Jan 9 07:20:12 2019
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
PciMultimedia:

ProcFB: 0 cirrusdrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-43-generic root=UUID=2f68c627-8ab4-40d5-8c06-6563436d0f96 ro console=ttyS0,115200n8
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-43-generic N/A
 linux-backports-modules-4.15.0-43-generic N/A
 linux-firmware 1.173.2
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: Ubuntu-1.8.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-xenial
dmi.modalias: dmi:bvnSeaBIOS:bvrUbuntu-1.8.2-1ubuntu1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-xenial:cvnQEMU:ct1:cvrpc-i440fx-xenial:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-xenial
dmi.sys.vendor: QEMU

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1811057

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: global.get_metadata in seccomp_bpf test from ubuntu_kernel_selftests failed on Bionic

Found on Power8 as well.

tags: added: ppc64el
Revision history for this message
Sean Feole (sfeole) wrote :

We have seen similar failures on Xenial and Bionic in the Oracle OCP Cloud. Across all instances flavor sizes

01/24 02:42:43 ERROR| utils:0153| [stderr] seccomp_bpf.c:2913:global.get_metadata:Expected sizeof(md) (16) == ptrace(0x420d, pid, sizeof(md), &md) (18446744073709551615)
01/24 02:42:43 ERROR| utils:0153| [stderr] global.get_metadata: Test terminated by assertion
01/24 02:43:26 ERROR| test:0414| Exception escaping from test:
Traceback (most recent call last):
  File "/home/ubuntu/autotest/client/shared/test.py", line 411, in _exec
    _call_test_function(self.execute, *p_args, **p_dargs)
  File "/home/ubuntu/autotest/client/shared/test.py", line 823, in _call_test_function
    return func(*args, **dargs)
  File "/home/ubuntu/autotest/client/shared/test.py", line 291, in execute
    postprocess_profiled_run, args, dargs)
  File "/home/ubuntu/autotest/client/shared/test.py", line 212, in _call_run_once
    self.run_once(*args, **dargs)
  File "/home/ubuntu/autotest/client/tests/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py", line 115, in run_once
    raise error.TestFail('Test failed for ' + test_name)
TestFail: Test failed for seccomp

---------------

01/24 02:42:30 ERROR| utils:0153| [stderr] test: TPACKET_V1 with PACKET_RX_RING .................... 100 pkts (14200 bytes)
01/24 02:42:30 ERROR| utils:0153| [stderr] test: TPACKET_V1 with PACKET_TX_RING .................... 100 pkts (14200 bytes)
01/24 02:42:30 ERROR| utils:0153| [stderr] test: TPACKET_V2 with PACKET_RX_RING .................... 100 pkts (14200 bytes)
01/24 02:42:30 ERROR| utils:0153| [stderr] test: TPACKET_V2 with PACKET_TX_RING .................... 100 pkts (14200 bytes)
01/24 02:42:30 ERROR| utils:0153| [stderr] test: TPACKET_V3 with PACKET_RX_RING .................... 100 pkts (14200 bytes)
01/24 02:42:30 ERROR| utils:0153| [stderr] test: TPACKET_V3 with PACKET_TX_RING .................... 100 pkts (14200 bytes)
01/24 02:42:43 ERROR| utils:0153| [stderr] seccomp_bpf.c:2913:global.get_metadata:Expected sizeof(md) (16) == ptrace(0x420d, pid, sizeof(md), &md) (18446744073709551615)
01/24 02:42:43 ERROR| utils:0153| [stderr] global.get_metadata: Test terminated by assertion
01/24 02:43:26 ERROR| test:0414| Exception escaping from test:
Traceback (most recent call last):
  File "/home/ubuntu/autotest/client/shared/test.py", line 411, in _exec
    _call_test_function(self.execute, *p_args, **p_dargs)
  File "/home/ubuntu/autotest/client/shared/test.py", line 823, in _call_test_function
    return func(*args, **dargs)
  File "/home/ubuntu/autotest/client/shared/test.py", line 291, in execute
    postprocess_profiled_run, args, dargs)
  File "/home/ubuntu/autotest/client/shared/test.py", line 212, in _call_run_once
    self.run_once(*args, **dargs)
  File "/home/ubuntu/autotest/client/tests/ubuntu_kernel_selftests/ubuntu_kernel_selftests.py", line 115, in run_once
    raise error.TestFail('Test failed for ' + test_name)
TestFail: Test failed for seccomp
01/24 02:43:26 ERROR| parallel:0033| child process failed

summary: global.get_metadata in seccomp_bpf test from ubuntu_kernel_selftests
- failed on Bionic
+ fails [X & B]
tags: added: oracle
tags: added: xenial
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

This test passed on Disco / Cosmic

Changed in linux (Ubuntu Cosmic):
status: New → Fix Released
Changed in linux (Ubuntu Disco):
status: New → Fix Released
Changed in linux (Ubuntu Bionic):
status: New → Confirmed
Changed in linux (Ubuntu Xenial):
status: New → Confirmed
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

With upstream tree, this test still failed on Bionic:
[ RUN ] global.get_metadata
seccomp_bpf.c:3034:global.get_metadata:Expected sizeof(md) (16) == ret (18446744073709551615)
seccomp_bpf.c:3039:global.get_metadata:Expected md.flags (0) == SECCOMP_FILTER_FLAG_LOG (2)
seccomp_bpf.c:3044:global.get_metadata:Expected sizeof(md) (16) == ret (18446744073709551615)
global.get_metadata: Test failed at step #6
[ FAIL ] global.get_metadata

As this test has passed with 4.18 kernel on Bionic, it looks like a kernel issue to me.

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

It turns out that the seccomp in Bionic does not support seccomp metadata retrieval.

These commits are needed for Bionic to enable metadata retrieval:
26500475ac1b499d8636ff281311d633909f5d20
f06eae831f0c1fc5b982ea200daf552810e1dd55

This will reduce the failure to:
  [ RUN ] global.get_metadata
  seccomp_bpf.c:3046:global.get_metadata:Expected md.filter_off (0) == 1 (1)
  global.get_metadata: Test failed at step #6

And this one can be fixed with:
63bb0045b98ae821e56e27c2250e14bb0ae663e5

Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Changed in linux (Ubuntu Bionic):
assignee: nobody → Po-Hsu Lin (cypressyew)
status: Confirmed → In Progress
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: Incomplete → Fix Released
Brad Figg (brad-figg)
tags: added: cscc
Sean Feole (sfeole)
tags: added: gcp
tags: added: sru
tags: added: sru-20190722
removed: sru
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Bionic):
status: In Progress → Invalid
assignee: Po-Hsu Lin (cypressyew) → nobody
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

And I didn't see this on Xenial, so the bug can be closed.

Changed in linux (Ubuntu Xenial):
status: Confirmed → Invalid
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
assignee: Po-Hsu Lin (cypressyew) → nobody
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.