Author Topic: Client keeps crashing  (Read 16356 times)

0 Members and 1 Guest are viewing this topic.

Offline JeffreyLee

  • Jr. Member
  • **
  • Posts: 40
    • View Profile
Re: Client keeps crashing
« Reply #26 on: November 12, 2013, 01:20:58 am »
I had modified net.cpp ,It run good,not crashed any longer an hour.
-#ifdef WIN32
+#if 1
         int nBytes = send(pnode->hSocket, &data[pnode->nSendOffset], data.size() - pnode->nSendOffset, MSG_NOSIGNAL | MSG_DONTWAIT);
 #else
         int nBytes = send(pnode->hSocket, &data[pnode->nSendOffset], data.size() - pnode->nSendOffset, MSG_DONTWAIT);
BitShares-PTS:Pop8mPCmtzSLc1NXaJLSnE2gpvDvCZJgMd
Please give me a vote:wallet_approve_delegate sunshine.clerk 1

Offline dzhan

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Client keeps crashing
« Reply #25 on: November 11, 2013, 11:05:12 pm »
can you implement it into the existing code?

Offline bytemaster

Re: Client keeps crashing
« Reply #24 on: November 11, 2013, 08:51:05 pm »
GREAT WORK! 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline victor

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: Client keeps crashing
« Reply #23 on: November 11, 2013, 08:49:44 pm »
Running a few tests to see if I can replicate the issue.  I've got a watchdog wrapper for my protoshare client, so if it crashes I'll capture the debug.log file for analysis.

I'll let you know if I spot anything.

We are aware of this issue and have a 1 BTC bounty for any patches that can help resolve it quickly.

My quick patch below should fix this issue. Please test it.

http://pastebin.com/FQv3snaP

The cause of this problem is that the old client disconnects the new client due to the wrong proof of work; however there is a race condition that sometimes the new client still wants to communicate with the old client, but since the old client has closed this connection, a "broken pipe" signal will be passed to the new client and it is terminated.

Interestingly, on Windows platform a flag MSG_NOSIGNAL is passed to send() to avoid this problem. This should also apply to Linux since MSG_NOSIGNAL is supported after kernel 2.2+

