Skip to content

android-4.19 Cuttlefish x86 does not boot after LLVM commit 5b22bcc2b70d82c73ce5428170dcc2038a729d74 #852

@nathanchance

Description

@nathanchance

Background: I have started boot testing Android Cuttlefish to try and catch bugs before they hit Android through either upstream Linux or LLVM.

I do not really have a whole ton of information to offer up right now other than a git bisect and isolating the problem purely to CONFIG_LTO_CLANG (CONFIG_CFI_CLANG does not affect it). I do not see this problem with android-5.4 or android-mainline, which I suspect is because they are using ThinLTO.

llvm/llvm-project@5b22bcc

$ git bisect log
# bad: [c4b4c0c47c992e63fc0792d71bea82b6e6dcf0cd] [mlir] Expand shape functions in ShapeInference doc
# good: [f0654875fb240ed9d4b2718cfa5f5c7f9d9daef3] [gn build] Port f2af0607000
git bisect start 'origin/master' 'f0654875fb240ed9d4b2718cfa5f5c7f9d9daef3'
# bad: [200ac6c3d88a1816c7ea86d5cde85e115a809542] [llvm-objcopy][test] Fix tests when path contains "bar"
git bisect bad 200ac6c3d88a1816c7ea86d5cde85e115a809542
# good: [8bb9642fd7cda09449af5cb0cced220e57a0011a] [gn build] Port 601687bf731
git bisect good 8bb9642fd7cda09449af5cb0cced220e57a0011a
# good: [1d9e08ec35a5979f103b876f8dd2324f77db3f6e] [AMDGPU] Add file headers for few files where it is missing.
git bisect good 1d9e08ec35a5979f103b876f8dd2324f77db3f6e
# good: [17dbc6611df9044d779d85b3d545bd37e5dd5200] AMDGPU: Cleanup and fix SMRD offset handling
git bisect good 17dbc6611df9044d779d85b3d545bd37e5dd5200
# good: [84bd8511085891a7c5f413f2d54d3a31b98105aa] [GlobalISel][IRTranslator] When translating vector geps, splat the base pointer if required.
git bisect good 84bd8511085891a7c5f413f2d54d3a31b98105aa
# good: [d28763cad06e66651e1936756d3e28126b055abf] Replace 'AllowExplicit' bool with an enum. No functionality change.
git bisect good d28763cad06e66651e1936756d3e28126b055abf
# good: [5ae6554a1dcd2e39346030c06d364492901c9e8d] PR41991: Accept attributes on defaulted and deleted friends.
git bisect good 5ae6554a1dcd2e39346030c06d364492901c9e8d
# bad: [5b22bcc2b70d82c73ce5428170dcc2038a729d74] [X86][ELF] Prefer to lower MC_GlobalAddress operands to .Lfoo$local
git bisect bad 5b22bcc2b70d82c73ce5428170dcc2038a729d74
# good: [980517b3530ffb7faa1a23fdc007d78f5b45ae3c] [Concepts] Check function constraints before deducing auto return type
git bisect good 980517b3530ffb7faa1a23fdc007d78f5b45ae3c
# first bad commit: [5b22bcc2b70d82c73ce5428170dcc2038a729d74] [X86][ELF] Prefer to lower MC_GlobalAddress operands to .Lfoo$local

I do not have a super clean set of steps to reproduce this but I can at some point of the next couple of days. If you are familiar with building Android kernels using build.sh and the build config system and using Cuttlefish, it should be fairly easy to reproduce with an upstream version of LLVM.

Good dmesg.

Bad dmesg.

cc @MaskRay @samitolvanen

Metadata

Metadata

Assignees

Labels

[BUG] linuxA bug that should be fixed in the mainline kernel.[FEATURE] LTORelated to building the kernel with LLVM Link Time Optimization[FIXED][LINUX] 5.8This bug was fixed in Linux 5.8

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions