Skip to content

Linux - linux-0.1.6-test3 ​

首次公开证据

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

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

现在(04:50 GMT)我的节点正在连接你的节点,并且每次都会得到僵尸连接。套接字没有返回错误,只是毫无提示地变成僵尸。如果你现在正在运行 Linux 构建版,看看你那边的日志怎么说会很有意思。

test3:

我加入了检测僵尸套接字的专门代码。它会检测套接字在连接后的 60 秒内是否没有发送或接收任何数据,也会检测是否有数据排队等待发送却 3 分钟都没有发出去。

我想我可能削弱了 test2 中的重连速度。在 test3 中,我让它更加坚决地快速重连。

我加入了检查,用来跟踪其他节点是否收到了你生成的区块。如果一个也没有收到,它会在描述中警告你: “已生成——警告:此区块未被任何其他节点收到,很可能不会被接受!”

如果你创建的区块或交易没有传播到任何其他节点,状态可能会变成“#/offline?”。

有了这一切,它一出问题就应该不可能注意不到。希望它能断开所有僵尸套接字。之后它究竟能否建立一些正常连接,还是套接字系统彻底坏掉并一直停留在 0 个连接,我不知道。

如果这不起作用,我想我会看看 BitTorrent 等其他 P2P 应用的源代码,了解它们怎样处理这类问题。也许有什么神奇的标志或步骤,能把套接字系统强行恢复过来。

文件 linux-0.1.6-test3.tar.bz2 会附在下一封消息中。

我的网络连接是直接连到电脑的。我的 ISP 要求我运行 VPN 才能连接互联网。然后我还有第二块网卡,用它与其他设备共享互联网。我使用电脑时的 IP 地址是我的实际 IP 地址,但通过第二块网卡连接的设备使用 NAT。我通过虚拟机连接时,它也使用 NAT。所有这些只需要很少的配置。Ubuntu 中的 NetworkManager 有一个选项,可以通过第二块网卡共享我的互联网连接,VirtualBox 也有使用 NAT 的选项。

我又丢了几批比特币,所以那个问题还没有解决。现在我大概知道发生了什么,稍微容易忍受一些了。我想目前只要看到一批比特币开始成熟,我就重启 bitcoin。我可能会在 Linux 和 Wine 之间来回切换一阵,但每个发布的新版本我肯定都会测试。目前我仍在运行 Linux 构建版。

谢谢。日志没有停在任何特殊的地方,只是简单的消息传递。很可能与 UI 有关。最初的 bug 大多全都是 UI 问题。

你的防火墙是什么品牌/型号?BitTorrent 有可能会让某些型号所能处理的连接数不堪重负。大多数防火墙性能不足,在负载下也不稳定。

我一直都能正常收到你的附件。我只是不想让马尔蒂收这个大附件。

我无法复现这个 bug。我不知道是粘贴操作、区块完成、两者的组合,还是完全别的什么东西导致了故障。

...

但在它们开始下载后,我看了一眼我的 BitTorrent 客户端,果然,我忘了还有一个种子在运行,而且我的上传量相当高,达到了我为它设置的上限。

英文原文 ​

展开英文原文

Right now (04:50 GMT) my node is connecting to yours and getting zombie connections each time. The socket isn't returning an error, just zombie without notice. If you're running the linux build right now, it would be interesting to see what the log says on your side.

test3:

I've added specific code to detect zombie sockets. It'll detect if the socket hasn't sent or received any data within 60 seconds of connecting, and detect if data is queued to send and hasn't sent for 3 minutes.

I think I may have weakened the reconnect speed in test2. In test3 I'm making it more determined to reconnect quickly.

I added checking to track whether other nodes received your generated blocks. If none did, it'll warn you in the description: "Generated - Warning: This block was not received by any other nodes and will probably not be accepted!"

The status can go to "#/offline?" for blocks or transactions you create if they don't get out to any other nodes.

With all this, it should be impossible not to notice as soon as it screws up. It should hopefully disconnect all the zombie sockets. After that, whether it's able to make some good connections, or sockets is completely hosed and it stays at 0 connections, I don't know.

If this doesn't work, I guess I'll look at the sourcecode of some other P2P apps like BitTorrent and see how they deal with this stuff. Maybe there's some magic flag or procedure to bash the sockets system back to life.

File linux-0.1.6-test3.tar.bz2 attached in the next message.

My network connection is direct to my computer. My ISP requires that I run VPN to connect to the Internet. I then have a second NIC that shares my Internet with other devices. My IP address while using my computer is my actual IP address, but the devices connected through my second NIC use NAT. When I connect through a virtual machine, that also uses NAT. All this requires very little configuration. NetworkManager in Ubuntu has an option to share my Internet connection through the second NIC and VirtualBox has the option to use NAT.

I lost a couple packs of bitcoins again, so that problem is not yet fixed. It's a bit more bearable now that I have an idea of what is going on. I figure for now I'll just restart bitcoin whenever I see a pack of bitcoins starting to mature. I may go back and forth a bit between Linux and Wine, but I'll definitely test every new version that comes out. At the moment I'm still running the Linux build.

Thanks. The log didn't stop on anything special, just simple message passing. Chances are it's UI related. Most of the initial bugs were all UI.

What brand/model of firewall do you have? It's possible for BitTorrent to overwhelm the number of connections some models can handle. Most are underpowered and flaky under load.

I have been getting your attachments just fine. I just thought I'd spare Martti the large attachment.

I am not able to reproduce the bug. I don't know whether the paste, the blocks finishing, a combination of the two or something else entirely caused the fault.

...

But after they started downloading, I took a look a look at my BitTorrent client, and sure enough, I had forgotten about a torrent and my upload was quite high, at the limit I had set for it.

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