Martti Malmi 通信

Linux——linux-0.1.6-test3

中本聪 · 2009 年 11 月 12 日

SN-10101 附来源、原文与上下文。

阅读语言

现在(04:50 GMT),我的节点正在连接你的节点,每次都得到僵尸连接。套接字没有返回错误,只是悄无声息地变成僵尸状态。如果你现在运行的是 linux 构建,就很值得看看你那边的日志写了什么。

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:

test3:

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

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.

我想自己可能在 test2 中削弱了重连速度。在 test3 中,我会让它更积极地快速重连。

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.

有了这些,应该不可能在出问题时没有立即察觉。希望它能断开所有僵尸套接字。之后能否建立一些正常连接,还是套接字系统已经彻底失灵、一直停留在 0 个连接,我就不知道了。

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.

如果这样还不行,我想我会看看 BitTorrent 等其他点对点应用的源代码,看看它们怎么处理这些问题。也许有某个神奇的标志或操作步骤,能把套接字系统重新救活。

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.

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

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

引用 New Liberty Standard 的文字New Liberty Standard来源 ↗
引用 New Liberty Standard 的文字New Liberty Standard来源 ↗

我的网络连接直接接到电脑。我的互联网服务提供商要求运行 VPN 才能连接互联网。我还有第二块网卡,把互联网连接共享给其他设备。我使用电脑时的 IP 地址就是真实 IP 地址,但通过第二块网卡连接的设备使用 NAT。通过虚拟机连接时,也使用 NAT。这些都只需要很少的配置。 Ubuntu 的 NetworkManager 提供通过第二块网卡共享互联网连接的选项,VirtualBox 也提供使用 NAT 的选项。

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.

我又丢了几批比特币,所以这个问题还没修好。现在大致知道怎么回事了,倒是稍微能忍受一些。我想,目前只要看到一批比特币开始成熟,就重启 bitcoin。我可能会在 Linux 和 Wine 之间来回切换一阵,不过肯定会测试每一个发布的新版本。目前我仍然在运行 Linux 构建。

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.

引用 New Liberty Standard 的文字New Liberty Standard来源 ↗

谢谢。日志没有停在什么特殊操作上,只是简单的消息传递。很可能与界面有关。最初的大多数错误都在界面上。

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.

你的防火墙是什么品牌/型号?BitTorrent 有可能超出某些型号能处理的连接数量。大多数设备性能不足,负载高时不太稳定。

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.

引用 New Liberty Standard 的文字New Liberty Standard来源 ↗

我一直能正常收到你的附件。我只是想替 Martti 省掉那个大附件。

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.

...

...

但在它们开始下载后,我看了看 BitTorrent 客户端,果然,我忘了一个 torrent 任务,上传量很高,达到了我设定的上限。

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.

来源

阅读字号

选择适合你的字号,之后阅读会继续使用。