Bug 1948054 - BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
Summary: BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-09 21:15 UTC by Chris Murphy
Modified: 2021-05-05 16:46 UTC (History)
19 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-05-05 16:46:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
bolttest.test (433 bytes, text/plain)
2021-04-09 21:16 UTC, Chris Murphy
no flags Details
dmesg (156.62 KB, text/plain)
2021-04-09 21:17 UTC, Chris Murphy
no flags Details
/proc/lock_stat (786.25 KB, text/plain)
2021-04-09 21:17 UTC, Chris Murphy
no flags Details

Description Chris Murphy 2021-04-09 21:15:42 UTC
I hit this 1 for 2 times, when running:

$ podman build -f bolttest.test .

[ 3229.119497] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
[ 3229.155339] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
[ 3238.380647] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!
[ 3238.380654] turning off the locking correctness validator.
[ 3238.380656] Please attach the output of /proc/lock_stat to the bug report
[ 3238.380657] CPU: 4 PID: 9115 Comm: kworker/u16:20 Not tainted 5.12.0-0.rc6.184.fc35.x86_64+debug #1
[ 3238.380660] Hardware name: Apple Inc. MacBookPro8,2/Mac-94245A3940C91C80, BIOS    MBP81.88Z.0050.B00.1804101331 04/10/18
[ 3238.380663] Workqueue: btrfs-delalloc btrfs_work_helper
[ 3238.380670] Call Trace:
[ 3238.380674]  dump_stack+0x7f/0xa1
[ 3238.380680]  __lock_acquire.cold+0x1a9/0x2bf
[ 3238.380686]  ? __lock_acquire+0x3ac/0x1e10
[ 3238.380691]  lock_acquire+0xc4/0x3a0
[ 3238.380695]  ? percpu_counter_add_batch+0x45/0x60
[ 3238.380699]  ? lock_acquire+0xc4/0x3a0
[ 3238.380702]  ? lock_is_held_type+0xa7/0x120
[ 3238.380706]  ? __set_page_dirty_nobuffers+0x6b/0x1e0
[ 3238.380711]  _raw_spin_lock_irqsave+0x4d/0x90
[ 3238.380715]  ? percpu_counter_add_batch+0x45/0x60
[ 3238.380718]  percpu_counter_add_batch+0x45/0x60
[ 3238.380721]  account_page_dirtied+0x102/0x320
[ 3238.380724]  __set_page_dirty_nobuffers+0xa2/0x1e0
[ 3238.380727]  set_extent_buffer_dirty+0x63/0x80
[ 3238.380732]  btrfs_mark_buffer_dirty+0x60/0x80
[ 3238.380737]  copy_for_split+0x29e/0x360
[ 3238.380741]  split_leaf+0x1c2/0x5e0
[ 3238.380746]  btrfs_search_slot+0x99a/0x9f0
[ 3238.380751]  btrfs_insert_empty_items+0x58/0xa0
[ 3238.380754]  cow_file_range_inline.constprop.0+0x1cf/0x760
[ 3238.380758]  ? __local_bh_enable_ip+0x82/0xd0
[ 3238.380762]  ? zstd_put_workspace+0x82/0x160
[ 3238.380765]  ? __local_bh_enable_ip+0x82/0xd0
[ 3238.380769]  compress_file_range+0x471/0x830
[ 3238.380774]  async_cow_start+0x12/0x30
[ 3238.380777]  ? submit_compressed_extents+0x410/0x410
[ 3238.380779]  btrfs_work_helper+0x105/0x400
[ 3238.380782]  ? lock_is_held_type+0xa7/0x120
[ 3238.380786]  process_one_work+0x2b0/0x5e0
[ 3238.380791]  worker_thread+0x55/0x3c0
[ 3238.380793]  ? process_one_work+0x5e0/0x5e0
[ 3238.380796]  kthread+0x13a/0x150
[ 3238.380799]  ? __kthread_bind_mask+0x60/0x60
[ 3238.380801]  ret_from_fork+0x1f/0x30


