From owner-freebsd-questions@FreeBSD.ORG Thu Jan 30 19:24:45 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C598ACF for ; Thu, 30 Jan 2014 19:24:45 +0000 (UTC) Received: from bs1.fjl.org.uk (bs1.fjl.org.uk [84.45.41.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 035841D42 for ; Thu, 30 Jan 2014 19:24:44 +0000 (UTC) Received: from [192.168.1.35] (host86-161-164-213.range86-161.btcentralplus.com [86.161.164.213]) (authenticated bits=0) by bs1.fjl.org.uk (8.14.4/8.14.4) with ESMTP id s0UJOf2s095099 (version=TLSv1/SSLv3 cipher=DHE-DSS-CAMELLIA256-SHA bits=256 verify=NO) for ; Thu, 30 Jan 2014 19:24:42 GMT (envelope-from frank2@fjl.co.uk) Message-ID: <52EAA6FD.3030504@fjl.co.uk> Date: Thu, 30 Jan 2014 19:24:45 +0000 From: Frank Leonhardt User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "freebsd-questions@freebsd.org" Subject: ntfs-3g, cp and 'Bad address' errors Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Jan 2014 19:24:45 -0000 I'm getting weird things happening when I use cp -a to copy files from an ntfs volume to zfs. On a few files I'm seeing: cp: /data/avi: Bad address (This is the destination file name) I'm also getting some like: cp: sourcenameavi: Permission denied These are, so far, weird files - sometimes in the Windows recycle bin; sometimes files originating on a Macintosh and uncompressed to the ntfs volume on a Windows box - particularly the "Bad Address" version. I don't mind permission denied. Although it's affected less than 1% of the files, and I don't care about them, I still want to know what's going on. I assume that something is passing back an EFAULT (error 14) and decoding it using libc. EFAULT is defined as: Bad address. The system detected an invalid address in attempting to use an argument of a call. Having trawled through the source the only place an error message in this format could come from is seems to be directory searching code in cp.c, which doesn't make a lot of sense (around like 285 in 10.0-RELEASE). I don't even know whether to blame ZFS or ntfs-3g, although EFAULT errors have been noted as a problem with the latter in other posts questioning its reliability. Does anyone know what's going on here? Thanks, Frank.