Cannot build kernel 4.15.0-48.51 due to an in-source-tree ZFS module.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Low
|
Andrea Righi | ||
Bionic |
Fix Released
|
Low
|
Unassigned | ||
zfs-linux (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
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 c50532b9d7b623f
Author: Andrea Righi <email address hidden>
Date: Tue Apr 2 18:31:55 2019 +0200
UBUNTU: Ubuntu-4.15.0-48.51
Signed-off-by: Andrea Righi <email address hidden>
1. Build a kernel image with 'zfs_enable' flag set as false.
2. Build SPL/ZFS modules independently by 'make' command (debug purpose; DECLARE_
But 'make' was always failed at the same point, 'zfs/module/
In file included from /home/np/
/home/np/
/home/np/
_
/home/np/
{ assign; } \
^~~~~~
/home/np/
TP_fast_assign(
^~~~~~~~~~~~~~
In file included from /home/np/
/home/np/
/home/np/
_
/home/np/
{ assign; } \
^~~~~~
/home/np/
TP_fast_assign(
^~~~~~~~~~~~~~
I tried to debug this issue with myself and found something intriguing.
In 'zfs/include/
DECLARE_
TP_ARGS(tx, dirty, min_tx_time),
),
),
"anyobj %d dirty_delayed %d start %llu wait_dirty %d err %i "
"} dirty %llu min_tx_time %llu",
);
But, implementation of 'strcut dmu_tx' doesn't contain 'tx_dirty_delayed' (in zfs/include/
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;
void *tx_tempreserve
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=
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=
ProcVersionSign
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.
RelatedPackageV
linux-
linux-
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:
dmi.product.name: HVM domU
dmi.product.
dmi.sys.vendor: Xen
CVE References
description: | updated |
tags: | added: patch |
Changed in linux (Ubuntu): | |
importance: | Undecided → Low |
assignee: | nobody → Andrea Righi (arighi) |
description: | updated |
Changed in linux (Ubuntu Bionic): | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in linux (Ubuntu): | |
status: | Confirmed → Invalid |
Changed in linux (Ubuntu Bionic): | |
status: | Confirmed → Fix Committed |
tags: |
added: verification-done-bionic removed: verification-needed-bionic |
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 1828763
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.