Open milthorpe opened 2 years ago
Chapel 1.26 also crashes for me, with a different error:
chpl: /noback/milthorpe/chapel-1.26.0/third-party/llvm/llvm-src/lib/CodeGen/MachineFunction.cpp:398: void llvm::MachineFunction::DeleteMachineInstr(llvm::MachineInstr*): Assertion `(!MI->isCandidateForCallSiteEntry() || CallSitesInfo.find(MI) == CallSitesInfo.end()) && "Call site info was not updated!"' failed.
Aborted (core dumped)
chpl --version
:
chpl version 1.26.0
built with LLVM version 13.0.0
Copyright 2020-2022 Hewlett Packard Enterprise Development LP
Copyright 2004-2019 Cray Inc.
(See LICENSE file for more details)
@milthorpe Thanks for the report. I was able to reproduce the error locally.
Is this blocking your progress, or are you just reporting the error as a good citizen?
The inability to generate debug symbols for either -O
or --fast
is a blocker, as I can't accurately profile code e.g. using hpctoolkit. (Profiling unoptimized code isn't particularly useful.)
Are you setting the CHPL_DEVELOPER
environment variable? I don't think that assertion should trip without it.
Neither flag causes a problem if used by itself, nor does
--fast -g
.
Using --fast
instead of -O
is a workaround you can use then, right?
@daviditen : I happened to notice you opened https://github.com/chapel-lang/chapel/pull/20237. Does that help with this situation?
With #20237 compiles work with -O -g
and with CHPL_DEVELOPER
set. It will still trip the UNREACHABLE
assertion if CHPL_LLVM_DEVELOPER
is set at LLVM build time though.
My guess/hope is that merging that will address this issue from @milthorpe's perspective (unless he's wanting/needing to to set CHPL_LLVM_DEVELOPER for other reasons). If true, I'd suggest we remove the 'user issue' label from this since it's only likely to impact developers (even though it was reported by a user). And in either case, @daviditen , would you update the title to reflect the narrower case now?
Yes, this fixes the original issue I observed. I'll keep this in mind if I need to set CHPL_LLVM_DEVELOPER
. Thanks @daviditen!
Summary of Problem
The Chapel compiler crashes with an LLVM error when invoked with
-O -g
. Neither flag causes a problem if used by itself, nor does--fast -g
.Steps to Reproduce
When I invoke the Chapel compiler on any code e.g.
examples/hello.chpl
with the flags-O -g
, it crashes with the following error:Compile command:
chpl -O -g $CHPL_HOME/examples/hello.chpl
Configuration Information
chpl --version
:$CHPL_HOME/util/printchplenv --anonymize
: