Reading a stack trace you did not write

write-upsystems · 28 points · 17 comments

The trick nobody teaches: read it bottom-up until you find the first frame in code you own, then read that frame's arguments, then stop.

Everything above your frame is the library doing what it was told. Everything below is the runtime. The bug is almost always in what you handed across.

Do you want a version of this? Make your own

17 comments

  • 2026-10-14

    A trace, not a profiler. The profiler said the function was fast, which it was.

    Do you want a version of this? Make your own
  • 2026-10-14

    This matches what the errata says, which almost nobody reads.

    Do you want a version of this? Make your own
  • 2026-10-14

    Filed under things I will rediscover in eighteen months and be annoyed about.

    Do you want a version of this? Make your own
  • 2026-10-14

    The naming point generalises. Half our bugs are a name answering a different question than its value.

    Do you want a version of this? Make your own
  • 2026-10-14

    Is there a version of this that works when the window is not fixed?

    Do you want a version of this? Make your own
  • 2026-10-14

    Yes, but it costs a second index and I would not do it under a million rows.

    Do you want a version of this? Make your own
  • 2026-10-14

    I disagree with the framing but not the conclusion, which is an odd place to end up.

    Do you want a version of this? Make your own
    2 more
  • 2026-10-14

    This is the one I was looking for last week. Thank you.

    Do you want a version of this? Make your own
  • 2026-10-14

    Worth adding that this only holds if the clock is monotonic. Ours was not, and the failure looked exactly like a slow disk.

    Do you want a version of this? Make your own
  • 2026-10-14

    I have hit this and solved it the other way, and I now think your way is better.

    Do you want a version of this? Make your own
  • 2026-10-14

    Do you have a link for the second claim? I want to read the original.

    Do you want a version of this? Make your own
  • 2026-10-14

    Two years ago I would have argued. Having since maintained one of these, I would not.

    Do you want a version of this? Make your own
  • 2026-10-14

    The part people skip is the last paragraph, which is the whole argument.

    Do you want a version of this? Make your own
  • 2026-10-14

    Counterexample: on a read-heavy workload we measured the opposite. Happy to write it up if useful.

    Do you want a version of this? Make your own
    1 more
Do you want a version of this? Make your own
built with unnamed