Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752093AbdGFQtq (ORCPT ); Thu, 6 Jul 2017 12:49:46 -0400 Received: from mout.gmx.net ([212.227.17.20]:53884 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751887AbdGFQto (ORCPT ); Thu, 6 Jul 2017 12:49:44 -0400 To: linux-fsdevel Cc: Linux Kernel From: =?UTF-8?Q?Toralf_F=c3=b6rster?= Subject: UBSAN: Undefined behaviour in fs/fs-writeback.c:1586:18 Message-ID: <644b1741-9b47-97ae-7bc3-f18bc25bf22b@gmx.de> Date: Thu, 6 Jul 2017 18:49:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:BIpNI9KxFZhxcllmzywiC3Ym7oqi4c1L9Dp/xk0yp74AQxIGezH VP/QH/b//82Bhz6keAkJW2DTviAHMZOvTawx222UBGE5mjzoNDO1UbbI0cq0+ZKFIItt3VX /tmAx3b1aKU8B3R4/Z+6vpkPcAloDA4j0yx2J7cwC2oxvXMDc757hnIhnpo37DXKkjFU+pl MpdZxowRTE54SVIritf/A== X-UI-Out-Filterresults: notjunk:1;V01:K0:WMxBnikRWxE=:mCinP6jZ9+mKheiUuPg6Tu OgCOC2iIRxPeSkt8CRXCjKN8rnuPnmH5o16NgPp//5uZYi4YSEJtf/RppokLcRWtJZzoWCKpA GJc0WwdyTEgxoVXaThlpG3EG5zZ6Wg3p74WPmMnRdcRBbLgGOSaJHUHNa7k7MBfWQs8wIkan4 jgSTLGfUcbGzFGZHzV1o7P4ykaibOaDvhPG6cm4SUfb30nkX5cjJVQ8WBEfObh9DOvnnxlVAo EJGhzYgvlfQBL/DcvZQNwSAgzsTF874UqQGxLxEqoBmg+pssGlZlQhEgowsi/ILflXDSOh963 NbgArXmoBE49alDMNCGs4R0n3zTszC0mN7GiNzWIYtdSLkzMab6xrKSCAhc53PUceFOtDANKn XUghtrti+DiBqY1uafpJh6r5/Sao+Cz/1z2caeYWWlqKE5LGfvRx9cpEHWY1eeblEiRsooWZg ea8Tbolhkt5AS9rIIiAPjHwKyU8aARtgaWeNcS0rmdcIzptvAR5d02eAPO/Gwg2OoTrRcMTif sOPcS8ewg+mMylESHjF4QaJCciiEJUWYEumzBr0YT0RSM1AUd9j/4KKiU8EVrTA2kcTvU7/GV oK92ScA0Ap7soskz7ks7B1hmQH7HsRER+V0Vi3Q5z9uFrBQkL4HT5QnUmMMebigKgJp5JDIzF omBAgYrNc91Ssx/Q4Wu8yqmPhSLbVuDvM2o+HkewYHBfDeT1q8OWndi4pGIauKD5kzL7OBmFc StdDNF1a2w2QlUl/QnhBK3qugs4kL1aYCj73PaMauC50d/2LMbeXAbVzGkjeAI7c/XkRoV8q7 BE/fLTy Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4373 Lines: 55 Got that at a hardened Gentoo Linux server with 4.12.0 (for the first time) at a BTRFS logical volume occuping about 4/9 of a 5 TB volume group after an uptime of about 2 days : Had issues with processes accessing files at that volume now too. Jul 6 15:33:53 mr-fox kernel: [158695.417132] ================================================================================ Jul 6 15:33:53 mr-fox kernel: [158695.417137] UBSAN: Undefined behaviour in fs/fs-writeback.c:1586:18 Jul 6 15:33:53 mr-fox kernel: [158695.417139] signed integer overflow: Jul 6 15:33:53 mr-fox kernel: [158695.417140] 9223372036854775807 - -327 cannot be represented in type 'long int' Jul 6 15:33:53 mr-fox kernel: [158695.417143] CPU: 9 PID: 20027 Comm: kworker/u24:16 Not tainted 4.12.0 #1 Jul 6 15:33:53 mr-fox kernel: [158695.417144] Hardware name: /DX79TO, BIOS SIX7910J.86A.0650.2014.0307.0138 03/07/2014 Jul 6 15:33:53 mr-fox kernel: [158695.417151] Workqueue: writeback wb_workfn (flush-btrfs-1) Jul 6 15:33:53 mr-fox kernel: [158695.417153] Call Trace: Jul 6 15:33:53 mr-fox kernel: [158695.417158] dump_stack+0x60/0x9a Jul 6 15:33:53 mr-fox kernel: [158695.417161] ubsan_epilogue+0xd/0x40 Jul 6 15:33:53 mr-fox kernel: [158695.417163] handle_overflow+0xc8/0xf0 Jul 6 15:33:53 mr-fox kernel: [158695.417165] ? __writeback_single_inode+0x17c/0x560 Jul 6 15:33:53 mr-fox kernel: [158695.417167] __ubsan_handle_sub_overflow+0xe/0x10 Jul 6 15:33:53 mr-fox kernel: [158695.417169] writeback_sb_inodes+0x7a3/0x850 Jul 6 15:33:53 mr-fox kernel: [158695.417171] __writeback_inodes_wb+0xa0/0x140 Jul 6 15:33:53 mr-fox kernel: [158695.417172] wb_writeback+0x35c/0x4d0 Jul 6 15:33:53 mr-fox kernel: [158695.417174] wb_workfn+0x25b/0x6b0 Jul 6 15:33:53 mr-fox kernel: [158695.417175] ? wb_workfn+0x25b/0x6b0 Jul 6 15:33:53 mr-fox kernel: [158695.417178] process_one_work+0x225/0x7d0 Jul 6 15:33:53 mr-fox kernel: [158695.417180] worker_thread+0x6b/0x500 Jul 6 15:33:53 mr-fox kernel: [158695.417182] kthread+0x168/0x240 Jul 6 15:33:53 mr-fox kernel: [158695.417184] ? process_one_work+0x7d0/0x7d0 Jul 6 15:33:53 mr-fox kernel: [158695.417185] ? __kthread_create_on_node+0x1c0/0x1c0 Jul 6 15:33:53 mr-fox kernel: [158695.417189] ret_from_fork+0x22/0x30 Jul 6 15:33:53 mr-fox kernel: [158695.417190] ================================================================================ Jul 6 15:33:53 mr-fox kernel: [158695.417193] ================================================================================ Jul 6 15:33:53 mr-fox kernel: [158695.417194] UBSAN: Undefined behaviour in fs/fs-writeback.c:1797:9 Jul 6 15:33:53 mr-fox kernel: [158695.417195] signed integer overflow: Jul 6 15:33:53 mr-fox kernel: [158695.417196] 9223372036854775807 - -9223372036854775482 cannot be represented in type 'long int' Jul 6 15:33:53 mr-fox kernel: [158695.417198] CPU: 9 PID: 20027 Comm: kworker/u24:16 Not tainted 4.12.0 #1 Jul 6 15:33:53 mr-fox kernel: [158695.417199] Hardware name: /DX79TO, BIOS SIX7910J.86A.0650.2014.0307.0138 03/07/2014 Jul 6 15:33:53 mr-fox kernel: [158695.417201] Workqueue: writeback wb_workfn (flush-btrfs-1) Jul 6 15:33:53 mr-fox kernel: [158695.417203] Call Trace: Jul 6 15:33:53 mr-fox kernel: [158695.417204] dump_stack+0x60/0x9a Jul 6 15:33:53 mr-fox kernel: [158695.417206] ubsan_epilogue+0xd/0x40 Jul 6 15:33:53 mr-fox kernel: [158695.417208] handle_overflow+0xc8/0xf0 Jul 6 15:33:53 mr-fox kernel: [158695.417210] __ubsan_handle_sub_overflow+0xe/0x10 Jul 6 15:33:53 mr-fox kernel: [158695.417211] wb_writeback+0x3a7/0x4d0 Jul 6 15:33:53 mr-fox kernel: [158695.417213] wb_workfn+0x25b/0x6b0 Jul 6 15:33:53 mr-fox kernel: [158695.417214] ? wb_workfn+0x25b/0x6b0 Jul 6 15:33:53 mr-fox kernel: [158695.417216] process_one_work+0x225/0x7d0 Jul 6 15:33:53 mr-fox kernel: [158695.417218] worker_thread+0x6b/0x500 Jul 6 15:33:53 mr-fox kernel: [158695.417219] kthread+0x168/0x240 Jul 6 15:33:53 mr-fox kernel: [158695.417221] ? process_one_work+0x7d0/0x7d0 Jul 6 15:33:53 mr-fox kernel: [158695.417222] ? __kthread_create_on_node+0x1c0/0x1c0 Jul 6 15:33:53 mr-fox kernel: [158695.417224] ret_from_fork+0x22/0x30 Jul 6 15:33:53 mr-fox kernel: [158695.417225] ================================================================================ -- Toralf PGP C4EACDDE 0076E94E