How do you debug the bug that only appears when the load is huge?

前端 未结 2 1363
情话喂你
情话喂你 2021-02-07 13:17

We are currently developing a cluster manager software in C. If several nodes connect to the manager, it works perfect, but if we use some tools to simulate 1000 nodes to connec

2条回答
  •  忘了有多久
    2021-02-07 13:52

    Sadly the debugger is less useful for debugging concurrency/load issues.

    Keep adding logs/printfs, trigger the issue with load testing, then try to narrow it down with more logs/printfs. Repeat.

    The faster it is to trigger the bug the faster this will converge. Also prefer the classic "bisection" / "binary search" technique when adding logs - try to narrow down the areas you're looking at by at least half every time.

提交回复
热议问题