* sendfile(2) not killable on btrfs
@ 2016-01-06 9:08 Akihiro Suda
2016-01-06 13:02 ` Chris Samuel
0 siblings, 1 reply; 3+ messages in thread
From: Akihiro Suda @ 2016-01-06 9:08 UTC (permalink / raw)
To: linux-btrfs
Hi,
I have an issue on btrfs, and opened a bugzilla ticket:
https://bugzilla.kernel.org/show_bug.cgi?id=110391
=====
Commit 296291cd should have made sendfile(2) killable.
https://github.com/torvalds/linux/commit/296291cd
> Currently a simple program below issues a sendfile(2) system call which
> takes about 62 days to complete in my test KVM instance.
>
> int fd;
> off_t off = 0;
>
> fd = open("file", O_RDWR | O_TRUNC | O_SYNC | O_CREAT, 0644);
> ftruncate(fd, 2);
> lseek(fd, 0, SEEK_END);
> sendfile(fd, fd, &off, 0xfffffff);
>
> Now you should not ask kernel to do a stupid stuff like copying 256MB in
> 2-byte chunks and call fsync(2) after each chunk but if you do, sysadmin
> should have a way to stop you.
However, it is still not killable on btrfs.
Stack trace:
[<ffffffffc021ea60>] write_all_supers.isra.45+0x960/0xb00 [btrfs]
[<ffffffffc02200f7>] write_ctree_super+0x17/0x20 [btrfs]
[<ffffffffc026b1c7>] btrfs_sync_log+0x897/0xb40 [btrfs]
[<ffffffffc023d0c8>] btrfs_sync_file+0x328/0x360 [btrfs]
[<ffffffff8122fe9b>] vfs_fsync_range+0x4b/0xb0
[<ffffffffc023d307>] btrfs_file_write_iter+0x207/0x510 [btrfs]
[<ffffffff811fca0b>] new_sync_write+0x9b/0xe0
[<ffffffff811fca76>] __vfs_write+0x26/0x40
[<ffffffff811fce13>] __kernel_write+0x53/0xf0
[<ffffffff8122d832>] write_pipe_buf+0x72/0xa0
[<ffffffff8122d349>] __splice_from_pipe+0xf9/0x170
[<ffffffff8122eeee>] splice_from_pipe+0x5e/0x90
[<ffffffff8122ef5d>] default_file_splice_write+0x1d/0x30
[<ffffffff8122cda6>] direct_splice_actor+0x36/0x40
[<ffffffff8122d9d6>] splice_direct_to_actor+0xe6/0x210
[<ffffffff8122db98>] do_splice_direct+0x98/0xd0
[<ffffffff811fddef>] do_sendfile+0x1bf/0x3a0
[<ffffffff811fea2e>] SyS_sendfile64+0x5e/0xb0
[<ffffffff817f02b2>] entry_SYSCALL_64_fastpath+0x16/0x75
[<ffffffffffffffff>] 0xffffffffffffffff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sendfile(2) not killable on btrfs
2016-01-06 9:08 sendfile(2) not killable on btrfs Akihiro Suda
@ 2016-01-06 13:02 ` Chris Samuel
2016-01-07 1:30 ` Akihiro Suda
0 siblings, 1 reply; 3+ messages in thread
From: Chris Samuel @ 2016-01-06 13:02 UTC (permalink / raw)
To: linux-btrfs
On Wed, 6 Jan 2016 06:08:46 PM Akihiro Suda wrote:
> However, it is still not killable on btrfs.
Your bugzilla entry is for the 4.2 kernel in the current Ubuntu, but this
patch was only merged into the mainline for at v4.3-rc6-123-g296291c so unless
it was backported by Canonical it won't be present.
Could you test with the 4.3 kernel please?
http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.3-wily/
cheers!
Chris
--
Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sendfile(2) not killable on btrfs
2016-01-06 13:02 ` Chris Samuel
@ 2016-01-07 1:30 ` Akihiro Suda
0 siblings, 0 replies; 3+ messages in thread
From: Akihiro Suda @ 2016-01-07 1:30 UTC (permalink / raw)
To: linux-btrfs, chris
>> However, it is still not killable on btrfs.
>
>Your bugzilla entry is for the 4.2 kernel in the current Ubuntu, but this
>patch was only merged into the mainline for at v4.3-rc6-123-g296291c so unless
>it was backported by Canonical it won't be present.
>
>Could you test with the 4.3 kernel please?
>
>http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.3-wily/
>
>cheers!
>Chris
Hi,
Thank your the comment.
The patch has been backported to v4.2 by Canonical:
http://kernel.ubuntu.com/git/ubuntu/ubuntu-wily.git/commit/mm/filemap.c?id=4d291df30fb7a94d13c6d38addf8d85d38f0111b
I tried linux-image-4.3.3-040303-generic_4.3.3-040303.201512150130_amd64.deb,
and I can still hit the bug.
Should I also test the vanilla kernel?
Sorry for that this mail can break In-Reply-To header, as I'm not
subscribing the ML, and manually writing this reply.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-07 1:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-06 9:08 sendfile(2) not killable on btrfs Akihiro Suda
2016-01-06 13:02 ` Chris Samuel
2016-01-07 1:30 ` Akihiro Suda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).