From: "Marcel Röthke" <marcel@roethke.info>
To: linux-bcachefs@vger.kernel.org
Subject: [tools] LTO breaks tools
Date: Fri, 21 Jun 2024 17:38:42 +0200 [thread overview]
Message-ID: <ZnWeguEIABfeP2xV@roethke.info> (raw)
Hi,
I noticed that at least the format subcommand of the bcachefs tools
breaks when compiling with LTO. By breaking I mean that it segfaults. I
think the cause is commit fc06a0ea5e552663e9e47de941fbc7e621d4ca46
between versions 1.7.0 and 1.9.0.
I noticed this first with the official archlinux package, but can
reproduce it by compiling from source with `CFLAGS=-flto=auto make`
And here is the stacktrace for completeness.
Thread 17 "btree_update" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff78d2680 (LWP 212449)]
bch2_trans_start_alloc_update (trans=0x7fffe4001000, pos=...) at libbcachefs/alloc_background.c:480
480 {
(gdb) bt
#0 bch2_trans_start_alloc_update (trans=0x7fffe4001000, pos=...) at libbcachefs/alloc_background.c:480
#1 0x000055555580249e in bch2_trigger_pointer (trans=<optimized out>, btree_id=<optimized out>, level=<optimized out>, k=..., p=..., entry=<optimized out>,
sectors=<synthetic pointer>, flags=<optimized out>) at libbcachefs/buckets.c:572
#2 __trigger_extent (trans=<optimized out>, btree_id=<optimized out>, level=<optimized out>, k=..., flags=<optimized out>) at libbcachefs/buckets.c:724
#3 0x00005555557f6e5d in bch2_key_trigger (trans=0x7fffe4001000, btree=<optimized out>, level=<optimized out>, old=..., new=...,
flags=(BTREE_TRIGGER_transactional | BTREE_TRIGGER_insert)) at libbcachefs/bkey_methods.h:88
#4 bch2_key_trigger_new (trans=0x7fffe4001000, btree_id=<optimized out>, level=<optimized out>, new=..., flags=BTREE_TRIGGER_transactional) at libbcachefs/bkey_methods.h:116
#5 btree_update_nodes_written_trans (trans=0x7fffe4001000, as=<optimized out>) at libbcachefs/btree_update_interior.c:658
#6 btree_update_nodes_written (as=0x555555e0a800) at libbcachefs/btree_update_interior.c:721
#7 btree_interior_update_work (work=0x7ffff7ace5d0) at libbcachefs/btree_update_interior.c:859
#8 0x00005555558957a0 in worker_thread (arg=0x555555cc0040) at linux/workqueue.c:262
#9 0x000055555588968a in kthread_start_fn (data=<optimized out>) at linux/kthread.c:25
#10 0x00007ffff7be4ded in start_thread (arg=<optimized out>) at pthread_create.c:447
#11 0x00007ffff7c680dc in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:78
next reply other threads:[~2024-06-21 15:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 15:38 Marcel Röthke [this message]
2024-07-10 19:15 ` [tools] LTO breaks tools Tavian Barnes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZnWeguEIABfeP2xV@roethke.info \
--to=marcel@roethke.info \
--cc=linux-bcachefs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox