5 ms·
What might be the root cause?
by gberger 10y ago
What might be the root cause?
- Coneylake 10y agohehe, probably has something to do with root.
- pkaye 10y agoWithout the source code, it is hard to say.
- Benjamin_Dobell 10y agoSource code, pfft. Is this not hacker news? ;)
- pbhjpbhj 10y agoLooking at the binary expression of Win8.1 I've found the problem; one just needs to switch some 0 and 1s, no problem!
- wmil 10y agoMy guess? Somewhere in the system there's some old tool that's passing user data as a text table. It has a header row. So the dev decided to throw out the row if it contained "user". After filtering, the program can't find the user name. So it calls the function again. This probably happened when they moved an old unix app to Windows.
- deleted 10y ago[deleted]
- astazangasta 10y agoThis is a cool theory, but why would it call the function again? Shouldn't it just give up? It's not like it would get a different result next time.
- mjevans 10y agoLet's assume that it has a set number of attempts each with some delay. Let's also assume that whatever this is has multiple instances for some reason; maybe it's something called as part of an update process for system accounting information. If every process on the machine did this every time it got re-scheduled? Yeah, I can see that.
- kazinator 10y agoCalling the function again when the user doesn't exist could in fact be nonsensical and wrong. It could be due to failing to break out of some loop or whatever, not necessary an explicit "we don't have the user; let's branch backwards" logic. Perhaps that looping was not discovered simply because that case doesn't arise: the user always exists. Except, oops, when it appears not to exist due to being pruned because of the "user" substring; then the incorrect backwards branch problem is exposed.
- TeMPOraL 10y agoCalling the function again may be entirely logical and may be because of independent state, e.g. locks or security. Think of the famous problem we had for decades with file deletion hanging for 10 seconds or so if you tried to delete a file in use. Somebody traced and disassembled the code; it was literally a hardcoded loop that did 10 iterations of attempting to get a lock on the file followed by sleeping one second if failed... The loop-and-sleep combo there might have been a hack, but it was excusable.
- thriqon 10y agoYou could image code like this: for (pos = 0; !found; pos++) { row = get_next_row(); if (strstr(row, "user") { // this is obviously a header row continue } if (strstr(row, user_name)) { found = 1; } }
- wingerlang 10y agofor (pos = 0; !found; pos++) This is so cool, I have never thought about this in like a decade of programming. I mean using a bool variable within a for loop.
- im3w1l 10y agoYeah it sounds like some kind of "injection".
- zamalek 10y agoAlternatively, Windows has a fair amount of kludges - put there to fix poorly coded software. This could be an example case and, not knowing what has become dependant on the behaviour, it can't be removed.
- deleted 10y ago[deleted]
- jacobush 10y agoOddly specific "guess". Is there something you want to tell us? :)
- ygra 10y agoI kinda doubt it. This applies to Windows 8.1 and no earlier or later version. So the problem was introduced in Windows 8.1. Furthermore, Windows never really had utilities passing data as text doing maintenance stuff in the core operating system. That's not how Windows works. There are APIs for everything, not command-line tools. And they sure as hell didn't "move an old Unix app to Windows" in 2013. As other have said, maybe Raymond Chen will some day do a blog post on this, although, considering that the bug is in DFPCommon.dll, i.e. the "Disk Footprint Utility Library", I doubt it really belongs to the shell and thus he won't know more than we do.