POP QUIZ: What’s wrong with this code – part 3

Imagine you are a developer and your boss comes to you complaining that your piece of code has been deemed to be taking up too much memory and causing problems for the application.  You take a look at your code and you see the following, assume that stream is defined above this and is correct:…


Logic Puzzle: What comes next?

What row of numbers comes next? 1 11 21 1211 111221 312211 13112221


Logic puzzle: Russian Roulette

Here is another logic puzzle, see what you think: You are tied to your chair and can’t get up. Here’s a gun. Here’s the barrel of the gun, six chambers, all empty. Now watch me as I put two bullets in the gun. See how I put them in two adjacent chambers? I close the…


Logic Puzzle: Buying donuts puzzle

I thought it would be fun to try something new here.  So I am going to present a logic puzzle and let people try to answer it.  I will post the solution in the future but I want to give people a chance to try to solve it. So here is the first puzzle: A…


POP QUIZ: What are Free Threads in the Threadpool

So here is the next trivia question for everyone.  If you have tried to change the Threadpool settings for .NET, you have seen the minFreeThreads and minLocalRequestFreeThreads settings. What are those settings really used for?  What do they control or how do they limit things within the Threadpool? For extra credit, when would be a…


POP QUIZ: What’s wrong with this code – part 2

Here is another snippet of code for you to look at and tell me what is wrong.  As before, give your comment of what is wrong and I will post the answer and make the comments public tomorrow.  This time it is C++ code and not specific to ASP.NET: typedef bool (FUNC)(void *); class Foo…


POP QUIZ: How to Troubleshoot a Hang

For this quiz.  Let’s say that you run a web server and your customers complain that the site is running slow.  What do you do to troubleshoot it? As a follow-up, if you figure out that one page is the problem, what do you do to look into what is causing that page to be…


POP QUIZ: Why would you get this error from Windbg?

Problem 1 So here is the scenario.  You open a dump from when you were experiencing a problem and try to run an SOS command and you see: 0:024> !dumpheap -stat Cannot get the ThreadStore, do you have symbols for the mscorwks/mscorsvr files? What could be going on here?  Any suggestions on how to fix…


POP QUIZ: SOS not loading properly

So for this quiz, we are going to be looking at attempting to load sos.dll for the .NET Framework 2.0. We get a dump file, and when we try to run a command on the dump file, we get an error like: So reading this, we see that we should run .cordll -ve -u -l. …


POP QUIZ: What to do next? – part 1

So here is the situation.  I will lead you down the debugging path and get us to a certain place and then ask you guys to solve the rest of the problem.  As before, leave your suggestions as comments.  I will wait until noon tomorrow to post any of the comments and the answer. So…