Bug 254983 - emulators/virtualbox-ose: jemalloc error
Summary: emulators/virtualbox-ose: jemalloc error
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Virtualbox Team (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-11 17:16 UTC by Fernando Apesteguía
Modified: 2022-01-18 06:56 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (vbox)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fernando Apesteguía freebsd_committer freebsd_triage 2021-04-11 17:16:04 UTC
I have a virtual machine running current. It has been updated for
several months now without problems.

Yesterday I updated to VB 6.1 and it seems it can not build anymore.
The errore I get is this:

--- Frontend/CompilerInstance.o ---
<jemalloc>: jemalloc_arena.c:747: Failed assertion:
"nstime_compare(&decay->epoch, &time) <= 0"
PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and
include the crash backtrace, preprocessed source, and associated run
script.
Stack dump:
0.      Program arguments: c++ -target x86_64-unknown-freebsd14.0
--sysroot=/usr/obj/usr/src/amd64.amd64/tmp
-B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -O2 -pipe -fno-common
-I/usr/obj/usr/src/amd64.amd64/lib/clang/libclang
-I/usr/obj/usr/src/amd64.amd64/lib/clang/libllvm
-I/usr/src/contrib/llvm-project/clang/lib/Basic
-I/usr/src/contrib/llvm-project/clang/lib/Driver
-I/usr/src/contrib/llvm-project/clang/include -DCLANG_ENABLE_ARCMT
-DCLANG_ENABLE_STATIC_ANALYZER -I/usr/src/lib/clang/include
-I/usr/src/contrib/llvm-project/llvm/include -D__STDC_CONSTANT_MACROS
-D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_VCS_VERSION_INC
-DLLVM_DEFAULT_TARGET_TRIPLE="x86_64-unknown-freebsd14.0"
-DLLVM_HOST_TRIPLE="x86_64-unknown-freebsd14.0" -DDEFAULT_SYSROOT=""
-DLLVM_TARGET_ENABLE_AARCH64 -DLLVM_TARGET_ENABLE_ARM
-DLLVM_TARGET_ENABLE_MIPS -DLLVM_TARGET_ENABLE_POWERPC
-DLLVM_TARGET_ENABLE_RISCV -DLLVM_TARGET_ENABLE_X86
-DLLVM_NATIVE_ASMPARSER=LLVMInitializeX86AsmParser
-DLLVM_NATIVE_ASMPRINTER=LLVMInitializeX86AsmPrinter
-DLLVM_NATIVE_DISASSEMBLER=LLVMInitializeX86Disassembler
-DLLVM_NATIVE_TARGET=LLVMInitializeX86Target
-DLLVM_NATIVE_TARGETINFO=LLVMInitializeX86TargetInfo
-DLLVM_NATIVE_TARGETMC=LLVMInitializeX86TargetMC -ffunction-sections
-fdata-sections -gline-tables-only -MD
-MF.depend.Frontend_CompilerInstance.o -MTFrontend/CompilerInstance.o
-Wno-format-zero-length -fstack-protector-strong -Wno-empty-body
-Wno-string-plus-int -Wno-unused-const-variable
-Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
-Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef
-Wno-address-of-packed-member -Wno-switch -Wno-switch-enum
-Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments
-fno-exceptions -fno-rtti -gline-tables-only -std=c++14 -stdlib=libc++
-Wno-c++11-extensions -c
/usr/src/contrib/llvm-project/clang/lib/Frontend/CompilerInstance.cpp
-o Frontend/CompilerInstance.o
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module
'/usr/src/contrib/llvm-project/clang/lib/Frontend/CompilerInstance.cpp'.
4.      Releasing pass 'Memory SSA'
<jemalloc>: Should own 0 locks of rank >= 1: decay(12)
Abort trap (core dumped)
*** [Frontend/CompilerInstance.o] Error code 134

make[6]: stopped in /usr/src/lib/clang/libclang
1 error

After this, when I poweroff the machine, all six bufdaemons timeout after 60 seconds. I monitor de free memory and it does not go below 13 GB (it has 22 GB assigned). This is completely reproducible.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2021-04-11 18:21:40 UTC
I don't have any syggestion or solution, but I have a few questions to try to make things clearer.

Is this the error happening inside the jail, while trying to build world?

Can you report the exact revision (git commit) you are running on the host and guest inside the jail? Also the revision you are trying to compile inside the jail.

This could be virtualbox but could also be a base problem.
Comment 2 Fernando Apesteguía freebsd_committer freebsd_triage 2021-04-11 20:28:18 UTC
(In reply to Guido Falsi from comment #1)

Ummm what jail?

My setup is:

Host: FreeBSD beastie 12.2-RELEASE-p6
VirtualBox 6.1 running main-n244663-f6e8256a965d: Sun Feb  7.

I'm trying to update that main-n244663-f6e8256a965d to latest commit. Between yesterday and today a few commits where picked up but none of them fix the issue.

Additionally, I also have a poudriere jail in that virtualized machine. That poudriere jail is in 13-current 14.0-CURRENT 1400003 e44a78ce6. That one also fails to update with the same jemalloc error.

This virtual box VM has the following settings:

* Enable I/O APIC
* 4 cpus execution cap 100%
* 22 GB RAM
* 128 GB disc
* Enabled Nested VT-x/AMD-V
* Enabled nested paging

I tried a make clean in /usr/src but the same error occurs when I try to make world.

Today I updated a laptop running current without any issues (not virtualized)

Thanks!
Comment 3 Fernando Apesteguía freebsd_committer freebsd_triage 2021-04-11 20:29:19 UTC
One more thing:

The machine was completely shut down between the VirtualBox upgrade to 6.1. It was not running or suspended or in taken back from a snapshot.
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2021-04-12 10:56:50 UTC
I just installed -legacy ports and was able to update the vm to FreeBSD vm-current 14.0-CURRENT FreeBSD 14.0-CURRENT #11 main-n245984-15221c552b3c
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2022-01-18 06:56:18 UTC
Closing since I recreated the VMs in the new VB version to avoid the problem.