This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.7.7: rm -rf sometimes fails - race condition?


On 12/10/2010 12:22 PM, Matthias Andree wrote:
Has anyone seen similar things?

Yes and you seem to have nailed the problem - it happens when a virus checker hooks into a syscall and allows it to return before completion. I don't think we want to modify Cygwin to not trust success return values from system calls.

Well, I don't know a solution but I think this is unexpected behaviour.

When some bit of third-party software patches the kernel and breaks its API -- which includes details like "when this call returns a success code, it means it succeeded" -- that is going to result in unexpected behavior in any program that calls that syscall.


If you were to take a survey of existing Windows programs and sort them according to density of calls into the deepest parts of the Windows kernel, I'd bet Cygwin would be way over at the high-density end. Since antimalware programs hook these same parts of the kernel to do their job, bugs in those hooks will affect Cygwin more often than most other Windows programs.

Cygwin doesn't -- and shouldn't -- patch around such bugs. Cygwin probably contains code to work around bugs in Windows itself, but that's as far as it should go.

You say you've disabled your antimalware software and the problem persists. I doubt you've actually gotten yourself back to a stock Windows configuration, but if so, you should be able to write a program that will show the same behavior on anyone's system. If you can do that, I think a fix would shortly follow. I'm not making promises of other people's resources, just making a history-based prediction.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]