ubuntu_kernel_selftests.ftrace:ftracetest fails with bionic:linux 4.15.0-168.176 on s390x

Bug #1959752 reported by Kleber Sacilotto de Souza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
New
Undecided
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned
Bionic
Fix Released
Undecided
Kleber Sacilotto de Souza

Bug Description

SRU Justification

[Impact]

There seems to have been a typo in Commit 85bf17b28f97
("recordmcount.pl: look for jgnop instruction as well as bcrl on s390")
that causes errors in finding mcount locations. This seems to cause problems with ftrace initialization leading to not being able to use ftrace
functions.

[Fix]

Fix the typo by changing it to the correct instruction.

[Test Case]

Ftrace files in /sys/kernel/debug/tracing should be able to be read from and written to with normal functionality. Ftrace selftests should now pass.

[Where things could go wrong]

Its a simple typo fix so none really.

-------------------------------------------------------
All ftrace tests from selftests are failing with bionic:linux 4.15.0-168.176 on s390x:

https://autopkgtest.ubuntu.com/results/autopkgtest-bionic/bionic/s390x/l/linux/20220201_190955_5689e@/log.gz

==========================================================================
selftests: ftracetest
========================================
=== Ftrace unit tests ===
[1] Basic trace file check [FAIL]
[2] Basic test for tracers [FAIL]
[3] Basic trace clock test [FAIL]
[4] Basic event tracing check [FAIL]
[5] Snapshot and tracing setting [FAIL]
[6] event tracing - enable/disable with event level files [FAIL]
[7] event tracing - restricts events based on pid [FAIL]
[8] event tracing - enable/disable with subsystem level files [FAIL]
[9] event tracing - enable/disable with top level files [FAIL]
[10] ftrace - function graph filters with stack tracer [FAIL]
[11] ftrace - function graph filters [FAIL]
[12] ftrace - function pid filters [FAIL]
[13] ftrace - test for function event triggers [FAIL]
[14] ftrace - function profiler with function tracing [FAIL]
[15] ftrace - test reading of set_ftrace_filter [FAIL]
[16] ftrace - test for function traceon/off triggers [FAIL]
[17] Test creation and deletion of trace instances while setting an event [FAIL]
[18] Test creation and deletion of trace instances [FAIL]
[19] Kprobe dynamic event - adding and removing [FAIL]
[20] Kprobe dynamic event - busy event check [FAIL]
[21] Kprobe dynamic event with arguments [FAIL]
[22] Kprobe event string type argument [FAIL]
[23] Kprobe event argument syntax [FAIL]
[24] Kprobes event arguments with types [FAIL]
[25] Kprobe event auto/manual naming [FAIL]
[26] Kprobe dynamic event with function tracer [FAIL]
[27] Kretprobe dynamic event with arguments [FAIL]
[28] Kretprobe dynamic event with maxactive [FAIL]
[29] Register/unregister many kprobe events [FAIL]
[30] event trigger - test multiple actions on hist trigger [FAIL]
[31] event trigger - test synthetic_events syntax parser [FAIL]
[32] event trigger - test event enable/disable trigger [FAIL]
[33] event trigger - test trigger filter [FAIL]
[34] event trigger - test histogram modifiers [FAIL]
[35] event trigger - test multiple histogram triggers [FAIL]
[36] event trigger - test snapshot-trigger [FAIL]
[37] event trigger - test stacktrace-trigger [FAIL]
[38] event trigger - test traceon/off trigger [FAIL]
[39] (instance) Basic test for tracers [FAIL]
[40] (instance) Basic trace clock test [FAIL]
[41] (instance) Snapshot and tracing setting [FAIL]
[42] (instance) event tracing - enable/disable with event level files [FAIL]
[43] (instance) event tracing - restricts events based on pid [FAIL]
[44] (instance) event tracing - enable/disable with subsystem level files [FAIL]
[45] (instance) ftrace - test for function event triggers [FAIL]
[46] (instance) ftrace - test for function traceon/off triggers [FAIL]
[47] (instance) event trigger - test event enable/disable trigger [FAIL]
[48] (instance) event trigger - test trigger filter [FAIL]
[49] (instance) event trigger - test histogram modifiers [FAIL]
[50] (instance) event trigger - test multiple histogram triggers [FAIL]

# of passed: 0
# of failed: 50
# of unresolved: 0
# of untested: 0
# of unsupported: 0
# of xfailed: 0
# of undefined(test bug): 0
not ok 1..1 selftests: ftracetest [FAIL]
==========================================================================

After some debugging I've found out that the testcases are not actually run, the failure happens while running 'tools/testing/selftests/ftrace/test.d/functions:initialize_ftrace()', on the following line:

[ -f set_ftrace_filter ] && echo | tee set_ftrace_*

After a reboot for clean ftrace state, with kernel 4.15.0-168-generic:

root@kleber-bionic:/sys/kernel/debug/tracing# head set_ftrace_*
head: cannot open 'set_ftrace_filter' for reading: No such device
head: cannot open 'set_ftrace_notrace' for reading: No such device
==> set_ftrace_pid <==
no pid

With kernel 4.15.0-167-generic:

root@kleber-bionic-2:/sys/kernel/debug/tracing# head set_ftrace_*
==> set_ftrace_filter <==
#### all functions enabled ####

==> set_ftrace_notrace <==
#### no functions disabled ####

==> set_ftrace_pid <==
no pid

Changed in linux (Ubuntu):
status: New → Invalid
Changed in linux (Ubuntu Bionic):
status: New → Confirmed
description: updated
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

The regression was introduced by the following commit applied to bionic:linux:

commit 699bf409d4d2895733d3e2f2eb01166d141650ce
Author: Jerome Marchand <email address hidden>
Date: Fri Dec 10 10:38:27 2021 +0100

    recordmcount.pl: look for jgnop instruction as well as bcrl on s390

    BugLink: https://bugs.launchpad.net/bugs/1957957

    commit 85bf17b28f97ca2749968d8786dc423db320d9c2 upstream.

description: updated
Changed in linux (Ubuntu Bionic):
status: Confirmed → In Progress
assignee: nobody → Kleber Sacilotto de Souza (kleber-souza)
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-dell300x/4.15.0-1035.40 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
Revision history for this message
Kleber Sacilotto de Souza (kleber-souza) wrote :

All ubuntu_kernel_selftests.ftrace:ftracetest tests completed successfully with bionic:linux 4.15.0-169.177:

https://autopkgtest.ubuntu.com/results/autopkgtest-bionic/bionic/s390x/l/linux/20220207_154815_bf623@/log.gz

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (15.4 KiB)

This bug was fixed in the package linux - 4.15.0-169.177

---------------
linux (4.15.0-169.177) bionic; urgency=medium

  * bionic/linux: 4.15.0-169.177 -proposed tracker (LP: #1959877)

  * ubuntu_kernel_selftests.ftrace:ftracetest fails with bionic:linux
    4.15.0-168.176 on s390x (LP: #1959752)
    - recordmcount.pl: fix typo in s390 mcount regex

linux (4.15.0-168.176) bionic; urgency=medium

  * bionic/linux: 4.15.0-168.176 -proposed tracker (LP: #1959308)

  * CVE-2022-22942
    - SAUCE: drm/vmwgfx: Fix stale file descriptors on failed usercopy

  * Bionic update: upstream stable patchset 2022-01-25 (LP: #1959033)
    - IB/qib: Use struct_size() helper
    - IB/qib: Protect from buffer overflow in struct qib_user_sdma_pkt fields
    - net: usb: lan78xx: add Allied Telesis AT29M2-AF
    - can: kvaser_usb: get CAN clock frequency from device
    - HID: holtek: fix mouse probing
    - spi: change clk_disable_unprepare to clk_unprepare
    - IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
    - netfilter: fix regression in looped (broad|multi)cast's MAC handling
    - qlcnic: potential dereference null pointer of rx_queue->page_ring
    - net: accept UFOv6 packages in virtio_net_hdr_to_skb
    - net: skip virtio_net_hdr_set_proto if protocol already set
    - bonding: fix ad_actor_system option setting to default
    - fjes: Check for error irq
    - drivers: net: smc911x: Check for error irq
    - sfc: falcon: Check null pointer of rx_queue->page_ring
    - hwmon: (lm90) Fix usage of CONFIG2 register in detect function
    - ALSA: jack: Check the return value of kstrdup()
    - ALSA: drivers: opl3: Fix incorrect use of vp->state
    - Input: atmel_mxt_ts - fix double free in mxt_read_info_block
    - x86/pkey: Fix undefined behaviour with PKRU_WD_BIT
    - pinctrl: stm32: consider the GPIO offset to expose all the GPIO lines
    - ARM: 9169/1: entry: fix Thumb2 bug in iWMMXt exception handling
    - f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr()
    - usb: gadget: u_ether: fix race in setting MAC address in setup phase
    - KVM: VMX: Fix stale docs for kvm-intel.emulate_invalid_guest_state
    - hwmon: (lm90) Do not report 'busy' status bit as alarm
    - ax25: NPD bug when detaching AX25 device
    - hamradio: defer ax25 kfree after unregister_netdev
    - hamradio: improve the incomplete fix to avoid NPD
    - phonet/pep: refuse to enable an unbound pipe
    - parisc: Correct completer in lws start

  * Bionic update: upstream stable patchset 2022-01-14 (LP: #1957957)
    - nfc: fix segfault in nfc_genl_dump_devices_done
    - drm/msm/dsi: set default num_data_lanes
    - net/mlx4_en: Update reported link modes for 1/10G
    - parisc/agp: Annotate parisc agp init functions with __init
    - i2c: rk3x: Handle a spurious start completion interrupt flag
    - net: netlink: af_netlink: Prevent empty skb by adding a check on len.
    - tracing: Fix a kmemleak false positive in tracing_map
    - bpf: fix panic due to oob in bpf_prog_test_run_skb
    - hwmon: (dell-smm) Fix warning on /proc/i8k creation error
    - mac80211: send ADDBA requests using the tid/queue of the aggregation session
    - recordmcount.pl:...

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
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.