Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory reclaim deadlock #232

Closed
behlendorf opened this issue May 6, 2011 · 0 comments
Closed

Memory reclaim deadlock #232

behlendorf opened this issue May 6, 2011 · 0 comments
Milestone

Comments

@behlendorf
Copy link
Contributor

The following deadlock was observed when zio->create()->cv_init()->kmem_alloc(..., KM_SLEEP) entered direct memory reclaim. It unfortunately ended waiting for the cv->tx_quiesce_done_cv but this could never occur because this thread was responsible for finishing syncing the current txg. Deadlock.

[21962.340844] INFO: task z_wr_iss/3:2743 blocked for more than 120 seconds.
[21962.360393] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[21962.393496] z_wr_iss/3    D ffff88021b28f2c0     0  2743      2 0x00000000
[21962.393504]  ffff88021a2554b0 0000000000000046 0000000000015dc0 0000000000015dc0
[21962.393512]  ffff88021a0083d0 ffff88021a255fd8 0000000000015dc0 ffff88021a008000
[21962.393519]  0000000000015dc0 ffff88021a255fd8 0000000000015dc0 ffff88021a0083d0
[21962.393527] Call Trace:
[21962.393546]  [] cv_wait_common+0x78/0xe0 [spl]
[21962.393554]  [] ? autoremove_wake_function+0x0/0x40
[21962.393572]  [] __cv_wait+0x13/0x20 [spl]
[21962.393643]  [] txg_wait_open+0x7b/0xa0 [zfs]
[21962.393702]  [] dmu_tx_wait+0xed/0xf0 [zfs]
[21962.393761]  [] dmu_tx_assign+0x6a/0x410 [zfs]
[21962.393846]  [] zfs_inactive+0xec/0x1e0 [zfs]
[21962.393918]  [] zpl_clear_inode+0xe/0x10 [zfs]
[21962.393925]  [] clear_inode+0x7e/0x100
[21962.393931]  [] dispose_list+0x40/0x150
[21962.393938]  [] prune_icache+0x199/0x2b0
[21962.393945]  [] shrink_icache_memory+0x3f/0x50
[21962.393952]  [] shrink_slab+0x125/0x190
[21962.393958]  [] do_try_to_free_pages+0x19f/0x370
[21962.393965]  [] try_to_free_pages+0x6f/0x80
[21962.393972]  [] ? isolate_pages_global+0x0/0x50
[21962.393979]  [] ? _cond_resched+0x30/0x40
[21962.393987]  [] __alloc_pages_slowpath+0x2d8/0x590
[21962.393995]  [] __alloc_pages_nodemask+0x171/0x180
[21962.394004]  [] alloc_pages_current+0x87/0xd0
[21962.394013]  [] new_slab+0x248/0x310
[21962.394020]  [] __slab_alloc+0x169/0x2d0
[21962.394038]  [] ? kmem_alloc_debug+0xeb/0x130 [spl]
[21962.394045]  [] __kmalloc+0x16d/0x1a0
[21962.394062]  [] kmem_alloc_debug+0xeb/0x130 [spl]
[21962.394080]  [] __cv_init+0xa3/0xd0 [spl]
[21962.394152]  [] zio_create+0x9b/0x4a0 [zfs]
[21962.394224]  [] zio_vdev_child_io+0xb3/0xe0 [zfs]
[21962.394296]  [] ? vdev_mirror_child_done+0x0/0x30 [zfs]
[21962.394369]  [] vdev_mirror_io_start+0x176/0x3d0 [zfs]
[21962.394441]  [] ? vdev_mirror_child_done+0x0/0x30 [zfs]
[21962.394513]  [] zio_vdev_io_start+0xa7/0x2e0 [zfs]
[21962.394585]  [] zio_nowait+0x8a/0xf0 [zfs]
[21962.394657]  [] vdev_mirror_io_start+0x17e/0x3d0 [zfs]
[21962.394729]  [] ? vdev_mirror_child_done+0x0/0x30 [zfs]
[21962.394801]  [] zio_vdev_io_start+0x220/0x2e0 [zfs]
[21962.394874]  [] zio_execute+0x7a/0xb0 [zfs]
[21962.394892]  [] taskq_thread+0x1a6/0x300 [spl]
[21962.394899]  [] ? default_wake_function+0x0/0x20
[21962.394916]  [] ? taskq_thread+0x0/0x300 [spl]
[21962.394923]  [] kthread+0x96/0xa0
[21962.394929]  [] child_rip+0xa/0x20
[21962.394936]  [] ? kthread+0x0/0xa0
[21962.394942]  [] ? child_rip+0x0/0x20
FransUrbo referenced this issue in FransUrbo/zfs Apr 24, 2013
+ Use --with-linux{-obj} values from previous ./configure run.
+ Use --with-spl{-obj} values from previous ./configure run.
+ _configure was specified earlier, but never used. Use it!
fuhrmannb pushed a commit to fuhrmannb/cstor that referenced this issue Nov 3, 2020
sdimitro pushed a commit to sdimitro/zfs that referenced this issue Dec 11, 2020
Since we have embedded slog metaslabs, the calculation in
metaslab_group_get_space() is no longer accurate, because it includes
all metaslabs (including the ZIL metaslab), not just the ones in the
requested group (which is of a particular class, e.g. normal, non-log
class).  Since the returned space is larger than expected, when
metaslab_class_fragmentation() divides by the class's space, we may get
a result >100.
mmaybee pushed a commit to mmaybee/openzfs that referenced this issue Apr 6, 2022
old:
            checkpoint: Extent {
                location: DiskLocation(
                    72057594041394288,
                ),
                size: 576000,
            },

new:
            checkpoint: Extent {
                location: DiskLocation {
                    disk: DiskId(
                        1,
                    ),
                    offset: 1775348224,
                },
                size: 576000,
            },
EchterAgo pushed a commit to EchterAgo/zfs that referenced this issue Aug 4, 2023
Signed-off-by: Andrew Innes <[email protected]>
ixhamza pushed a commit to ixhamza/zfs that referenced this issue May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant