-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Results of stat() incorrect, don't match statSync #1401
Comments
What OS is this? Works fine on Linux 2.6.32. |
Whoops, sorry. OSX 10.7 "Lion". Just released, which is why it's not surprising there are features that don't work as designed. I wonder if the background file I/O thread has different privileges or something. |
It's been reported that your test case works okay with 0.4.10 on Lion (thanks, xerox!). Can you pinpoint the offending commit with |
@xenyou also tested on the "Lion", but there is no problem. very strange... |
Getting the same problem (which is preventing npm from installing). I'm still on Snow Leopard. statSync works, stat gives me bad data. |
Incidentally for anyone happening across this in an attempt to install npm, the simplest approach is to roll back to node 0.4(.9) - git checkout v0.4.9 - then remake and install. |
@idmillington: does
|
As extra data points: On Mac OS X 10.6.8, with the head of the node v0.4 branch I'm getting the correct behavior. On illumos with head of node v0.4, I'm also getting the correct behavior. |
this is the offending commit: as far as i can tell |
a little more info. i'm on 10.6.8, with xcode 4 v0.4.10 works a little testing shows the clang issue above |
FYI, Mac OS X 10.6.8 with Xcode 3.2.3 (Macbook) V0.5.1 works. |
@bnoordhuis - yes it does. I'm on the road today, but I'll do the binary search on versions when I get back if it hasn't already been found - though @arlolra seems to have a candidate now. |
if you revert 6b78b6b on v0.5.2, it works just fine |
@arlolra: Thanks for investigating. Are CC and CXX set in your environment? |
I had tried But However, I just tried adding them to the environment and rebuilding, and got the same problem. Tried clang too with no success. |
Status? |
Does it still happen with the latest master? The fs code has changed considerably (for one, it all lives in libuv now). |
Now I get a core:
Backtrace isn't terribly interesting: (gdb) bt |
Unfortunate coincidence, that was an unrelated bug that got fixed yesterday. Can you try again with the latest master? Please do a |
Another crash. Same backtrace. I deleted my entire repo and built from scratch. |
but a lot of other tests fail :) |
Again, this is on OSX Lion, 10.7.1. I'm building with homebrew; |
oh. well, i'm not on lion but i believe the problem discussed above was more about clang and xcode 4. i could be wrong. |
Yes. I suspect that clang is either producing bad code or it's exposing a bug in node. The thing is that it doesn't happen with clang's bleeding edge (rev 137028) on linux. |
With today's head, 'make test' yields 100% of the test cases failing with: |
Incorrect result of stat() is no longer an issue on OS X Lion. You can close. |
Just tested and indeed it works fine. |
Head of git a of Tue Jul 26 17:30:06 UTC 2011, v0.5.2-13-g09ee293.
fs.statSync() is correct.
fs.sync(), not so much, including isDirectory() as a follow-on.
This breaks npm almost completely.
The text was updated successfully, but these errors were encountered: