Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Jul 2011 01:16:05 -0500
From:      Brandon Falk <falkman@gamozo.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: Issue with 'Unknown Error: -512'
Message-ID:  <4E2672A5.4000401@gamozo.org>
In-Reply-To: <4E25A35E.6060308@gamozo.org>
References:  <4E2448D1.6020504@gamozo.org> <4E2558F7.6040202@FreeBSD.org> <4E25A35E.6060308@gamozo.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/19/2011 10:31 AM, Brandon Falk wrote:
> On 7/19/2011 5:14 AM, Dimitry Andric wrote:
>> On 2011-07-18 16:53, Brandon Falk wrote:
>>> 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).
>>
>> I have never seen this, neither with clang-compiled nor gcc-compiled
>> systems.  Can you please verify if it still occurs if you build your
>> system with gcc?  If you don't want (or can) rebuild the whole system,
>> you can try to rebuild just your kernel with gcc, and see if the
>> problems disappear.
>>
>>
>>> 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.
>>
>> I have been running clang-compiled systems for a long time now, and have
>> never seen this.  It works fine here, I cannot reproduce any of your
>> examples.
>>
>> Do you build with any special settings in make.conf or src.conf,
>> particularly modified CFLAGS or COPTFLAGS?  What is your architecture,
>> i386 or amd64?  Any other non-standard configuration or environment
>> settings?
>>
>
> Dimitry,
>
> I will try to build with gcc sometime today. I might as well try out a 
> different filesystem too.
>
> I have no special settings besides CPUTYPE?=native, but there was 
> someone with a similar error who did not specify a cpu type when 
> building, so I know that isn't a problem. Arch is amd64, no other 
> nonstandard configuration.
>
> -Brandon Falk
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to 
> "freebsd-hackers-unsubscribe@freebsd.org"
>

I just did a clang build with CPUTYPE?=native and the unknown error 
issue has seemed to calm down a large amount. I still occasionally get 
it, but given multiple attempts at say compiling software, it will move 
on and all will be well. It is for sure not happening every other 
O_TRUNC, but it is still happening. Depending on system configuration, 
this still could cause some major issues for people. I'll keep my eye 
out and see what changes and try to figure out how to duplicate the 
issue on the new rev.

Rev: 224221
Built with clang and CPUTYPE?=native

-Brandon Falk



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E2672A5.4000401>