News for hackers. Stuff that matters.
Re:63 Cores Blocked by Seven Instructions by jeffdavis on Monday October 21, 2019 @06:06PM (#21317997)
It looks like this is a case where a process is holding lock A while waiting on lock B; and every other process is waiting on lock A. That's normal enough, though it seems like there are two mistakes:

First: Never spin waiting on a lock for 3 seconds. If you expect a lock to be released very quickly, you spin K times and then, if you still don't have the lock, try something heavier that can deschedule your process. K should be small enough that your time slice is unlikely to expire while spinning, otherwise, it just causes confusion and wasted work because it looks like your process is doing work when it's not.

Second: It seems dubious that using a feature like system restore causes all Write calls to wait for a lock held by a process in the middle of I/O. I'm sure there are some cases where that must happen (like if out of buffer space to hold the writes), but I would think it would be harder to hit.

EDIT: Rephrased my comment in terms of two problems rather than just the first one.

Re:63 Cores Blocked by Seven Instructions by caf on Monday October 21, 2019 @07:38PM (#21318794)
Look again - that tight loop in RtlFindNextForwardRunClear isn't spinning on a lock - it's scanning forward through memory, 4 bytes at a time, looking for 4 bytes not equal to the pattern in %ebp.

So it looks more like "process is holding lock A while doing a very long scan through memory". That would fit with the name of the function, too.

Re:63 Cores Blocked by Seven Instructions by brucedawson on Monday October 21, 2019 @11:32PM (#21320162)
Correct. Nobody was spinning on a lock. Everybody was waiting politely.

The problem was that the system process held the lock for too long, due to some inefficiency in system restore (root cause not yet understood by me).

Re:63 Cores Blocked by Seven Instructions by brucedawson on Monday October 21, 2019 @11:33PM (#21320167)
> Second: It seems dubious that using a feature like system > restore causes all Write calls to wait for a lock

I agree that it seems dubious, but it is indisputably what was happening, repeatedly.