From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 18 15:35:16 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 043CB106564A for ; Mon, 18 Jul 2011 15:35:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 304E08FC0A for ; Mon, 18 Jul 2011 15:35:14 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA24443; Mon, 18 Jul 2011 18:18:58 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <4E244EE1.40604@FreeBSD.org> Date: Mon, 18 Jul 2011 18:18:57 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:5.0) Gecko/20110705 Thunderbird/5.0 MIME-Version: 1.0 To: Brandon Falk References: <4E2448D1.6020504@gamozo.org> In-Reply-To: <4E2448D1.6020504@gamozo.org> X-Enigmail-Version: 1.2pre Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: Issue with 'Unknown Error: -512' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 15:35:16 -0000 on 18/07/2011 17:53 Brandon Falk said the following: > Hello, > > In recent branches (confirmed with 224119) builds compiled with clang happen to > throw 'Unknown error: -512' in a lot of places, making the system unusable. > (Untested on gcc compiled systems). Originally I thought the problem was with > specific programs, then I narrowed it down to file I/O, and now I've narrowed it > down to open() with O_TRUNC. Without O_TRUNC there seems to be no issues > whatsoever. With O_TRUNC on open() it fails with that 'Unknown error: -512' every > other time you run the program. Common issues, portsnap is affected, making it > impossible to fetch/extract ports. As well as redirecting output in shells eg > `echo 'hi' > test` fails every other try. You have the same issue with text > editors like `edit` where it fails every other save. There are no issues with > `echo 'hi' >> test` as there is no O_TRUNC, it only seems to be an O_TRUNC error. > > Any tips? Otherwise I'll be looking into this today myself. Just a hint that you could try using DTrace syscall and fbt providers to see where in kernel (if in kernel) that -512 return value originates. -- Andriy Gapon