# Issues with 'Unknown Error'



## falkman (Jul 18, 2011)

Hello,

There is currently an issue on FreeBSD-CURRENT built with clang throwing out 'Unknown error' messages.

(Note: http://docs.freebsd.org/cgi/mid.cgi?CAAoTqfsHUgjaVSEP7xSeOORC6Hb7=MEfED+P8X5kH75DoYSrXw)

It seems to be an issue with writing. If I do `echo 'test' > test`, eventually it fails with 'Unknown error: -512.' Same with if you use edit on a file, it usually takes 2 attempts for it to save. I can confirm this error in 224119, and that email happens to be older than a week old, so it must have been around for a while.

Any news on this?

Doing `echo 'hi' > /etc/motd` fails every other call with 'Unknown error: -512'. I was not able to duplicate this myself by making some simple C code that does open() and write().

Sadly it's too late for me to do much research, so I'll check it out tomorrow unless someone knows the problem. Perhaps it's a clang problem and not a FreeBSD issue?

-Brandon


----------



## SirDice (Jul 18, 2011)

Issues with -CURRENT should be reported on the maillist. There aren't a lot of developers here on this board.


----------



## falkman (Jul 19, 2011)

Moved to mailing lists:

http://lists.freebsd.org/pipermail/freebsd-hackers/2011-July/035906.html

Update too minor to send out a new email:

The issue has been narrowed down even more to ffs_truncate() in sys/ufs/ffs/ffs_inode.c:143. Due to the largeness of this function, and the following sidenote, it's getting harder to pinpoint the issue.

Sidenote: This bug happens to go away when debugging, such a pain... Hopefully after enough attempts, I'll be able to catch the bug in action with the debugger.


----------

