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

mkfs on zvol: sleeping function called from invalid context #1011

Closed
dechamps opened this issue Oct 4, 2012 · 2 comments
Closed

mkfs on zvol: sleeping function called from invalid context #1011

dechamps opened this issue Oct 4, 2012 · 2 comments
Milestone

Comments

@dechamps
Copy link
Contributor

dechamps commented Oct 4, 2012

Using latest master (0443477), Linux 3.2.28. Steps to reproduce:

# dd if=/dev/zero of=/tmp/file bs=1 count=1 seek=1024M
# zpool create foo /tmp/file
# zfs create -V 512M foo/vol
# mkfs.ext4 /dev/zvol/foo/vol 

This results in the following kernel message:

BUG: sleeping function called from invalid context at mm/slub.c:935
in_atomic(): 1, irqs_disabled(): 1, pid: 7556, name: mkfs.ext4
Pid: 7556, comm: mkfs.ext4 Tainted: P           O 3.2.28-zfsdev-std-ipv6-64 #6
Call Trace:
 [<ffffffff81093c21>] __might_sleep+0xe1/0x110
 [<ffffffff8117e8a7>] __kmalloc+0xd7/0x1a0
 [<ffffffffa00fe7fa>] kmem_alloc_debug+0x25a/0x530 [spl]
 [<ffffffffa010134b>] task_alloc+0x1eb/0x4a0 [spl]
 [<ffffffffa0102b9b>] __taskq_dispatch+0x1eb/0x460 [spl]
 [<ffffffffa02dc3cb>] zvol_request+0x10b/0x1a0 [zfs]
 [<ffffffff8162ccbe>] __blk_run_queue+0x1e/0x20
 [<ffffffff816330fe>] queue_unplugged+0x4e/0xe0
 [<ffffffff8163336c>] blk_flush_plug_list+0x1dc/0x260
 [<ffffffff81633645>] blk_queue_bio+0x205/0x370
 [<ffffffff816314ba>] generic_make_request+0xca/0x100
 [<ffffffff81631568>] submit_bio+0x78/0xf0
 [<ffffffff811bbaab>] submit_bh+0xeb/0x130
 [<ffffffff811bf1b0>] __block_write_full_page+0x220/0x3d0
 [<ffffffff811bf431>] block_write_full_page_endio+0xd1/0x110
 [<ffffffff811bf485>] block_write_full_page+0x15/0x20
 [<ffffffff811c3188>] blkdev_writepage+0x18/0x20
 [<ffffffff81141bca>] __writepage+0x1a/0x50
 [<ffffffff81142766>] write_cache_pages+0x1f6/0x4f0
 [<ffffffff81142ab4>] generic_writepages+0x54/0x80
 [<ffffffff81142b04>] do_writepages+0x24/0x40
 [<ffffffff81139ddb>] __filemap_fdatawrite_range+0x5b/0x60
 [<ffffffff81139e3a>] filemap_write_and_wait_range+0x5a/0x80
 [<ffffffff811c33f5>] blkdev_fsync+0x25/0x60
 [<ffffffff811b9afb>] vfs_fsync_range+0x2b/0x40
 [<ffffffff811b9b2c>] vfs_fsync+0x1c/0x20
 [<ffffffff811b9d6a>] do_fsync+0x3a/0x60
 [<ffffffff811b9dc0>] sys_fsync+0x10/0x20
 [<ffffffff81c1ecab>] system_call_fastpath+0x16/0x1b
@behlendorf
Copy link
Contributor

This indicate that we called kmem_alloc() under a spin lock with KM_SLEEP(). Looking at the code I just don't see how this is possible unless you were running an older SPL. Commit openzfs/spl@9b51f21 should have resolved any lingering issues like this.

@dechamps
Copy link
Contributor Author

dechamps commented Oct 5, 2012

That's possible. Unfortunately I don't have access to the system on which it occurred anymore so I'm gonna assume you're right and close this.

@dechamps dechamps closed this as completed Oct 5, 2012
pcd1193182 pushed a commit to pcd1193182/zfs that referenced this issue Sep 26, 2023
…s#1011)

Bumps [is-terminal](https://github.com/sunfishcode/is-terminal) from 0.4.8 to 0.4.9.
- [Commits](sunfishcode/is-terminal@v0.4.8...v0.4.9)

---
updated-dependencies:
- dependency-name: is-terminal
  dependency-type: indirect
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

2 participants