Mainline Kernel Builds Failing for > v4.20 for amd64 on kernel.ubuntu.com

Bug #1811721 reported by Robert Strube
58
This bug affects 12 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

It appears that mainline kernel builds (on kernel.ubuntu.com) have been failing for amd64 since v4.20.1. Interestingly enough v4.20 was able to build successfully.

Note: this also includes 5.0rc builds as well.

You can see the build logs here:

https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.20.1/BUILD.LOG.amd64
https://kernel.ubuntu.com/~kernel-ppa/mainline/v4.20.2/BUILD.LOG.amd64

Looking at the build logs it appears that the kernel and all the in-tree modules build successfully, but the build fails when trying to build the proprietary nvidia kernel modules. With v4.20 building these modules does not appear in the log. Perhaps this build step was added more recently?

Here are the relevant lines from the end of the build log for v4.20.2 (which I've also attached):
-------------------------------------------------------------------------------------------------

2019-01-10 03:38:12 (105 MB/s) - 'nvidia-kernel-source-390_390.87-0ubuntu4_amd64.deb' saved [8433608/8433608]

II: dkms-build downloading nvidia-390 (nvidia-dkms-390_390.87-0ubuntu4_amd64.deb)
--2019-01-10 03:38:13-- http://us.archive.ubuntu.com/ubuntu/pool/restricted/n/nvidia-graphics-drivers-390/nvidia-dkms-390_390.87-0ubuntu4_amd64.deb
Resolving us.archive.ubuntu.com (us.archive.ubuntu.com)... 91.189.91.26, 91.189.91.23, 2001:67c:1562::16, ...
Connecting to us.archive.ubuntu.com (us.archive.ubuntu.com)|91.189.91.26|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27288 (27K) [application/x-debian-package]
Saving to: 'nvidia-dkms-390_390.87-0ubuntu4_amd64.deb'

     0K .......... .......... ...... 100% 9.46M=0.003s

2019-01-10 03:38:13 (9.46 MB/s) - 'nvidia-dkms-390_390.87-0ubuntu4_amd64.deb' saved [27288/27288]

linux:BuiltUsing=nvidia-kernel-source-390 (= 390.87-0ubuntu4),
II: dkms-build building nvidia-390

Creating symlink /home/kernel/COD/linux/debian/build/build-generic/______________________________________________dkms/build/nvidia/390.87/source ->
                 /home/kernel/COD/linux/debian/build/build-generic/______________________________________________dkms/source/nvidia-390.87

DKMS: add completed.
applying patch buildfix_kernel_4.18.patch...patching file conftest.sh
patching file nvidia-drm/nvidia-drm-connector.c
patching file nvidia-drm/nvidia-drm-encoder.c
patching file nvidia-drm/nvidia-drm-helper.h
patching file nvidia-drm/nvidia-drm.Kbuild

Building module:
cleaning build area...(bad exit status: 2)
unset ARCH; env NV_VERBOSE=1 'make' -j16 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=4.20.1-042001-generic IGNORE_XEN_PRESENCE=1 IGNORE_CC_MISMATCH=1 SYSSRC=/home/kernel/COD/linux/debian/build/build-generic/______________________________________________dkms/headers/linux-headers-4.20.1-042001-generic LD=/usr/bin/ld.bfd modules.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.20.1-042001-generic (x86_64)
Consult /home/kernel/COD/linux/debian/build/build-generic/______________________________________________dkms/build/nvidia/390.87/build/make.log for more information.
debian/scripts/dkms-build: line 121: /home/kernel/COD/linux/debian/build/build-generic/______________________________________________dkms/build/nvidia/390.87/4.20.1-042001-generic/*/log/make.log: No such file or directory
make: *** [debian/rules.d/2-binary-arch.mk:201: install-generic] Error 1

Thanks!
Rob

Revision history for this message
Robert Strube (robstrube) wrote :
summary: - Mainline Kernel Builds Failing for > v4.20.1 for amd64 on
+ Mainline Kernel Builds Failing for > v4.20 for amd64 on
kernel.ubuntu.com
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 1811721

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
賴家亨 (laichiaheng) wrote :

How do we offer the missing required logs if we are running linux mainline?

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Robert Strube (robstrube) wrote :

Unfortunately the bug appears to be in on the build system that kernel.ubuntu.com uses, so we'll be unable to provide logs from our systems. We did point out the build log on kernel.ubuntu.com that shows the build errors.

Revision history for this message
Robert Strube (robstrube) wrote :

One other thing to note is that the v5.0rc1 build actually succeeded, it was v5.0rc2 that failed. Checking on the build logs again it appears that building the nvidia kernel module is causing the problem.

Revision history for this message
Phusho (phusho) wrote :

Problem is building NVIDIA kernel module, because of change in kernel function do_gettimeofday to efi_gettimeofday, if you disable build of NVIDIA DKMS in package rules, kernel will build.

Revision history for this message
Phusho (phusho) wrote :

5.0-rc1
+++ b/debian.master/rules.d/amd64.mk
@@ -0,0 +1,22 @@
+human_arch = 64 bit x86
+build_arch = x86
+header_arch = $(build_arch)
+defconfig = defconfig
+flavours = generic lowlatency
+build_image = bzImage
+kernel_file = arch/$(build_arch)/boot/bzImage
+install_file = vmlinuz
+loader = grub
+vdso = vdso_install
+no_dumpfile = true
+uefi_signed = true
+do_tools_usbip = true
+do_tools_cpupower = true
+do_tools_perf = true
+do_tools_x86 = true
+do_tools_hyperv = true
+do_tools_host = true
+do_extras_package = true
+do_tools_common = true
+do_tools_acpidbg = true
+do_zfs = true

5.0-rc2
+++ b/debian.master/rules.d/amd64.mk
@@ -0,0 +1,23 @@
+human_arch = 64 bit x86
+build_arch = x86
+header_arch = $(build_arch)
+defconfig = defconfig
+flavours = generic lowlatency
+build_image = bzImage
+kernel_file = arch/$(build_arch)/boot/bzImage
+install_file = vmlinuz
+loader = grub
+vdso = vdso_install
+no_dumpfile = true
+uefi_signed = true
+do_tools_usbip = true
+do_tools_cpupower = true
+do_tools_perf = true
+do_tools_x86 = true
+do_tools_hyperv = true
+do_tools_host = true
+do_extras_package = true
+do_tools_common = true
+do_tools_acpidbg = true
+do_zfs = true
+do_dkms_nvidia = true

patch 0001-base-packaging.patch
is different in the two builds

Revision history for this message
Robert Strube (robstrube) wrote :

Thanks for the response. Who on the kernel.ubuntu.com team would able to make these changes? I can also try to build the kernel locally to confirm.

Revision history for this message
Rocko (rockorequin) wrote :

I can build the mainline 4.20.3 kernel locally if I set "do_dkms_nvidia = false" in its 0001-base-packaging.patch.

Why would we even want to build the nvidia driver for recent kernels? Even the most up-to-date nvidia drivers rarely compile for -rc kernels, and ubuntu typically has an older version of the nvidia driver anyway (currently nvidia-390 from last August), so kernel build failure seems highly likely to occur if it relies on the nvidia driver building successfully.

Revision history for this message
Phusho (phusho) wrote :

I have built 5.0 rc2 with "do_dkms_nvidia = false"

賴家亨 (laichiaheng)
Changed in linux (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Robert Strube (robstrube) wrote :

Looks like 4.20.3 on kernel.ubuntu.com built successfully. Thanks for the fix!

Revision history for this message
Rocko (rockorequin) wrote :

Yes, the amd64 kernels have now built on kernel.ubuntu.com. But newer mainline kernels are no longer appearing there - 4.20.4 and 5.0-rc3 are missing!

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.