Reproduce steps:

1a. Change podman to use the btrfs driver, containing two lines

nano ~/.config/containers/storage.conf

[storage]

driver = "btrfs"

1b. podman system reset (this will blow away all your contains, I'm not certain it's necessary but...)

2. podman build -f bolttest.test .

Splat.

So there's maybe two parts to this:

[ 3238.380647] BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!

And the btrfs stuff.

Comment 1 Chris Murphy 2021-04-09 21:16:57 UTC
Created attachment 1770799 [details]
bolttest.test

Comment 2 Chris Murphy 2021-04-09 21:17:11 UTC
Created attachment 1770801 [details]
dmesg

Comment 3 Chris Murphy 2021-04-09 21:17:31 UTC
Created attachment 1770802 [details]
/proc/lock_stat

Comment 4 Chris Murphy 2021-04-09 22:05:26 UTC
Posted email about this to linux-btrfs@ list
https://lore.kernel.org/linux-btrfs/CAJCQCtSWCgAFjmo9keNFRPJomQenQCQOHOZ-gyekoma0fKttxg@mail.gmail.com/T/#u

Comment 5 Steven Snow 2021-05-05 12:55:03 UTC
Hello Chris,
I tried to reproduce this and got the following 

"ERRO[0000] User-selected graph driver "btrfs" overwritten by graph driver "overlay" from database - delete libpod local files to resolve 
ERRO[0000] User-selected graph driver "btrfs" overwritten by graph driver "overlay" from database - delete libpod local files to resolve 
Error: kernel does not support overlay fs: 'overlay' is not supported over btrfs at "/var/home/ssnow/.local/share/containers/storage/overlay": backing file system is unsupported for this graph driver"
My system is running F34 Silverblue and I have not been using btrfs as a storage option with my podman containers up to this trial. The output above was a result of simply trying a 'podman reset', and trying to build the container with your given podman commands results in the same error output for me. Also, my hardware is not a Macbook Pro, but an AMD Phenom2 based system, so BIOS. 
If I run the podman build instructions without storage.conf (as in rm the file) the container image seems to build fine. Would this be more an image choice issue? As in the base image of your container -> alpine

Comment 6 Steven Snow 2021-05-05 13:00:50 UTC
The container built and ran failing on one of the tests with the following output

Ok:                 13  
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

Full log written to /bolt-0.9.1/output/meson-logs/testlog.txt
Error: error building at STEP "RUN wget https://gitlab.freedesktop.org/bolt/bolt/-/archive/0.9.1/bolt-0.9.1.tar.gz     && tar xf bolt-0.9.1.tar.gz     && cd bolt-0.9.1     && meson -Dman=true -Dsystemd=false . output     && meson compile -j32 -C output     && meson test --no-rebuild -v -C output": error while running runtime: exit status 1

Comment 7 Chris Murphy 2021-05-05 16:46:26 UTC
There's a few things going on here:

The low lockdep chain message is something upstream already knows about, so I'm just doing to close this bug since that's what it was mainly about.
http://lkml.iu.edu/hypermail/linux/kernel/2001.1/01560.html

The btrfs call trace I reported upstream.
https://lore.kernel.org/linux-btrfs/CAJCQCtSWCgAFjmo9keNFRPJomQenQCQOHOZ-gyekoma0fKttxg@mail.gmail.com/

And the bolttest issue we found a bug in fuse-overlayfs which is what's used for rootless podman, whereas kernel overlayfs is used for rootful podman. Looks like the fix is in fuse-overlayfs for rawhide but not yet backported, I'm not sure what the time frame for that is.
https://github.com/containers/fuse-overlayfs/issues/287

If there's a problem switching from overlay to btrfs driver in podman, I suggest filing a podman bug and cc me on it.


Note You need to log in before you can comment on or make changes to this bug.