tree: https://github.com/kdave/btrfs-devel.git for-next-20220222
head: 4653d7e3d6f656d9234d8a2b84fe9aa872f17c1b
commit: 0504e61564dfa41e88e74b2f2510697746a186fc [101/120] btrfs: add fs state details to error messages
config: mips-randconfig-r021-20220224 (https://download.01.org/0day-ci/archive/20220224/[email protected]/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/kdave/btrfs-devel/commit/0504e61564dfa41e88e74b2f2510697746a186fc
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel for-next-20220222
git checkout 0504e61564dfa41e88e74b2f2510697746a186fc
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash drivers/gpu/drm/msm/ fs/btrfs/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
>> fs/btrfs/super.c:75:13: warning: unused function 'btrfs_state_to_string'
static void btrfs_state_to_string(const struct btrfs_fs_info char
^
fatal error: error in backend: Nested variants found in inline asm string: ' .set push
.set mips64r2
.if ( 0x00 ) != -1)) 0x00 ) != -1)) : ($( static struct ftrace_branch_data __attribute__((__aligned__(4))) __attribute__((__section__("_ftrace_branch"))) __if_trace = $( .func = __func__, .file = "arch/mips/include/asm/bitops.h", .line = 103, $); 0x00 ) != -1)) : $))) ) && ( 0 ); .set push; .set mips64r2; .rept 1; sync 0x00; .endr; .set pop; .else; ; .endif
1: ll $0, $1
or $0, $2
sc $0, $1
beqz $0, 1b
.set pop
'
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -Wp,-MMD,fs/btrfs/.super.o.d -nostdinc -Iarch/mips/include -I./arch/mips/include/generated -Iinclude -I./include -Iarch/mips/include/uapi -I./arch/mips/include/generated/uapi -Iinclude/uapi -I./include/generated/uapi -include include/linux/compiler-version.h -include include/linux/kconfig.h -include include/linux/compiler_types.h -D__KERNEL__ -DVMLINUX_LOAD_ADDRESS=0xffffffff84000000 -DLINKER_LOAD_ADDRESS=0x84000000 -DDATAOFFSET=0 -Qunused-arguments -fmacro-prefix-map== -DKBUILD_EXTRA_WARN1 -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -std=gnu89 --target=mipsel-linux -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mno-check-zero-division -mabi=32 -G 0 -mno-abicalls -fno-pic -pipe -msoft-float -DGAS_HAS_SET_HARDFLOAT -Wa,-msoft-float -ffreestanding -EL -fno-stack-check -march=mips32 -Wa,--trap -DTOOLCHAIN_SUPPORTS_VIRT -Iarch/mips/include/asm/mach-ralink -Iarch/mips/include/asm/mach-ralink/mt7620 -Iarch/mips/include/asm/mach-generic -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -Os -Wframe-larger-than=1024 -fno-stack-protector -Wimplicit-fallthrough -Wno-gnu -mno-global-merge -Wno-unused-but-set-variable -Wno-unused-const-variable -ftrivial-auto-var-init=pattern -fno-stack-clash-protection -pg -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wno-array-bounds -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wextra -Wunused -Wno-unused-parameter -Wmissing-declarations -Wmissing-format-attribute -Wmissing-prototypes -Wold-style-definition -Wmissing-include-dirs -Wunused-but-set-variable -Wunused-const-variable -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -I fs/btrfs -I ./fs/btrfs -ffunction-sections -fdata-sections -DKBUILD_MODFILE="fs/btrfs/btrfs" -DKBUILD_BASENAME="super" -DKBUILD_MODNAME="btrfs" -D__KBUILD_MODNAME=kmod_btrfs -c -o fs/btrfs/super.o fs/btrfs/super.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module 'fs/btrfs/super.c'.
4. Running pass 'Mips Assembly Printer' on function '@__btrfs_handle_fs_error'
#0 0x00005610db1c7d7f Signals.cpp:0:0
#1 0x00005610db1c5c5c llvm::sys::CleanupOnSignal(unsigned long) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x348ec5c)
#2 0x00005610db105fd7 llvm::CrashRecoveryContext::HandleExit(int) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x33cefd7)
#3 0x00005610db1be30e llvm::sys::Process::Exit(int, bool) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x348730e)
#4 0x00005610d8de9ccb (/opt/cross/clang-d271fc04d5/bin/clang-15+0x10b2ccb)
#5 0x00005610db10ca8c llvm::report_fatal_error(llvm::Twine const&, bool) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x33d5a8c)
#6 0x00005610dbe165c0 llvm::AsmPrinter::emitInlineAsm(llvm::MachineInstr const (/opt/cross/clang-d271fc04d5/bin/clang-15+0x40df5c0)
#7 0x00005610dbe124f4 llvm::AsmPrinter::emitFunctionBody() (/opt/cross/clang-d271fc04d5/bin/clang-15+0x40db4f4)
#8 0x00005610d9853887 llvm::MipsAsmPrinter::runOnMachineFunction(llvm::MachineFunction&) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x1b1c887)
#9 0x00005610da51054d llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (.part.53) MachineFunctionPass.cpp:0:0
#10 0x00005610da957807 llvm::FPPassManager::runOnFunction(llvm::Function&) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x2c20807)
#11 0x00005610da957981 llvm::FPPassManager::runOnModule(llvm::Module&) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x2c20981)
#12 0x00005610da9584ff llvm::legacy::PassManagerImpl::run(llvm::Module&) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x2c214ff)
#13 0x00005610db4e2147 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x37ab147)
#14 0x00005610dc130693 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x43f9693)
#15 0x00005610dcc0b6e9 clang::ParseAST(clang::Sema&, bool, bool) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x4ed46e9)
#16 0x00005610dc12f4cf clang::CodeGenAction::ExecuteAction() (/opt/cross/clang-d271fc04d5/bin/clang-15+0x43f84cf)
#17 0x00005610dbb32561 clang::FrontendAction::Execute() (/opt/cross/clang-d271fc04d5/bin/clang-15+0x3dfb561)
#18 0x00005610dbac8faa clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x3d91faa)
#19 0x00005610dbbf6cbb (/opt/cross/clang-d271fc04d5/bin/clang-15+0x3ebfcbb)
#20 0x00005610d8deb27c cc1_main(llvm::ArrayRef<char char (/opt/cross/clang-d271fc04d5/bin/clang-15+0x10b427c)
#21 0x00005610d8de7f4b ExecuteCC1Tool(llvm::SmallVectorImpl<char driver.cpp:0:0
#22 0x00005610db961d95 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const::'lambda'()>(long) Job.cpp:0:0
#23 0x00005610db105e93 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x33cee93)
#24 0x00005610db96268e clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> const (.part.216) Job.cpp:0:0
#25 0x00005610db937267 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const (/opt/cross/clang-d271fc04d5/bin/clang-15+0x3c00267)
#26 0x00005610db937c47 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) const (/opt/cross/clang-d271fc04d5/bin/clang-15+0x3c00c47)
#27 0x00005610db9412f9 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command >&) (/opt/cross/clang-d271fc04d5/bin/clang-15+0x3c0a2f9)
#28 0x00005610d8d1063f main (/opt/cross/clang-d271fc04d5/bin/clang-15+0xfd963f)
#29 0x00007f19de2c2d0a __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x26d0a)
#30 0x00005610d8de7a6a _start (/opt/cross/clang-d271fc04d5/bin/clang-15+0x10b0a6a)
clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (git://gitmirror/llvm_project d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
Target: mipsel-unknown-linux
Thread model: posix
InstalledDir: /opt/cross/clang-d271fc04d5/bin
clang-15: note: diagnostic msg:
Makefile arch drivers fs include kernel nr_bisected scripts source usr
vim +/btrfs_state_to_string +75 fs/btrfs/super.c
71
72 /*
73 * Fill @buf with string describing exceptional filesystem state.
74 */
> 75 static void btrfs_state_to_string(const struct btrfs_fs_info *info, char *buf)
76 {
77 unsigned int states_printed = 0;
78 char *curr = buf;
79
80 memcpy(curr, STATE_STRING_PREFACE, sizeof(STATE_STRING_PREFACE));
81 curr += sizeof(STATE_STRING_PREFACE) - 1;
82
83 /* If more states are reported, update MAX_STATE_CHARS also */
84 if (test_bit(BTRFS_FS_STATE_ERROR, &info->fs_state)) {
85 *curr++ = 'E';
86 states_printed++;
87 }
88
89 if (test_bit(BTRFS_FS_STATE_TRANS_ABORTED, &info->fs_state)) {
90 *curr++ = 'X';
91 states_printed++;
92 }
93
94 /* If no states were printed, reset the buffer */
95 if (!states_printed)
96 curr = buf;
97
98 WARN_ON_ONCE(states_printed > MAX_STATE_CHARS);
99
100 *curr++ = 0;
101 }
102
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
On Thu, Feb 24, 2022 at 10:59:56AM +0800, kernel test robot wrote:
> >> fs/btrfs/super.c:75:13: warning: unused function 'btrfs_state_to_string'
This happens when CONFIG_PRINTK is not defined, I'll add the ifdefs
around the definition.