Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gardening] simriscv32 build broken #54434

Closed
dcharkes opened this issue Dec 21, 2023 · 5 comments
Closed

[gardening] simriscv32 build broken #54434

dcharkes opened this issue Dec 21, 2023 · 5 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-duplicate Closed in favor of an existing report crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. gardening

Comments

@dcharkes
Copy link
Contributor

The RISC-V on the fuzzer bot has been failing most runs since dec 16.

https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/fuzz-linux/3474/overview
https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/fuzz-linux/3485/overview

[2416/2607] ACTION //utils/dds:generate_dds_aot_snapshot(//build/toolchain/linux:clang_x86)
FAILED: gen/dds_aot.dart.snapshot 
python3 ../../build/gn_run_binary.py compiled_action gen_snapshot --deterministic --snapshot-kind=app-aot-elf --elf=/b/s/w/ir/cache/builder/sdk/out/DebugSIMRISCV32/gen/dds_aot.dart.snapshot /b/s/w/ir/cache/builder/sdk/out/DebugSIMRISCV32/gen/utils/dds/generate_dds_aot_snapshot.dart.dill
Command failed: /b/s/w/ir/cache/builder/sdk/out/DebugSIMRISCV32/gen_snapshot --deterministic --snapshot-kind=app-aot-elf --elf=/b/s/w/ir/cache/builder/sdk/out/DebugSIMRISCV32/gen/dds_aot.dart.snapshot /b/s/w/ir/cache/builder/sdk/out/DebugSIMRISCV32/gen/utils/dds/generate_dds_aot_snapshot.dart.dill
output: ../../runtime/vm/compiler/backend/il_riscv.cc: 839: error: expected: !is_unboxed_int || RepresentationUtils::ValueSize(representation()) <= compiler::target::kWordSize
version=3.3.0-edge (main) (Unknown timestamp) on "linux_simriscv32"
pid=279162, thread=279162, isolate_group=isolate(0x57cfc9e0), isolate=(nil)((nil))
os=linux, arch=riscv32, comp=no, sim=yes
isolate_instructions=0, vm_instructions=0
fp=ffaf5708, sp=ffaf5674, pc=56ca337b
  pc 0x56ca337b fp 0xffaf5708 dart::Profiler::DumpStackTrace+0x9b
  pc 0x57308141 fp 0xffaf5728 Dart_DumpNativeStackTrace+0x21
  pc 0x569ae1c6 fp 0xffaf5758 dart::Assert::Fail+0x36
  pc 0x57174a45 fp 0xffaf57a8 dart::UnboxedConstantInstr::MakeLocationSummary+0x195
  pc 0x571c5859 fp 0xffaf5828 dart::SSALivenessAnalysis::ComputeInitialSets+0x4e9
  pc 0x5710bc1e fp 0xffaf5878 dart::LivenessAnalysis::Analyze+0x20e
  pc 0x571d39ae fp 0xffaf58d8 dart::FlowGraphAllocator::AllocateRegisters+0x2e
  pc 0x572236df fp 0xffaf5bb8 dart::CompilerPass_AllocateRegisters::DoBody+0x5f
  pc 0x57221aea fp 0xffaf5c58 dart::CompilerPass::Run+0x13a
  pc 0x57222309 fp 0xffaf5c98 dart::CompilerPass::RunPipeline+0x369
  pc 0x570bbcd4 fp 0xffaf60c8 dart::PrecompileParsedFunctionHelper::Compile+0x664
  pc 0x570bcbcd fp 0xffaf6638 dart::PrecompileFunctionHelper+0x3cd
  pc 0x570b6c2f fp 0xffaf66e8 dart::Precompiler::CompileFunction+0x1af
  pc 0x570c50ad fp 0xffaf6738 dart::Precompiler::PrecompileConstructors+0xdd
  pc 0x56cb78ab fp 0xffaf6778 dart::ProgramWalker::VisitFunction+0x4b
  pc 0x56cb46b9 fp 0xffaf67b8 dart::ProgramWalker::VisitWorklist+0xa9
  pc 0x56cb4239 fp 0xffaf6888 dart::ProgramVisitor::WalkProgram+0x4b9
  pc 0x570aced2 fp 0xffaf68f8 dart::Precompiler::PrecompileConstructors+0x82
  pc 0x570a8b8b fp 0xffaf6f88 dart::Precompiler::DoCompileAll+0x3ab
  pc 0x570a873a fp 0xffaf7288 dart::Precompiler::CompileAll+0xda
  pc 0x57305379 fp 0xffaf7378 Dart_Precompile+0x299
  pc 0x5697afa9 fp 0xffaf7488 dart::bin::main+0x979
  pc 0x5697bf44 fp 0xffaf74b8 main+0x24
