Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProcessMessage(ping, 0 bytes) FAILED in debug.log #137

Open
wtogami opened this issue Nov 4, 2013 · 4 comments
Open

ProcessMessage(ping, 0 bytes) FAILED in debug.log #137

wtogami opened this issue Nov 4, 2013 · 4 comments

Comments

@wtogami
Copy link
Contributor

wtogami commented Nov 4, 2013

b4c62b4
This p2pool commit causes the following error message in litecoin-0.8.5.1's debug.log while mining on the p2pool node. Is this happening on other protocols too?

getheaders 452868 to a41ca0bc058c3f283640a778075382c943e85893508b804f6d55d3b0f58b0057 ProcessMessages(ping, 0 bytes) : Exception 'CDataStream::read() : end of data' caught, normally caused by a message being shorter than its stated length ProcessMessage(ping, 0 bytes) FAILED

How to Confirm Bug
Adding this commit to any point between 13.0 and HEAD causes this error message during mining. Removing it from HEAD causes the error message to stop.

Thoughts
src/version.h:

static const int PROTOCOL_VERSION = 70001;

// earlier versions not supported as of Feb 2012, and are disconnected
static const int MIN_PROTO_VERSION = 209;

src/main.cpp:
if (pfrom->nVersion < MIN_PROTO_VERSION)

Bitcoin starts at versoin 209 then negotiates up to 70001. If you change MIN_PROTO_VERSION to 70001 weird things happen and peer messages fail. p2pool might be confusing the daemon and this error message may be the only visible manifestation of this?

If you can't think of a proper fix within p2pool, I'm willing to add a hack to Litecoin to whitelist version 32200, although I'd prefer to avoid the need for that.

@Rav3nPL
Copy link
Contributor

Rav3nPL commented Nov 4, 2013

I saw this ping error in another daemons b4 we do this commit. It is
conformed that P2pool is doing this odd ping message error?
4 lis 2013 04:16 "Warren Togami" notifications@github.com napisa³(a):

b4c62b4b4c62b4
This commit causes the following error message in litecoin-0.8.5.1's
debug.log while mining on the p2pool node. Is this happening on other
protocols too?

getheaders 452868 to
a41ca0bc058c3f283640a778075382c943e85893508b804f6d55d3b0f58b0057
ProcessMessages(ping, 0 bytes) : Exception 'CDataStream::read() : end of
data' caught, normally caused by a message being shorter than its stated
length
ProcessMessage(ping, 0 bytes) FAILED

How to Confirm Bug
Adding this commit to any point between 13.0 and HEAD causes this error
message during mining. Removing it from HEAD causes the error message to
stop.

Thoughts
src/version.h:

static const int PROTOCOL_VERSION = 70001;

// earlier versions not supported as of Feb 2012, and are disconnected
static const int MIN_PROTO_VERSION = 209;

src/main.cpp:
if (pfrom->nVersion < MIN_PROTO_VERSION)

Bitcoin starts at versoin 209 then negotiates up to 70001. If you change
MIN_PROTO_VERSION to 70001 weird things happen and peer messages fail.
p2pool might be confusing the daemon and this error message may be the only
visible manifestation of this?

If you can't think of a proper fix within p2pool, I'm willing to add a
hack to Litecoin to whitelist version 32200, although I'd prefer to avoid
the need for that.

Reply to this email directly or view it on GitHubhttps://github.com//issues/137
.

@Rav3nPL
Copy link
Contributor

Rav3nPL commented Nov 4, 2013

Ok, it IS P2pool. Just check daemon log that was running ~12hrs - no "ping" messages error. Run P2pool- it start spamming log every ~10 seconds.
Looks like it need to be send any data (one byte?) to not produce that error.
It is in p2pool/bitcoin/p2p.py but I have no clue how to put some data to send :)
There?

    message_ping = pack.ComposedType([])
    def handle_ping(self):
        pass

@forrestv
Copy link
Member

forrestv commented Nov 4, 2013

I pushed a fix a little while ago. It's not very well tested yet, though.

@Rav3nPL
Copy link
Contributor

Rav3nPL commented Nov 4, 2013

Looks good, it is running fine on all nodes I have atm: BTC,TLC,TRC,ZET,XJO,UN, WDC. BTE, ASC,DBL
No errors in daemons log nor p2pool log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants