From owner-freebsd-questions@freebsd.org Thu Nov 29 00:23:24 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 03A7E1142023 for ; Thu, 29 Nov 2018 00:23:24 +0000 (UTC) (envelope-from markus.hoenicka@mhoenicka.de) Received: from smtprelay08.ispgateway.de (smtprelay08.ispgateway.de [134.119.228.107]) (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 AFB758E0A7 for ; Thu, 29 Nov 2018 00:23:22 +0000 (UTC) (envelope-from markus.hoenicka@mhoenicka.de) Received: from [134.119.228.3] (helo=webmail.df.eu) by smtprelay08.ispgateway.de with esmtpa (Exim 4.90_1) (envelope-from ) id 1gSA6q-0008Su-Vk for freebsd-questions@freebsd.org; Thu, 29 Nov 2018 01:23:13 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 29 Nov 2018 01:23:12 +0100 From: Markus Hoenicka To: freebsd-questions@freebsd.org Subject: ROX-Filer: overwriting a file on an USB drive truncates it Message-ID: <4ee20fc51b13465edcec6d8456be7cf0@mhoenicka.de> X-Sender: markus.hoenicka@mhoenicka.de User-Agent: Roundcube Webmail X-Df-Sender: bWFya3VzLmhvZW5pY2thQG1ob2VuaWNrYS5kZQ== X-Rspamd-Queue-Id: AFB758E0A7 X-Spamd-Result: default: False [-0.83 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.77)[-0.772,0]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[mhoenicka.de]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-0.08)[asn: 34011(-0.38), country: DE(-0.02)]; MX_GOOD(-0.01)[mxlb.ispgateway.de]; NEURAL_HAM_SHORT(-0.01)[-0.014,0]; NEURAL_HAM_MEDIUM(-0.76)[-0.760,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[107.228.119.134.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:34011, ipnet:134.119.228.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-Rspamd-Server: mx1.freebsd.org 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: Thu, 29 Nov 2018 00:23:24 -0000 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 -- Markus Hoenicka http://www.mhoenicka.de AQ score 38