-- End of DumpStackTrace
=== Crash occurred when compiling dart:io__ExternalBuffer@14069316__ExternalBuffer@14069316. in AOT mode in AllocateRegisters pass
*** BEGIN CFG
AllocateRegisters
==== dart:io__ExternalBuffer@14069316__ExternalBuffer@14069316. (Constructor)
B0[graph]:0 {
      v0 <- Constant(#null) T{Null?}
      v22 <- UnboxedConstant(#1) int32
}
B1[function entry]:2 {
      v2 <- Parameter(0) T{_ExternalBuffer}
      v3 <- Parameter(1) [-9223372036854775808, 9223372036854775807] int64
}
    StoreField(v2 . size = v3 <int64>)
    v7 <- UnboxedConstant(#63) [63, 63] int64
    v8 <- ShiftInt64Op(>> [tr], v3, v7) [-1, 0] int64
    v9 <- UnboxedConstant(#1) [1, 1] int64
    v19 <- IntConverter(int64->int32, v8) int32
    v10 <- BinaryInt32Op(& [-o], v19 T{int}, v22 T{_Smi}) [0, 1] int32
    v21 <- IntConverter(int32->int64, v10 T{int}) int64
    v11 <- BinaryInt64Op(+ [tr], v3, v21 T{int}) [-9223372036854775808, 9223372036854775807] int64
    v5 <- ShiftInt64Op(>> [tr], v11, v9 T{_Smi}) [-4611686018427387904, 4611686018427387903] int64
    StoreField(v2 . start = v5 <int64>)
    StoreField(v2 . end = v5 T{int} <int64>)
    Return:20(v0)
*** END CFG

[2432/2625] ACTION //utils/dds:generate_dds_aot_snapshot_dill(//build/toolchain/linux:clang_x64)
[2433/2625] STAMP obj/utils/dds/generate_dds_aot_snapshot_dill.stamp
[3347/3540] ACTION //utils/dds:generate_dds_aot_snapshot_dill(//build/toolchain/linux:clang_x64)
[3348/3540] STAMP obj/utils/dds/generate_dds_aot_snapshot_dill.stamp
[3329/3522] ACTION //utils/dds:generate_dds_aot_snapshot_dill(//build/toolchain/linux:clang_x86)
[3330/3522] STAMP obj/utils/dds/generate_dds_aot_snapshot_dill.stamp
[2417/2607] ACTION //utils/kernel-service:kernel_service_dill(//build/toolchain/linux:clang_x86)
ninja: build stopped: subcommand failed.
buildtools/ninja/ninja -C out/DebugSIMRISCV32 -j1000 -l64 runtime dart_precompiled_runtime done.
ninja: build stopped: interrupted by user.
ninja: build stopped: interrupted by user.
ninja: build stopped: interrupted by user.
RBE Stats: down 7.86 GB, up 0 B, 34162 cache hits

Reproduces locally:

$ tools/build.py -mdebug -asimriscv32 runtime dart_precompiled_runtime
Done. Made 428 targets from 120 files in 327ms
Proxy started successfully.
buildtools/ninja/ninja -C out/DebugSIMRISCV32 -j1000 -l64 runtime dart_precompiled_runtime
ninja: Entering directory `out/DebugSIMRISCV32'
[1/199] ACTION //utils/dds:generate_dds_aot_snapshot(//build/toolchain/linux:clang_x86)
FAILED: gen/dds_aot.dart.snapshot 
python3 ../../build/gn_run_binary.py compiled_action gen_snapshot --deterministic --snapshot-kind=app-aot-elf --elf=/usr/local/google/home/dacoharkes/dart-sdk/sdk/out/DebugSIMRISCV32/gen/dds_aot.dart.snapshot /usr/local/google/home/dacoharkes/dart-sdk/sdk/out/DebugSIMRISCV32/gen/utils/dds/generate_dds_aot_snapshot.dart.dill
Command failed: /usr/local/google/home/dacoharkes/dart-sdk/sdk/out/DebugSIMRISCV32/gen_snapshot --deterministic --snapshot-kind=app-aot-elf --elf=/usr/local/google/home/dacoharkes/dart-sdk/sdk/out/DebugSIMRISCV32/gen/dds_aot.dart.snapshot /usr/local/google/home/dacoharkes/dart-sdk/sdk/out/DebugSIMRISCV32/gen/utils/dds/generate_dds_aot_snapshot.dart.dill
output: ../../runtime/vm/compiler/backend/il_riscv.cc: 839: error: expected: !is_unboxed_int || RepresentationUtils::ValueSize(representation()) <= compiler::target::kWordSize
version=3.3.0-edge (main) (Unknown timestamp) on "linux_simriscv32"
pid=3381463, thread=3381463, isolate_group=isolate(0x581209f0), isolate=(nil)((nil))
os=linux, arch=riscv32, comp=no, sim=yes
isolate_instructions=0, vm_instructions=0
fp=ffa37d08, sp=ffa37c74, pc=56be837b
  pc 0x56be837b fp 0xffa37d08 dart::Profiler::DumpStackTrace+0x9b
  pc 0x5724d141 fp 0xffa37d28 Dart_DumpNativeStackTrace+0x21
  pc 0x568f31c6 fp 0xffa37d58 dart::Assert::Fail+0x36
  pc 0x570b9a45 fp 0xffa37da8 dart::UnboxedConstantInstr::MakeLocationSummary+0x195
  pc 0x5710a859 fp 0xffa37e28 dart::SSALivenessAnalysis::ComputeInitialSets+0x4e9
  pc 0x57050c1e fp 0xffa37e78 dart::LivenessAnalysis::Analyze+0x20e
  pc 0x571189ae fp 0xffa37ed8 dart::FlowGraphAllocator::AllocateRegisters+0x2e
  pc 0x571686df fp 0xffa381b8 dart::CompilerPass_AllocateRegisters::DoBody+0x5f
  pc 0x57166aea fp 0xffa38258 dart::CompilerPass::Run+0x13a
  pc 0x57167309 fp 0xffa38298 dart::CompilerPass::RunPipeline+0x369
  pc 0x57000cd4 fp 0xffa386c8 dart::PrecompileParsedFunctionHelper::Compile+0x664
  pc 0x57001bcd fp 0xffa38c38 dart::PrecompileFunctionHelper+0x3cd
  pc 0x56ffbc2f fp 0xffa38ce8 dart::Precompiler::CompileFunction+0x1af
  pc 0x5700a0ad fp 0xffa38d38 dart::Precompiler::PrecompileConstructors+0xdd
  pc 0x56bfc8ab fp 0xffa38d78 dart::ProgramWalker::VisitFunction+0x4b
  pc 0x56bf96b9 fp 0xffa38db8 dart::ProgramWalker::VisitWorklist+0xa9
  pc 0x56bf9239 fp 0xffa38e88 dart::ProgramVisitor::WalkProgram+0x4b9
  pc 0x56ff1ed2 fp 0xffa38ef8 dart::Precompiler::PrecompileConstructors+0x82
  pc 0x56fedb8b fp 0xffa39588 dart::Precompiler::DoCompileAll+0x3ab
  pc 0x56fed73a fp 0xffa39888 dart::Precompiler::CompileAll+0xda
  pc 0x5724a379 fp 0xffa39978 Dart_Precompile+0x299
  pc 0x568bffa9 fp 0xffa39a88 dart::bin::main+0x979
  pc 0x568c0f44 fp 0xffa39ab8 main+0x24
-- End of DumpStackTrace
=== Crash occurred when compiling dart:io__ExternalBuffer@14069316__ExternalBuffer@14069316. in AOT mode in AllocateRegisters pass
*** BEGIN CFG
AllocateRegisters
==== dart:io__ExternalBuffer@14069316__ExternalBuffer@14069316. (Constructor)
B0[graph]:0 {
      v0 <- Constant(#null) T{Null?}
      v22 <- UnboxedConstant(#1) int32
}
B1[function entry]:2 {
      v2 <- Parameter(0) T{_ExternalBuffer}
      v3 <- Parameter(1) [-9223372036854775808, 9223372036854775807] int64
}
    StoreField(v2 . size = v3 <int64>)
    v7 <- UnboxedConstant(#63) [63, 63] int64
    v8 <- ShiftInt64Op(>> [tr], v3, v7) [-1, 0] int64
    v9 <- UnboxedConstant(#1) [1, 1] int64
    v19 <- IntConverter(int64->int32, v8) int32
    v10 <- BinaryInt32Op(& [-o], v19 T{int}, v22 T{_Smi}) [0, 1] int32
    v21 <- IntConverter(int32->int64, v10 T{int}) int64
    v11 <- BinaryInt64Op(+ [tr], v3, v21 T{int}) [-9223372036854775808, 9223372036854775807] int64
    v5 <- ShiftInt64Op(>> [tr], v11, v9 T{_Smi}) [-4611686018427387904, 4611686018427387903] int64
    StoreField(v2 . start = v5 <int64>)
    StoreField(v2 . end = v5 T{int} <int64>)
    Return:20(v0)
*** END CFG

[2/199] ACTION //utils/dds:generate_dds_snapshot_dill(//build/toolchain/linux:clang_x86)^CTraceback (most recent call last):

cc @rmacnak-google We should consider adding a bot to the CI, instead of only building it on the fuzzer.

@dcharkes dcharkes added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. gardening crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. labels Dec 21, 2023
@dcharkes
Copy link
Contributor Author

dcharkes commented Dec 21, 2023

dart tools/bisect.dart \
-Dend=83cf40afefd4a2c7afa3986169e96ae324d66b07 \
-Dstart=969de20633796c1ba31cbda7f0697c773fef3af5 \
-Dtest_command="python3 tools/build.py -mdebug -asimriscv32 runtime dart_precompiled_runtime" \
-Dfailure_string="is_unboxed_int"

Commit range 47e6eaa...969de20.
Ensuring SDK repo in /usr/local/google/home/dacoharkes/dart-sdk/sdk/.
Ensuring failure reproduces on 969de20.
Commit 969de20, reproduces failure.
Ensuring failure does not reproduce on 47e6eaa.
Commit 47e6eaa, does not reproduce failure.
Bisecting 47e6eaa...969de20 (135 commits). Trying 794d3ad.
Commit 794d3ad, does not reproduce failure.
Bisecting 794d3ad...969de20 (67 commits). Trying 1fabc67.
Commit 1fabc67, reproduces failure.
Bisecting 794d3ad...1fabc67 (34 commits). Trying 1de6bc7.
Commit 1de6bc7, does not reproduce failure.
Bisecting 1de6bc7...1fabc67 (17 commits). Trying fe8a13d.
Commit fe8a13d, does not reproduce failure.
Bisecting fe8a13d...1fabc67 (8 commits). Trying cd5d399.
Commit cd5d399, reproduces failure.
Bisecting fe8a13d...cd5d399 (4 commits). Trying 291e82a.
Commit 291e82a, does not reproduce failure.
Bisecting 291e82a...cd5d399 (2 commits). Trying 8791b44.
Commit 8791b44, does not reproduce failure.
Bisected to cd5d399.

We started running DDS in AOT, and apparently that exercises a code path otherwise not exercised in simriscv32.

@dcharkes
Copy link
Contributor Author

This seems otherwise unrelated to your change @derekxu16.

I have made https://dart-review.googlesource.com/c/sdk/+/343200 to undo your change for simriscv32.

copybara-service bot pushed a commit that referenced this issue Dec 21, 2023
Bug: #54434
Change-Id: I923ed41448e440e17acc39beee5dd49a9de382fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/343200
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
@alexmarkov
Copy link
Contributor

Duplicate to #54425.

We should probably fix code generation instead of reverting AOT compilation of DDS.

@dcharkes
Copy link
Contributor Author

Duplicate to #54425.

We should probably fix code generation instead of reverting AOT compilation of DDS.

Agreed, I left a TODO in the code to address. I wanted to fix the build in the mean time so that we have a signal in case something else breaks.

@a-siva a-siva added the closed-duplicate Closed in favor of an existing report label Dec 21, 2023
@a-siva
Copy link
Contributor

a-siva commented Dec 21, 2023

closing as duplicate of #54425.

@a-siva a-siva closed this as completed Dec 21, 2023
copybara-service bot pushed a commit that referenced this issue Jan 9, 2024
TEST=dartfuzz
Bug: #54425
Bug: #54434
Change-Id: I05975376cd61ffeceda60edf76df182fbf753593
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345348
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. closed-duplicate Closed in favor of an existing report crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. gardening
Projects
None yet
Development

No branches or pull requests

3 participants