From owner-freebsd-questions@freebsd.org Sat Dec 1 14:15:35 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ACEB81318ACB for ; Sat, 1 Dec 2018 14:15:35 +0000 (UTC) (envelope-from freebsd01@dgmm.net) Received: from out2-server.securespamfilter.com (out2-server.securespamfilter.com [89.187.86.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1BAF84638 for ; Sat, 1 Dec 2018 14:15:34 +0000 (UTC) (envelope-from freebsd01@dgmm.net) Received: from phantom.hostingseries.net ([89.187.86.9]) by server.securespamfilter.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1gT5Rs-0006gd-Q3 for freebsd-questions@freebsd.org; Sat, 01 Dec 2018 13:36:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dgmm.net; s=default; h=Content-Type:Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Reply-To:To:From:Sender:Cc: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=zGsZJkUB4cClov+KlpibGEuWoQqRJuxaV7Freai3V/M=; b=PDCHHcLWI3rc2pOiBicR7gGIGK 9cb/EY6y8T5nbeJD5Uj5+l435HgDPsFs+NdWcCcfq1h67Tgvl9t72YqeR4zs9sIuapNPYl528UXLE J4oof8D+cs9cDMtoKBDQIgglf0UZ3cb3UNKJJPqFZa0lDbCVHdeLqhGEqbsW/K3VIkW0ItHyD5kOB 6SFSB+3eSrs8zSqw+jIH3Sk5Mg6MklRw9DHfkhVwabbZ0RkBILQcjLQuHvV4j3PF2qCtW/b5hVhsy Fp/DAb9vUanWkgywrwEyFDZltJ5r7a+4rcMxr+FNjB3OK43nAA+hFVa05obAs+NWBoFH3Novhg4IX w20PmgRw==; Received: from cpc138954-jarr14-2-0-cust73.16-2.cable.virginm.net ([92.236.194.74]:33972 helo=amd.asgard.uk) by phantom.hostingseries.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gT5Rs-000BdK-KB for freebsd-questions@freebsd.org; Sat, 01 Dec 2018 13:36:44 +0000 From: Dave To: freebsd-questions@freebsd.org Reply-To: freebsd01@dgmm.net Subject: Re: ROX-Filer: overwriting a file on an USB drive truncates it Date: Sat, 01 Dec 2018 13:36:44 +0000 Message-ID: <5081512.8gLySxXtyI@amd.asgard.uk> In-Reply-To: <4ee20fc51b13465edcec6d8456be7cf0@mhoenicka.de> References: <4ee20fc51b13465edcec6d8456be7cf0@mhoenicka.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-AuthUser: fbsd@dgmm.net X-Originating-IP: 89.187.86.9 X-SpamExperts-Domain: pickaweb.co.uk X-SpamExperts-Username: phantom Authentication-Results: securespamfilter.com; auth=pass (login) smtp.auth=phantom@pickaweb.co.uk X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.09) X-Recommended-Action: accept X-Filter-ID: EX5BVjFpneJeBchSMxfU5syicL2IN1Q88aaOcQcuKBt602E9L7XzfQH6nu9C/Fh9KJzpNe6xgvOx q3u0UDjvO16ABlNNUDIJIcF7N1k9wYur48C+/LzRqVzELXf1NLUsbNbo7palBZjCExzO+3olYmpI jwge+bPl7FBODMhx90HO4k7ydv2Rs1VgfbHBQGgnSBWlL1zfgiPkRstzHteqQVg1Uy9ADlOzeJz1 BxZWfHw5Hq+okk8kO+NUCpq3LTiGtbpnLodRr5By2fDp2R8jVjzKTV8aWbomEbNt4lTNHpcoh9fp 7ca9NIZ/NSpXkCUPj8uKS83AY8Zox+9iC24kxSjxqfwyCAYrw2fqkQCzkdxapF5OACmPxETKsh5U enUy2wHLMD8RvSMD/3dHPDLWh5ThS7fF+kg1CS5uvLKKFgo474cUcvHPp35TgSvWp0fKdtSFBDNI Qqn3wmp29zL19SDO67PADFrj2HT/iTotmKGtWtQIVFsrfSwUKmjCqaf5AKMmXLf+gZxR4kKQYJrn 9LGwFDEhigDkhKQAFvOvyJFzHDeqqFz43py4SDhdaHkWGH5NTIq4V6iO0CctOXO1P/DXGdvMf0hC IQTYazXBru0r9/j4ZqTiAQn/RR6hryLeed4rsTxrIWOhYO0bDjnbdlYC+G5RnXkd11JPSbchqfcr IEHWKHXCLZJA7dA5FhTM6zU2HSM79WwHGez7UH25BQQ7Ahihdv0gU25AngJxQvCxnUootgmFOIWO GoMv2GGrpR9HEk1pnTskdcHnCnXCKICVv+5ddIwgRyjpQON48LD6EPCPc3PAvmk0ObpuhqyrX1q+ UK9M4Ffp/Sz1yKunwC3XBUeEcHVSKSG/tpRcYvp04tzEYBpFRWBTxU3uomLB/2RkGBM2GsCYQAsC 54M3LofZ7l/S0eyx3PjKNlaDOt+G45kWo0ooxQlAfjTuG6dcAA8+Lw2w3b5kWD+aMaJnRItFGVnm 6SSE2NVDVurvqXXDd6ZIYRRFbejF2yLs6Uj2F1lOm48loQLcfM4fdfa33A== X-Report-Abuse-To: spam@server.securespamfilter.com X-Rspamd-Queue-Id: C1BAF84638 X-Spamd-Result: default: False [6.71 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd01@dgmm.net]; HAS_XOIP(0.00)[]; MX_INVALID(0.50)[cached]; TO_DN_NONE(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[dgmm.net:+]; RECEIVED_SPAMHAUS_PBL(0.00)[74.194.236.92.zen.spamhaus.org : 127.0.0.11]; IP_SCORE(0.04)[ipnet: 89.187.86.0/24(0.16), asn: 31708(0.13), country: GB(-0.10)]; CTE_CASE(0.50)[]; FROM_EQ_ENVFROM(0.00)[]; ASN(0.00)[asn:31708, ipnet:89.187.86.0/24, country:GB]; ARC_NA(0.00)[]; RECEIVED_SPAMHAUS_XBL(3.00)[9.86.187.89.zen.spamhaus.org : 127.0.0.4]; R_DKIM_ALLOW(0.00)[dgmm.net]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.84)[0.835,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[dgmm.net]; NEURAL_SPAM_MEDIUM(0.90)[0.898,0]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; NEURAL_SPAM_LONG(0.94)[0.939,0]; RCVD_TLS_ALL(0.00)[]; GREYLIST(0.00)[pass,meta] X-Rspamd-Server: mx1.freebsd.org X-Spam: Yes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Dec 2018 14:15:35 -0000 On Thursday, 29 November 2018 00:23:12 GMT Markus Hoenicka wrote: > Hi, > > I've recently upgraded my laptop to: > > FreeBSD wombat 11.2-RELEASE-p4 FreeBSD 11.2-RELEASE-p4 #0: Thu Sep 27 > 08:16:24 UTC 2018 > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > > I've also updated all installed packages. > > I keep running into a nasty file copying bug that does not seem to have > occurred previously. Result is that overwriting an existing file on an > USB drive causes this file to be truncated instead of being overwritten, > which means data loss. > > How to reproduce: > > After logging in, I start an Xfce session manually: > > startxfce4 --with-ck-launch > > mount stick in an xterm, as per handbook. Note that I've set up user > mounting of USB drives: > > mount -t msdosfs -o -m=644,-M=755 /dev/da0s1 /stick/markus > > open source directory (on hard drive) in a ROX-Filer window > open target directory (on usb drive) in another ROX-Filer window > > drag&drop a file from source over an existing copy on target > > dialog box asks if it is ok to overwrite which I acknowledge > > ROX-Filer window shows the correct file size immediately after copying, > and after rescanning the directory. ls -al /stick/markus/targetdir also > shows the correct file size at this point. > > umount /stick/markus fails because the device is busy. fstat shows that > the ROX-Filer process keeps it busy > > now I can either use umount -f /stick/markus to forcibly unmount the > stick, or I log out of the X session and then use umount /stick/markus > without problems > > then mount the stick again as above, or try on a different computer > > ls -al /stick/markus/targetdir shows a target file size of zero. > > It appears that the new data are never flushed to the disk. I've even > tried to run umount /stick/markus before umount -f /stick/markus, as > this should perform a flush according to the umount man page. This bug > appears to be specific to ROX-Filer. I could not reproduce this using > Thunar, or plain ol' cp. This bug also appears to be specific to USB > target drives, as I cannot reproduce this when overwriting files on the > hard drive. I do not think the problem is related to a faulty file > system on the target drive as I can reproduce this with just about any > thumbdrive and external disk lying around. > > I've been using ROX-Filer for ages, but I've noticed that neither > mailing lists nor bug tracker seem to be active. Is it about time to > move on? > > thanks > Markus I've seen similar issues with various filemanagers over the years including Konquerer and Dolphin. I always just assumed it was a feature of the way filemanagers worked so always closed the file manager windows linked to the mounted device before unmounting it or at least select a directory that is not part of the mounted device. I never tried doing a forced umount while the filemanager had a link to the mounted device.