TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Recovering Redis Data with GDB

22 点作者 webhat大约 10 年前

1 comment

unwind大约 10 年前
Since you can call target process functions from GDB, it would be interesting to have some form of &quot;emergency dump&quot; function you could call, to get out the data even though the process as a whole has hung.<p>This would have the benefit by being implemented in the target process itself, so it could of course have full knowledge of the data structures and so on. It could potentially be way better than a raw (manual) memory-level inspection.<p>That would of course be quite hard to implement in a general (and large) server-type process, but it might be useful even if less than perfect.<p>I&#x2F;O might become a problem, so perhaps just format the data in RAM, then let the debugger read it out. The RAM itself might be pre-allocated to ensure that it exists at the point of failure (when heap allocations likely won&#x27;t work very well).<p>Has anyone done this?<p><i>EDIT</i>: On second thought, I guess it becomes unwieldy for real-world use cases due to the volume of data. I wouldn&#x27;t want to pre-allocate multiple GBs of RAM to use an export buffer for some database server, of course. Paging ... Hm.
评论 #9588666 未加载
评论 #9587972 未加载