Bug 195504 - CLANG 3.5.0/Kernel Compile Failure
Summary: CLANG 3.5.0/Kernel Compile Failure
Status: Closed Unable to Reproduce
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-29 16:53 UTC by Larry Rosenman
Modified: 2014-12-01 20:56 UTC (History)
2 users (show)

See Also:


Attachments
.sh file generated by crash (1.02 KB, application/x-shellscript)
2014-11-29 16:53 UTC, Larry Rosenman
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Larry Rosenman freebsd_committer 2014-11-29 16:53:34 UTC
Created attachment 149991 [details]
.sh file generated by crash

--- oce_if.o ---
Assertion failed: (getNumEntries() == 0 && "Node count imbalance!"), function clear, file /usr/src/lib/clang/libllvmcore/../../../contrib/llvm/include/llvm/ADT/DenseMap.h, lin
e 99.
Stack dump:
0.      Program arguments: /usr/obj/usr/src/tmp/usr/bin/cc -cc1 -triple x86_64-unknown-freebsd11.0 -emit-obj -disable-free -main-file-name oce_if.c -mrelocation-model static -
mdisable-fp-elim -relaxed-aliasing -masm-verbose -mconstructor-aliases -mcode-model kernel -target-cpu x86-64 -target-feature -mmx -target-feature -sse -target-feature -aes -t
arget-feature -avx -disable-red-zone -no-implicit-float -gdwarf-2 -dwarf-column-info -coverage-file /usr/obj/usr/src/sys/VT-LER/modules/usr/src/sys/modules/oce/oce_if.o -nostd
systeminc -nobuiltininc -resource-dir /usr/obj/usr/src/tmp/usr/bin/../lib/clang/3.5.0 -include /usr/obj/usr/src/sys/VT-LER/opt_global.h -D SMP -D _KERNEL -D KLD_MODULE -D HAVE
_KERNEL_OPTION_HEADERS -I /usr/src/sys/modules/oce/../../dev/oce -I . -I /usr/src/sys -I /usr/src/sys/contrib/altq -I /usr/obj/usr/src/sys/VT-LER -isysroot /usr/obj/usr/src/tm
p -O2 -Werror -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -Wmissing-includ
e-dirs -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -std=iso9899:1999 -fdebug-compilation-dir /usr/obj/usr/
src/sys/VT-LER/modules/usr/src/sys/modules/oce -ferror-limit 19 -fmessage-length 0 -ffreestanding -fformat-extensions -stack-protector 1 -mstackrealign -fobjc-runtime=gnustep
-fno-common -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o oce_if.o -x c /usr/src/sys/modules/oce/../../dev/oce/oce_if.c
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module '/usr/src/sys/modules/oce/../../dev/oce/oce_if.c'.
4.      Running pass 'Dominator Tree Construction' on function '@oce_multiq_flush'
cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang frontend command failed due to signal (use -v to see invocation)
FreeBSD clang version 3.5.0 (tags/RELEASE_350/final 216957) 20141124
Target: x86_64-unknown-freebsd11.0
Thread model: posix
cc: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
--- all_subdir_padlock_rng ---

cc: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
cc: note: diagnostic msg: /tmp/oce_if-216294.c
cc: note: diagnostic msg: /tmp/oce_if-216294.sh
cc: note: diagnostic msg:
Comment 1 Larry Rosenman freebsd_committer 2014-11-29 16:56:13 UTC
the .c file is too large to attach, it's at:

http://www.lerctr.org/~ler/OCE
Comment 2 Dimitry Andric freebsd_committer 2014-11-29 20:54:21 UTC
The file oce_if-216294.c compiles just fine here, using oce_if-216294.sh, both with vanilla clang 3.5.0 (e.g. exactly how llvm.org released it), and patched clang 3.5.0 (as it was in FreeBSD projects/clang350-import r275161).  I see no assertion failures.

If you repeat the kernel build, does the error occur in the same file each time?

If the error keeps occurring in the same file, please rebuild clang with debug information, and generate a backtrace from the core dump.
Comment 3 Larry Rosenman freebsd_committer 2014-11-29 21:37:45 UTC
I redid the exact buildkernel, and no failure this time. 

So. I'm not sure what to do here to help you....
Comment 4 Dimitry Andric freebsd_committer 2014-11-29 21:49:57 UTC
(In reply to Larry Rosenman from comment #3)
> I redid the exact buildkernel, and no failure this time. 
> 
> So. I'm not sure what to do here to help you....

Even if you delete the oce_if.o file, or if you do a clean build?  If this happens just "once in a while", I would suspect hardware issues, e.g. bit errors in RAM.
Comment 5 Larry Rosenman freebsd_committer 2014-11-29 22:41:37 UTC
Could very well be, Dimitry.

I have *NOT* been able to recreate the crash.  I'll keep my eyes open for it again.

If you'd like to play on this box, you are more than welcome to an account.
Comment 6 Dimitry Andric freebsd_committer 2014-11-29 22:51:57 UTC
Well, let's just close this issue for now.  If you see the assertion coming back, and it is consistently reproducible, please re-open it.