** Changed in: linux (Ubuntu) Status: Confirmed => Invalid ** Changed in: linux (Ubuntu Bionic) Status: Confirmed => Fix Committed
-- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1828763 Title: Cannot build kernel 4.15.0-48.51 due to an in-source-tree ZFS module. Status in linux package in Ubuntu: Invalid Status in linux source package in Bionic: Fix Committed Bug description: [Impact] * In b49151d684f44 tx_waited has been renamed to tx_dirty_delayed, but only in the tracepoint definition (in trace_dmu.h) and not in the rest of the code, causing build errors if zfs tracepoints are enabled. * Fix by reverting tx_dirty_delayed back to the original name tx_waited NOTE: this bug doesn't show up in regular kernel builds, because zfs tracepoints are not enabled by default, it is possible to see this problem only by enabling them and recompiling zfs outside our regular build process, but it's a good cleanup anyway (in case we need to enable zfs tracepoints in the future). [Test Case] * enable zfs tracepoints in config and build zfs [Fix] * Restore the old struct name to fix the build bug [Regression Potential] * It is a very small fix (just a rename of a struct member), so regression potential is minimal [Original bug report] I tried to build a kernel 4.15.0-48.51 that cloned from the Ubuntu kernel git (x86_64-generic flavour). commit c50532b9d7b623ff98aeaf0b848e58adae54ca75 (HEAD -> master, tag: Ubuntu-4.15.0-48.51, origin/master, origin/HEAD) Author: Andrea Righi <andrea.ri...@canonical.com> Date: Tue Apr 2 18:31:55 2019 +0200 UBUNTU: Ubuntu-4.15.0-48.51 Signed-off-by: Andrea Righi <andrea.ri...@canonical.com> 1. Build a kernel image with 'zfs_enable' flag set as false. 2. Build SPL/ZFS modules independently by 'make' command (debug purpose; DECLARE_EVENT_CLASS() enabled). But 'make' was always failed at the same point, 'zfs/module/zfs/trace.c' (as seem as below). In file included from /home/np/linux-4.15/include/trace/define_trace.h:96:0, from /home/np/linux-4.15/zfs/include/sys/trace_dmu.h:127, from /home/np/linux-4.15/zfs/module/zfs/trace.c:45: /home/np/linux-4.15/zfs/include/sys/trace_dmu.h: In function ‘trace_event_raw_event_zfs_delay_mintime_class’: /home/np/linux-4.15/zfs/include/sys/trace_dmu.h:65:37: error: ‘dmu_tx_t {aka struct dmu_tx}’ has no member named ‘tx_dirty_delayed’ __entry->tx_dirty_delayed = tx->tx_dirty_delayed; ^ /home/np/linux-4.15/include/trace/trace_events.h:719:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’ { assign; } \ ^~~~~~ /home/np/linux-4.15/zfs/include/sys/trace_dmu.h:60:2: note: in expansion of macro ‘TP_fast_assign’ TP_fast_assign( ^~~~~~~~~~~~~~ In file included from /home/np/linux-4.15/include/trace/define_trace.h:97:0, from /home/np/linux-4.15/zfs/include/sys/trace_dmu.h:127, from /home/np/linux-4.15/zfs/module/zfs/trace.c:45: /home/np/linux-4.15/zfs/include/sys/trace_dmu.h: In function ‘perf_trace_zfs_delay_mintime_class’: /home/np/linux-4.15/zfs/include/sys/trace_dmu.h:65:37: error: ‘dmu_tx_t {aka struct dmu_tx}’ has no member named ‘tx_dirty_delayed’ __entry->tx_dirty_delayed = tx->tx_dirty_delayed; ^ /home/np/linux-4.15/include/trace/perf.h:66:4: note: in definition of macro ‘DECLARE_EVENT_CLASS’ { assign; } \ ^~~~~~ /home/np/linux-4.15/zfs/include/sys/trace_dmu.h:60:2: note: in expansion of macro ‘TP_fast_assign’ TP_fast_assign( ^~~~~~~~~~~~~~ I tried to debug this issue with myself and found something intriguing. In 'zfs/include/sys/trace_dmu.h', the failed code accessing 'tx_dirty_delayed' from 'dmu_tx_t' (which same as 'struct dmu_tx'). DECLARE_EVENT_CLASS(zfs_delay_mintime_class, TP_PROTO(dmu_tx_t *tx, uint64_t dirty, uint64_t min_tx_time), TP_ARGS(tx, dirty, min_tx_time), TP_STRUCT__entry( __field(uint64_t, tx_txg) __field(uint64_t, tx_lastsnap_txg) __field(uint64_t, tx_lasttried_txg) __field(boolean_t, tx_anyobj) __field(boolean_t, tx_dirty_delayed) __field(hrtime_t, tx_start) __field(boolean_t, tx_wait_dirty) __field(int, tx_err) __field(uint64_t, min_tx_time) __field(uint64_t, dirty) ), TP_fast_assign( __entry->tx_txg = tx->tx_txg; __entry->tx_lastsnap_txg = tx->tx_lastsnap_txg; __entry->tx_lasttried_txg = tx->tx_lasttried_txg; __entry->tx_anyobj = tx->tx_anyobj; __entry->tx_dirty_delayed = tx->tx_dirty_delayed; __entry->tx_start = tx->tx_start; __entry->tx_wait_dirty = tx->tx_wait_dirty; __entry->tx_err = tx->tx_err; __entry->dirty = dirty; __entry->min_tx_time = min_tx_time; ), TP_printk("tx { txg %llu lastsnap_txg %llu tx_lasttried_txg %llu " "anyobj %d dirty_delayed %d start %llu wait_dirty %d err %i " "} dirty %llu min_tx_time %llu", __entry->tx_txg, __entry->tx_lastsnap_txg, __entry->tx_lasttried_txg, __entry->tx_anyobj, __entry->tx_dirty_delayed, __entry->tx_start, __entry->tx_wait_dirty, __entry->tx_err, __entry->dirty, __entry->min_tx_time) ); But, implementation of 'strcut dmu_tx' doesn't contain 'tx_dirty_delayed' (in zfs/include/sys/dmu_tx.h) struct dmu_tx { /* * No synchronization is needed because a tx can only be handled * by one thread. */ list_t tx_holds; /* list of dmu_tx_hold_t */ objset_t *tx_objset; struct dsl_dir *tx_dir; struct dsl_pool *tx_pool; uint64_t tx_txg; uint64_t tx_lastsnap_txg; uint64_t tx_lasttried_txg; txg_handle_t tx_txgh; void *tx_tempreserve_cookie; struct dmu_tx_hold *tx_needassign_txh; /* list of dmu_tx_callback_t on this dmu_tx */ list_t tx_callbacks; /* placeholder for syncing context, doesn't need specific holds */ boolean_t tx_anyobj; /* has this transaction already been delayed? */ boolean_t tx_waited; /* transaction is marked as being a "net free" of space */ boolean_t tx_netfree; /* time this transaction was created */ hrtime_t tx_start; /* need to wait for sufficient dirty space */ boolean_t tx_wait_dirty; int tx_err; }; Looks above, current in-source-tree ZFS module seems not valid... :( Are there any workarounds for this problem? --- ProblemType: Bug AlsaDevices: total 0 crw-rw----+ 1 root audio 116, 1 May 13 15:35 seq crw-rw----+ 1 root audio 116, 33 May 13 15:35 timer AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay' ApportVersion: 2.20.9-0ubuntu7.6 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: DistroRelease: Ubuntu 18.04 HibernationDevice: RESUME=/dev/mapper/ubuntu--vg-swap_1 InstallationDate: Installed on 2019-05-13 (0 days ago) InstallationMedia: Ubuntu-Server 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725) IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig' Lsusb: Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub MachineType: Xen HVM domU Package: linux (not installed) PciMultimedia: ProcEnviron: TERM=xterm PATH=(custom, no user) LANG=en_US.UTF-8 SHELL=/bin/bash ProcFB: 0 cirrusdrmfb ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-48-generic root=/dev/mapper/hostname--vg-root ro ProcVersionSignature: Ubuntu 4.15.0-48.51-generic 4.15.18 PulseList: Error: command ['pacmd', 'list'] failed with exit code 1: Home directory not accessible: Permission denied No PulseAudio daemon running, or not running as session daemon. RelatedPackageVersions: linux-restricted-modules-4.15.0-48-generic N/A linux-backports-modules-4.15.0-48-generic N/A linux-firmware 1.173.5 RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill' Tags: bionic Uname: Linux 4.15.0-48-generic x86_64 UpgradeStatus: No upgrade log present (probably fresh install) UserGroups: _MarkForUpload: True dmi.bios.date: 10/26/2018 dmi.bios.vendor: Xen dmi.bios.version: 4.7.6-6.2.1.xcp dmi.chassis.type: 1 dmi.chassis.vendor: Xen dmi.modalias: dmi:bvnXen:bvr4.7.6-6.2.1.xcp:bd10/26/2018:svnXen:pnHVMdomU:pvr4.7.6-6.2.1.xcp:cvnXen:ct1:cvr: dmi.product.name: HVM domU dmi.product.version: 4.7.6-6.2.1.xcp dmi.sys.vendor: Xen To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1828763/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp