Fix issue #183 (CPU 100% usage) #277

Merged
ghost merged 1 commits from cpu100percentfix into master 2013-07-01 19:05:39 +02:00
ghost commented 2013-07-01 07:55:28 +02:00 (Migrated from github.com)

As per http://docs.python.org/2/howto/sockets.html#using-a-socket it's
possible that a socket recv() call returns 0 bytes if the remote closes
the connection. In that case, recv() does not obey settimeout(): it
just doesn't block and returns zero bytes immediately, which in this
case results in an infinite loop if the transmission was incomplete.

As per http://docs.python.org/2/howto/sockets.html#using-a-socket it's possible that a socket recv() call returns 0 bytes if the remote closes the connection. In that case, recv() does not obey settimeout(): it just doesn't block and returns zero bytes immediately, which in this case results in an infinite loop if the transmission was incomplete.
linkerlin commented 2013-07-01 09:29:32 +02:00 (Migrated from github.com)

Good job!

Good job!
RexMorgan commented 2013-07-01 09:52:34 +02:00 (Migrated from github.com)

👍 bravo

:+1: bravo
DivineOmega commented 2013-07-01 10:27:25 +02:00 (Migrated from github.com)

Again, well done on pin pointing the exact issue! Hopefully this is the only potential infinite loop in existence.

Again, well done on pin pointing the exact issue! Hopefully this is the only potential infinite loop in existence.
ghost commented 2013-07-01 15:40:15 +02:00 (Migrated from github.com)

This does seem to be working. If BM is still well behaved by the end of the day then I think we can call this issue fixed.

This does seem to be working. If BM is still well behaved by the end of the day then I think we can call this issue fixed.
RexMorgan commented 2013-07-01 17:36:48 +02:00 (Migrated from github.com)

I've been running BM with this patch for about 9 hours, now. It looks like the issue is resolved. Although I'm happy waiting until the end of the day, just to be sure.

I've been running BM with this patch for about 9 hours, now. It looks like the issue is resolved. Although I'm happy waiting until the end of the day, just to be sure.
Atheros1 commented 2013-07-01 19:05:29 +02:00 (Migrated from github.com)

Congratulations! You located the cause.

Congratulations! You located the cause.
rubo77 commented 2013-07-16 19:44:38 +02:00 (Migrated from github.com)

can I get a deb-package with that fix already somewhere?

can I get a deb-package with that fix already somewhere?
ghost commented 2013-07-16 19:52:14 +02:00 (Migrated from github.com)
http://download.opensuse.org/repositories/home:/motters:/pybitmessage/
This repo is archived. You cannot comment on pull requests.
No description provided.