Opened 3 years ago
Closed 3 years ago
#17389 closed bug (fixed)
mimeset crash kills Haiku build
Reported by: | mbrumbelow | Owned by: | nobody |
---|---|---|---|
Priority: | high | Milestone: | Unscheduled |
Component: | Build System | Version: | R1/beta3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86-64 |
Description
Kernel: x86_64 hrev55625 CPU: 8 Processors Intel I5 Memory: 16GB Storage: 500GB Compiler: GCC 11.2.0_2021_07_28-3 x86_64-unknown-haiku
Building Haiku fails when mimeset is called. mimeset crashes and user terminates the process which terminates the build.
Attachments (2)
Change History (13)
by , 3 years ago
Attachment: | mimeset-218422-debug-07-11-2021-13-33-59.report added |
---|
by , 3 years ago
Attachment: | mimeset_crash.jpg added |
---|
comment:1 by , 3 years ago
Component: | Applications → Build System |
---|---|
Keywords: | mimeset crash build removed |
comment:2 by , 3 years ago
This doesn't seem to reproduce with -O0 -g
, so it is probably related to some optimization somehow.
comment:3 by , 3 years ago
Where should those be put so I can test the build out on my other machines?
comment:5 by , 3 years ago
Ah, I missed that it only happens during package creation. Indeed I can still reproduce it with debug mode.
comment:6 by , 3 years ago
Adding some extra error checks to libroot_build's dup() seems to fix the crash, but then mimeset seems to be stuck in a loop and never completes. So the problem appears to be elsewhere.
comment:7 by , 3 years ago
The problem is really in the Storage Kit, it appears. With -O0 or -O1 in libbe_build storage Jamfile, mimeset works. With -O2, it loops forever (runs out of FDs and then just keeps going.)
comment:8 by , 3 years ago
I've narrowed it down to Directory.cpp. Adding this line to storage/Jamfile avoids the problem:
C++FLAGS on [ FGristFiles Directory.o ] += -O1 ;
Changing it to O2 triggers the problem.
comment:10 by , 3 years ago
Yes.
The culprit function appears to be BDirectory::GetNextRef(entry_ref* ref)
. Using pragmas to build just this function at -O1 solves the problem.
Crash Report