bcachefs icon indicating copy to clipboard operation
bcachefs copied to clipboard

[6.14-rc3] memcpy: detected field-spanning write (size 77) of single field "&dirent->v.d_name[0]" at fs/bcachefs/dirent.c:276 (size 0)

Open KrzysztofHajdamowicz opened this issue 1 year ago • 1 comments

Proxmox 8.3 (Debian 12) with custom kernel Kernel 6.14-rc3 bcachefs: 77308424ba26e1b41a7db5d4eae121841a707c05

Will happily provide more info, but what is needed?

[Sun Feb 23 15:42:02 2025] WARNING: CPU: 4 PID: 3025885 at fs/bcachefs/btree_iter.c:3200 bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025] WARNING: CPU: 6 PID: 3833003 at fs/bcachefs/btree_iter.c:3200 bch2_trans_put+0x213/0x250 [bcachefs]
[Sun Feb 23 15:42:02 2025] WARNING: CPU: 7 PID: 3774133 at fs/bcachefs/btree_iter.c:3200 bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025] WARNING: CPU: 10 PID: 1105426 at fs/bcachefs/btree_iter.c:3200 bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025] WARNING: CPU: 8 PID: 3829894 at fs/bcachefs/btree_iter.c:3200 bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bcachefs
[Sun Feb 23 15:42:02 2025]  bcachefs
[Sun Feb 23 15:42:02 2025]  bcachefs
[Sun Feb 23 15:42:02 2025]  bcachefs
[Sun Feb 23 15:42:02 2025]  bcachefs
[Sun Feb 23 15:42:02 2025] RIP: 0010:bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025] RIP: 0010:bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025] Workqueue: bcachefs bch2_write_point_do_index_updates [bcachefs]
[Sun Feb 23 15:42:02 2025] Workqueue: bcachefs bch2_write_point_do_index_updates [bcachefs]
[Sun Feb 23 15:42:02 2025] Workqueue: bcachefs bch2_write_point_do_index_updates [bcachefs]
[Sun Feb 23 15:42:02 2025] RIP: 0010:bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025] RIP: 0010:bch2_trans_put+0x213/0x250 [bcachefs]
[Sun Feb 23 15:42:02 2025] RIP: 0010:bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025] WARNING: CPU: 3 PID: 3830299 at fs/bcachefs/btree_iter.c:3200 bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  nvme_keyring bcachefs lz4hc_compress lz4_compress
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_put+0x213/0x250 [bcachefs]
[Sun Feb 23 15:42:02 2025] Workqueue: bcachefs_write_ref bch2_gc_gens_work [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_begin+0xb6/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_begin+0xb6/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025] RIP: 0010:bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_put+0x213/0x250 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_trans_begin+0x5c8/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_trans_begin+0x5c8/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_begin+0xb6/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_put+0x213/0x250 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_bucket_io_time_reset+0xa1/0xc0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_begin+0xb6/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bchfs_read+0xd56/0xfe0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_trans_begin+0x5c8/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_data_update_index_update+0x3c/0x70 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_trans_begin+0x5c8/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  __bch2_read_extent+0xba0/0x14c0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_gc_gens+0xc32/0x11e0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bchfs_read+0x1a5/0xfe0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  __bch2_data_update_index_update+0x18f/0x1d30 [bcachefs]
[Sun Feb 23 15:42:02 2025]  __bch2_write_index+0x74/0x300 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_gc_gens_work+0x19/0x70 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? __bch2_folio_set+0xb0/0xf0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_gc_gens_work+0x19/0x70 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_data_update_index_update+0x31/0x70 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_readahead+0x345/0x4d0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_write_point_do_index_updates+0xb4/0x190 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bchfs_read+0xec9/0xfe0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_data_update_index_update+0x31/0x70 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_readahead+0x345/0x4d0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_readahead+0x345/0x4d0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  __bch2_write_index+0x74/0x300 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_page_fault+0x70/0x1c0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_readahead+0x345/0x4d0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? promote_done+0x45/0x60 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_page_fault+0x70/0x1c0 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_write_point_do_index_updates+0xb4/0x190 [bcachefs]
[Sun Feb 23 15:42:02 2025] WARNING: CPU: 5 PID: 3034622 at fs/bcachefs/btree_iter.c:3200 bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025] Modules linked in: nfsd auth_rpcgss nfs_acl lockd grace nf_conntrack_netlink xt_nat xt_tcpudp xt_MASQUERADE xt_conntrack xt_set nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set_hash_net xt_addrtype nft_compat xfrm_user xfrm_algo overlay tcp_diag udp_diag inet_diag cfg80211 8021q garp mrp veth ebtable_filter ebtables ip_set ip6table_raw iptable_raw ip6table_filter ip6_tables iptable_filter nf_tables nvme_fabrics nvme_keyring bcachefs lz4hc_compress
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_trans_begin+0xb6/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_trans_begin+0x5c8/0x730 [bcachefs]
[Sun Feb 23 15:42:02 2025]  __bch2_data_update_index_update+0x18f/0x1d30 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_data_update_index_update+0x31/0x70 [bcachefs]
[Sun Feb 23 15:42:02 2025]  ? bch2_data_update_index_update+0x31/0x70 [bcachefs]
[Sun Feb 23 15:42:02 2025]  __bch2_write_index+0x74/0x300 [bcachefs]
[Sun Feb 23 15:42:02 2025]  bch2_write_point_do_index_updates+0xb4/0x190 [bcachefs]
[Sun Feb 23 15:42:03 2025] RIP: 0010:bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:03 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:03 2025]  ? bch2_trans_srcu_unlock+0x137/0x150 [bcachefs]
[Sun Feb 23 15:42:03 2025]  ? bch2_trans_begin+0xb6/0x730 [bcachefs]
[Sun Feb 23 15:42:03 2025]  bch2_trans_begin+0x5c8/0x730 [bcachefs]
[Sun Feb 23 15:42:03 2025]  ? bchfs_read+0xd56/0xfe0 [bcachefs]
[Sun Feb 23 15:42:03 2025]  bchfs_read+0x1a5/0xfe0 [bcachefs]
[Sun Feb 23 15:42:03 2025]  bch2_readahead+0x345/0x4d0 [bcachefs]
[Sun Feb 23 15:42:03 2025]  ? bch2_readahead+0x345/0x4d0 [bcachefs]
[Sun Feb 23 15:42:03 2025]  bch2_page_fault+0x70/0x1c0 [bcachefs]
[Sun Feb 23 20:22:24 2025] memcpy: detected field-spanning write (size 77) of single field "&dirent->v.d_name[0]" at fs/bcachefs/dirent.c:276 (size 0)
[Sun Feb 23 20:22:24 2025] WARNING: CPU: 5 PID: 3055957 at fs/bcachefs/dirent.c:276 dirent_create_key.isra.0+0x37a/0x3a0 [bcachefs]
[Sun Feb 23 20:22:24 2025] Modules linked in: nfsd auth_rpcgss nfs_acl lockd grace nf_conntrack_netlink xt_nat xt_tcpudp xt_MASQUERADE xt_conntrack xt_set nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_set_hash_net xt_addrtype nft_compat xfrm_user xfrm_algo overlay tcp_diag udp_diag inet_diag cfg80211 8021q garp mrp veth ebtable_filter ebtables ip_set ip6table_raw iptable_raw ip6table_filter ip6_tables iptable_filter nf_tables nvme_fabrics nvme_keyring bcachefs lz4hc_compress lz4_compress softdog sunrpc binfmt_misc bonding tls nfnetlink_log nfnetlink xe drm_gpuvm gpu_sched drm_ttm_helper drm_exec drm_suballoc_helper snd_hda_codec_hdmi snd_sof_pci_intel_tgl snd_sof_pci_intel_cnl snd_sof_intel_hda_generic intel_rapl_msr intel_rapl_common soundwire_intel intel_uncore_frequency soundwire_cadence intel_uncore_frequency_common snd_sof_intel_hda_common snd_soc_hdac_hda snd_sof_intel_hda_mlink snd_sof_intel_hda snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_acpi_intel_match snd_soc_acpi_intel_sdca_quirks
[Sun Feb 23 20:22:24 2025] RIP: 0010:dirent_create_key.isra.0+0x37a/0x3a0 [bcachefs]
[Sun Feb 23 20:22:24 2025]  ? dirent_create_key.isra.0+0x37a/0x3a0 [bcachefs]
[Sun Feb 23 20:22:24 2025]  ? dirent_create_key.isra.0+0x37a/0x3a0 [bcachefs]
[Sun Feb 23 20:22:24 2025]  bch2_dirent_create+0xf1/0x600 [bcachefs]
[Sun Feb 23 20:22:24 2025]  ? bch2_btree_iter_peek_slot+0x1c1/0x7b0 [bcachefs]
[Sun Feb 23 20:22:24 2025]  ? bch2_inode_create+0x315/0x3c0 [bcachefs]
[Sun Feb 23 20:22:24 2025]  bch2_create_trans+0x76e/0x8c0 [bcachefs]
[Sun Feb 23 20:22:24 2025]  ? bch2_trans_iter_exit+0x7c/0xa0 [bcachefs]
[Sun Feb 23 20:22:24 2025]  ? __bch2_bkey_get_val_typed.constprop.0+0x139/0x1c0 [bcachefs]
[Sun Feb 23 20:22:24 2025]  __bch2_create+0x387/0x600 [bcachefs]
[Sun Feb 23 20:22:24 2025]  bch2_mkdir+0x24/0x70 [bcachefs]
[Sun Feb 23 20:22:24 2025]  ? bch2_mkdir+0x24/0x70 [bcachefs]

KrzysztofHajdamowicz avatar Feb 24 '25 08:02 KrzysztofHajdamowicz

See https://github.com/koverstreet/bcachefs/issues/824, fixed in master (d139df3ad938bd1e18bcc16c2452dea1cf852807)

g2p avatar Feb 24 '25 08:02 g2p