Skip to contentSkip to conversation

Found the problem...

uml-devel Rob Landley 2 participants 3 messages Oct 9, 2005 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

When attempting to stat a nonexistent file, 2.6.11 returned a consistent value in st_mode (BFFFF73C, every time), and 2.6.13 is returning random crap that varies from invocation to invocation. Hence the intermittent failure.

We _should_ be checking the error return value from lstat64() before looking at S_ISDIR(), and I'll fix it. Almost certainly, the value in there is random garbage off the stack, and 2.6.13 simply has different random garbage on the stack.

So it's not your problem...

Rob

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

#1 lore raw
Quoted 11 lines · Rob Landley

When attempting to stat a nonexistent file, 2.6.11 returned a consistent value in st_mode (BFFFF73C, every time), and 2.6.13 is returning random crap that varies from invocation to invocation. Hence the intermittent failure.

We _should_ be checking the error return value from lstat64() before looking at S_ISDIR(), and I'll fix it. Almost certainly, the value in there is random garbage off the stack, and 2.6.13 simply has different random garbage on the stack.

So it's not your problem...

Just to be sure: UML _does_ return an error code from lstat64, right? If not, complain again please.

Signature · 19 lines
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

		
___________________________________ 
Yahoo! Messenger: chiamate gratuite in tutto il mondo 
http://it.messenger.yahoo.com



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
#2 lore raw
Quoted 11 lines · Blaisorblade
Quoted 10 lines · Rob Landley

When attempting to stat a nonexistent file, 2.6.11 returned a consistent value in st_mode (BFFFF73C, every time), and 2.6.13 is returning random crap that varies from invocation to invocation. Hence the intermittent failure.

We _should_ be checking the error return value from lstat64() before looking at S_ISDIR(), and I'll fix it. Almost certainly, the value in there is random garbage off the stack, and 2.6.13 simply has different random garbage on the stack.

Quoted 4 lines
Quoted 1 line

So it's not your problem...

Just to be sure: UML _does_ return an error code from lstat64, right? If not, complain again please.

Yeah, it does. UML is ok. The check was missing in busybox (I checked in a fix to -devel last night, I'll clean it up in 1.0.2 when I release that later this week).

The fixed version lasted over 1000 iterations of my testcase, whereas the previous version usually barfed somewhere in the first couple dozen. Looks good.

Rob

P.S. Apparently, busybox's not checking the return value bug was in there for 22 months (introduced in revision 8006, Nov 27, 2003, long before the 1.0 release) without ever causing a problem. Go figure. And even now it only manifests under uclibc (not glibc), and even _then_ it's highly intermittent.

And you wonder why I'm working on an automated regression test suite in my Copious Free Time (tm)?

-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel