Unable to build kvm-unit-test on i386 system

Bug #1765366 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Medium
Unassigned
linux (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

When trying to build the kvm-unit-test on i386 node, it will fail with:

  gcc -m32 -O1 -g -MMD -MF lib/x86/.usermode.d -Wall -Wwrite-strings -Wclobbered -Wempty-body -Wuninitialized -Wignored-qualifiers -Wunused-but-set-parameter -Werror -fno-omit-frame-pointer -Wno-frame-address -fno-pic -no-pie -Wmissing-parameter-type -Wold-style-declaration -Woverride-init -ffreestanding -I /home/ubuntu/autotest/client/tmp/ubuntu_kvm_unit_tests/src/kvm-unit-tests/lib -I lib -c -o lib/x86/usermode.o lib/x86/usermode.c
  <builtin>: recipe for target 'lib/x86/usermode.o' failed
  stderr:
  lib/x86/usermode.c: In function ‘run_in_user’:
  lib/x86/usermode.c:49:2: error: inconsistent operand constraints in an ‘asm’
    asm volatile (
    ^~~
  make: *** [lib/x86/usermode.o] Error 1

Steps:
  1. git clone --depth=1 https://git.kernel.org/pub/scm/virt/kvm/kvm-unit-tests.git
  2. ./configure
  3. make

This is a test suite issue, not a regression, as it can be reproduced on 4.13.0-38

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: linux-image-4.13.0-38-generic 4.13.0-38.43
ProcVersionSignature: User Name 4.13.0-38.43-generic 4.13.16
Uname: Linux 4.13.0-38-generic i686
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Apr 19 09:39 seq
 crw-rw---- 1 root audio 116, 33 Apr 19 09:39 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.7-0ubuntu3.8
Architecture: i386
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: Thu Apr 19 10:12:48 2018
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb:
 Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
 Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc. PowerEdge R310
PciMultimedia:

ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB: 0 mgadrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.13.0-38-generic root=UUID=7b91a2b8-2e02-407e-a51d-766f6d969020 ro
RelatedPackageVersions:
 linux-restricted-modules-4.13.0-38-generic N/A
 linux-backports-modules-4.13.0-38-generic N/A
 linux-firmware 1.169.3
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 08/17/2011
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.8.2
dmi.board.name: 05XKKK
dmi.board.vendor: Dell Inc.
dmi.board.version: A05
dmi.chassis.type: 23
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.8.2:bd08/17/2011:svnDellInc.:pnPowerEdgeR310:pvr:rvnDellInc.:rn05XKKK:rvrA05:cvnDellInc.:ct23:cvr:
dmi.product.name: PowerEdge R310
dmi.sys.vendor: Dell Inc.

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 1765366

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
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Triaged
tags: added: kernel-da-key
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

A quick bisect shows commit 1c93387eecbe899816765d8f9be296ba2255ec75 x86: Add utility to run function in User Mode is causing this issue.

$ git bisect log
git bisect start
# bad: [2352e986e4599bc4842c225762c78fa49f18648d] x86: move TSC_ADJUST MSR to msr.h
git bisect bad 2352e986e4599bc4842c225762c78fa49f18648d
# good: [a90f5a3c386445aa129a55090ea1998740772597] x86: prevent GCC from using sse* instructions
git bisect good a90f5a3c386445aa129a55090ea1998740772597
# bad: [5722aff10fa583bddd29378dc8f1006cff7631c4] x86: nVMX: Verify pass-through IOAPIC & LAPIC to guest after ioapic scan
git bisect bad 5722aff10fa583bddd29378dc8f1006cff7631c4
# bad: [9f02572626e784fa78ce708d3f3566cda48e2378] x86: Add definition for 64 bit Segment descriptor
git bisect bad 9f02572626e784fa78ce708d3f3566cda48e2378
# good: [230db53f9c26b44633b41393e9b600eb087814b3] kvm: debug: split bp_addr and db_addr
git bisect good 230db53f9c26b44633b41393e9b600eb087814b3
# bad: [2bac62497563c072d0325ad5841008e68033eced] x86: Add Test Utility to run in User Mode and catch exceptions
git bisect bad 2bac62497563c072d0325ad5841008e68033eced
# bad: [1c93387eecbe899816765d8f9be296ba2255ec75] x86: Add utility to run function in User Mode
git bisect bad 1c93387eecbe899816765d8f9be296ba2255ec75
# first bad commit: [1c93387eecbe899816765d8f9be296ba2255ec75] x86: Add utility to run function in User Mode

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

Issue reported upstream:
https://www.spinics.net/lists/kvm/msg168472.html

Fix available at:
https://www.spinics.net/lists/kvm/msg168677.html

Therefore I'm closing this bug, thanks.

Changed in linux (Ubuntu):
status: Triaged → Fix Released
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
status: New → Fix Released
Changed in linux (Ubuntu):
status: Fix Released → Invalid
Changed in ubuntu-kernel-tests:
importance: Undecided → Medium
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.