Skip to content

回复:Bitcoind ​

首次公开证据

打开首次公开证据
查看 1 个交叉存档
来源说明

Published on GitHub in February 2024 as part of Martti Malmi's testimony in the COPA v. Wright trial

这样范围就缩小了很多。debug.log 中没有打印任何 IRC 活动, 所以我猜它应该没能执行到 RecvUntil 之后。 粗略看了一遍,我没发现什么明显的问题。我想问题只能 出在 ConnectSocket 或 RecvUntil 中。

试着换上附件中的 irc.cpp 和 net.cpp,然后把 debug.log 发给我。

或者你也可以在 gdb 中运行它,并逐步执行 ThreadIRCSeed gdb --args bitcoin [switches] b ThreadIRCSeed run step 或者用 u 跳过例程并从例程中退出。

无论是否执行 getinfo,我都会遇到这个错误。把 ThreadIRCSeed 注释掉 后问题就解决了。

如果你没有执行 getinfo,它还会这样吗?

你可以把下面列出的 CreateThreads 注释掉,然后逐个重新启用, 直到问题再次出现。这样我们就能知道问题出在哪个 线程中。

net.cpp,在 // Start threads 下方 CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL)

init.cpp: CreateThread(ThreadRPCServer, NULL);

发给你了。我忘了提到崩溃时的错误消息:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

你能把 debug.log 发给我吗?

我试着用 ddd 调试器调试自己构建的 bitcoind,但还没有 取得多大进展。它最后总是会耗尽系统的全部 内存,然后崩溃。你能否再把最新的 64 位 bitcoind 构建版本发给我,好让我看看问题是否 出在我的构建版本上?

英文原文 ​

展开英文原文

That narrows it down a lot. It didn't print any IRC activity in debug.log, so I guess it couldn't have gotten past the RecvUntil. Eyeballing it I don't see anything obvious. I guess it would have to be either in ConnectSocket or RecvUntil.

Try it with the attached irc.cpp and net.cpp and send me the debug.log.

Or you could run it in gdb and step through ThreadIRCSeed gdb --args bitcoin [switches] b ThreadIRCSeed run step or u to step over and up out of routines.

I get the error regardless of the getinfo. Commenting out ThreadIRCSeed fixed the problem.

Does it still do it if you didn't do getinfo?

You could comment out the CreateThreads listed below, then re-enable them one at a time until it does it again. Then we would know which thread the problem is in.

net.cpp, under // Start threads CreateThread(ThreadIRCSeed, NULL) CreateThread(ThreadSocketHandler, NULL, true) CreateThread(ThreadOpenConnections, NULL) CreateThread(ThreadMessageHandler, NULL)

init.cpp: CreateThread(ThreadRPCServer, NULL);

Here goes. I forgot to mention the crash error message:

terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc

Could you send me the debug.log?

I tried debugging my build of bitcoind with ddd debugger, but didn't have much success yet. It always ends up taking all the system's memory and finally crashes. Could you please send me again the latest 64 bit build of bitcoind, so I can see if the problem is about my build?

为历史保存,为中文读者整理。每篇档案均附来源与英文原文。