From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F05DC43387 for ; Fri, 11 Jan 2019 23:05:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4C7BB2084C for ; Fri, 11 Jan 2019 23:05:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="EIDjbthc" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725786AbfAKXFI (ORCPT ); Fri, 11 Jan 2019 18:05:08 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:36222 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725536AbfAKXFI (ORCPT ); Fri, 11 Jan 2019 18:05:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=vckafBkpGQFHbDK/MlGTOElRzd7OgMP6/CGVfa9Cq4I=; b=EIDjbthcy3zifx0pUvHgGnutq iQDae/aQc5TewkF6uLiHLOCXET7I8O092edfTzgue4a4+fef2Q3iV969cMOsOlaKgbvy1DlBNyn9/ nRFlKl50QX9trbG1pKAbIT+0gzt5Zyoeb/fsIj9GY20C/K0FhLzd98/rRDOfZtZDNm6v+IQ2AvIYe +oKAvfPrub6A4HZP28IN5WnEPirUP0pbGEHt+k4gZ6Mp41HykFdvZKs7qImxHR9WEzzxKOFkBd7cf 3BRdIrbchlUxy+J8iZFDO4aguAyCX6QSK7jJZHa5qnQ8srua4g20eHYp8O+G4Tlg9i1NmNoU5HjtX 7BqEN9wWg==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1gi5rP-0007qn-HL; Fri, 11 Jan 2019 23:05:07 +0000 Date: Fri, 11 Jan 2019 15:05:07 -0800 From: Matthew Wilcox To: Steve French Cc: CIFS , linux-fsdevel , Pavel Shilovsky Subject: Re: scp bug due to progress indicator when copying from remote to local on Linux Message-ID: <20190111230507.GM6310@bombadil.infradead.org> References: <20190111132817.GE6310@bombadil.infradead.org> <20190111212240.GL6310@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Jan 11, 2019 at 03:50:02PM -0600, Steve French wrote: > On Fri, Jan 11, 2019 at 3:22 PM Matthew Wilcox wrote: > > Right ... so the code never calls ftruncate() again. Changing all of > > userspace is just not going to happen; maybe you could get stuff fixed in > > libc, but really ftruncate() should only be interrupted by a fatal signal > > and not by SIGALRM. > > Looking at the places wait_event_interruptible is done I didn't see code > in fs/cifs that would match the (presumably) code path, mostly those > calls are in > smbdirect (RDMA) code) - for example cifs_setattr does call > filemap_write_and_wait > but as it goes down into the mm layer and then to cifs_writepages and > the SMB3 write > code, I didn't spot a "wait_event_interruptible" in that path (I might > have missed > something in the mm layer). I do see one in the cifs reconnect path, > but that is > not what we are typically hitting. Any ideas how to match what we > are blocked in when > we get the annoying SIGALRM? Another vague thought - is it possible > to block SIGALRM > across all of cifs_setattr? If it is - why do so few (only 3!) file > systems (ceph, jffs2, ocfs2 > ever call sigprocmask)? You can see where a task is currently sleeping with 'cat /proc/$pid/stack'. If you can provoke a long duration ftruncate, that'd be a good place to start looking.