Code: [Select]
--- ProtoShares/src/net.cpp     2013-11-11 11:46:13.019922787 -0800
+++ ProtoShares-new/src/net.cpp 2013-11-11 12:34:22.155890315 -0800
@@ -710,7 +710,7 @@
     while (it != pnode->vSendMsg.end()) {
         const CSerializeData &data = *it;
         assert(data.size() > pnode->nSendOffset);
-#ifdef WIN32
+#if 1
         int nBytes = send(pnode->hSocket, &data[pnode->nSendOffset], data.size() - pnode->nSendOffset, MSG_NOSIGNAL | MSG_DONTWAIT);
 #else
         int nBytes = send(pnode->hSocket, &data[pnode->nSendOffset], data.size() - pnode->nSendOffset, MSG_DONTWAIT);

Offline bytemaster

Re: Client keeps crashing
« Reply #22 on: November 11, 2013, 06:33:06 pm »
Testing the protosharesd daemon on windows . . . not seeing any of the problems as reported for linux. Not yet anyway. Think you might be looking for something linux specific - maybe something specific to a version of the boost libs.

It seems to be when an old node connects, can we add a checkpoint at 12097?
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline FreeTrade

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Re: Client keeps crashing
« Reply #21 on: November 11, 2013, 06:32:18 pm »
Testing the protosharesd daemon on windows . . . not seeing any of the problems as reported for linux. Not yet anyway. Think you might be looking for something linux specific - maybe something specific to a version of the boost libs.


“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline bytemaster

Re: Client keeps crashing
« Reply #20 on: November 11, 2013, 06:13:36 pm »
Running a few tests to see if I can replicate the issue.  I've got a watchdog wrapper for my protoshare client, so if it crashes I'll capture the debug.log file for analysis.

I'll let you know if I spot anything.

We are aware of this issue and have a 1 BTC bounty for any patches that can help resolve it quickly. 
For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline gigawatt

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Re: Client keeps crashing
« Reply #19 on: November 11, 2013, 04:50:55 pm »
Running a few tests to see if I can replicate the issue.  I've got a watchdog wrapper for my protoshare client, so if it crashes I'll capture the debug.log file for analysis.

I'll let you know if I spot anything.
BTC: 1E2egHUcLDAmcxcqZqpL18TPLx9Xj1akcV
PTS: Pstkk1gZCxc4GEwS1eBAykYwVmcubU1P8L

Offline craggietx

  • Jr. Member
  • **
  • Posts: 32
    • View Profile
    • Final Drive Parts
Re: Client keeps crashing
« Reply #18 on: November 11, 2013, 03:25:31 pm »
ditto here.   finally just shut down my servers last night as the client would crash within 10 secs of starting.   

Sounds like you guys are about to get this fixed.   Thanks for all the hard work!

Offline JeffreyLee

  • Jr. Member
  • **
  • Posts: 40
    • View Profile
Re: Client keeps crashing
« Reply #17 on: November 11, 2013, 12:33:19 pm »
I have exactly the same problem.Ubuntu 12.04.3 desktop and Ubuntu 12.04.3 Server
BitShares-PTS:Pop8mPCmtzSLc1NXaJLSnE2gpvDvCZJgMd
Please give me a vote:wallet_approve_delegate sunshine.clerk 1

Offline ryen123

  • Full Member
  • ***
  • Posts: 62
    • View Profile
Re: Client keeps crashing
« Reply #16 on: November 11, 2013, 11:47:08 am »
Same here. I ran it at DigitalOcean and it keeps stopping after 15/20 minutes.
Latest by GawMiners | DigitalOcean Sign-Up Receive $10 Credit
Singapore P2Pool: DarkCoin

Offline Vizierx

  • Full Member
  • ***
  • Posts: 52
    • View Profile
Re: Client keeps crashing
« Reply #15 on: November 11, 2013, 09:52:31 am »
So I think we have two colliding networks - some bug is causing the command line version to be affected, but not the QT client.

As a stop-gap measure we could compile a list of misbehaving IPs and block them at a higher level.

I think we should make the new client more robust instead. Some users have not upgraded to the latest client, and when a new client is communicating with the old ones is just crashes. It is hard to block all these IPs; and what if they upgrade to the latest client?
right you are - or do something like what to stop crush

Offline FreeTrade

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Re: Client keeps crashing
« Reply #14 on: November 11, 2013, 09:50:47 am »
Are you guys seeing this in your log files much?

ERROR: AcceptBlock() : incorrect proof of work
ERROR: ProcessBlock() : AcceptBlock FAILED
Misbehaving: 60.247.75.39:3888 (0 -> 100) DISCONNECTING
disconnecting node 60.247.75.39:3888

I've got about 10 of these since the fork - it might be that these are not being handled correctly
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline victor

  • Jr. Member
  • **
  • Posts: 34
    • View Profile
Re: Client keeps crashing
« Reply #13 on: November 11, 2013, 09:48:04 am »
So I think we have two colliding networks - some bug is causing the command line version to be affected, but not the QT client.

As a stop-gap measure we could compile a list of misbehaving IPs and block them at a higher level.

I think we should make the new client more robust instead. Some users have not upgraded to the latest client, and when a new client is communicating with the old ones is just crashes. It is hard to block all these IPs; and what if they upgrade to the latest client?

Offline FreeTrade

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Re: Client keeps crashing
« Reply #12 on: November 11, 2013, 09:40:33 am »
So I think we have two colliding networks - some bug is causing the command line version to be affected, but not the QT client.

As a stop-gap measure we could compile a list of misbehaving IPs and block them at a higher level.
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher