Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Linux Crashes  (Read 1125 times)

0 Members and 1 Guest are viewing this topic.

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Linux Crashes
« on: December 19, 2013, 10:29:58 AM »

Update: these seem to be mostly resolved. The option mentioned below doesn't seem to be useful.

I've updated the source with a new option. You can now run with the
-useevp=0

This will switch off the EVP library, which may be the source of a memory leak.

The EVP library is what allows the AES-NI instructions, so performance will be slower. You won't want to use this if you're mining, but for a node or a block explorer, this should cut out the memory-leak crashes.

Let me know how it works out.
« Last Edit: December 22, 2013, 10:21:00 AM by FreeTrade »
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline pinwc4

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #1 on: December 19, 2013, 05:12:51 PM »
I do not know about others but this did not help me.  The memory leak was much slower, however it was still present when using the -useevp=0 option.

My hash/min went down to about 1/6th what it was before and the speed of the leak slowed down about an equal amount.  This was on Ubuntu 13.10.  So at least for this dist it appears as though EVP is not the source of the leak. 

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #2 on: December 19, 2013, 05:17:48 PM »
Okay, thanks for testing that out. So the leak might be in the underlying openssl, or elsewhere.
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline pinwc4

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #3 on: December 19, 2013, 07:49:45 PM »
In digging a little further into this I have found I can stop the memory leak, though I do not know if what I did prevents true mining as I have not discovered a block since my testing of the change. 

In momentum.cpp around line 200 where the line "return results;" is I added 2 lines prior.

Code: [Select]
delete aesThreads;
delete sha512Threads;

I now have no memory leak, but wonder if I am still hashing properly.  I would think these lines are not necessary as boost should clean up but doing the above keeps my memory usage stable.  I am showing a good hash/min and CPU usage is high so it is doing something.

Since it looks like the code assumes the threads have completed by that point I think this is a safe operation.  However I am not a programmer so I am really just guessing.
« Last Edit: December 19, 2013, 08:05:40 PM by pinwc4 »

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #4 on: December 19, 2013, 08:12:20 PM »
Thanks for this. I can confirm adding those lines certainly won't do any harm.

If this clears up the memory leak, I'd like to put a big tip your way by way of thanks - please post your MC address.
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline pinwc4

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #5 on: December 19, 2013, 08:41:56 PM »
So far my tests look good.  After a few minutes of running it stabilized around 5752M of VIRT memory usage and after 45+ minutes of running it is still at 5752M.  Whereas before this would have crashed by 25 minutes and I was seeing over 1GB memory increases each minute. 

In fact occasionally I see the memory usage go down for a bit and then go back up to 5752M of memory, so really encouraging. 

Hopefully someone else can confirm that this helps them as well if they were encountering the memory leak.  I had been occasionally running into the corrupt database as well, not sure if this will help with that problem too.

But at least I can run for longer than 25 minutes at a time so I am happier.

Tips are always appreciated
DDNyYhXRSmGCedPHFSaPqZvCZJAyeGUWTw

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #6 on: December 19, 2013, 10:49:14 PM »
People are reporting that this is helping -

https://bitsharestalk.org/index.php?topic=1449.msg16251#msg16251

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

Offline pinwc4

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #7 on: December 19, 2013, 11:25:42 PM »
Awesome, it has definitely helped me tremendously.  I have not compiled your latest source that has other changes, I am still just running my modified copy.

But with those 2 simple changes I have been running for over 3 hours at this point with no memory increase beyond what happens in the first few minutes.  I pushed this out to my other machines and they are happy as well. 

Now I just wish it would find another block so I am confident it is working but that is a rare thing to encounter in such a short time. 

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #8 on: December 20, 2013, 01:00:47 PM »

But at least I can run for longer than 25 minutes at a time so I am happier.

Tips are always appreciated
DDNyYhXRSmGCedPHFSaPqZvCZJAyeGUWTw

Glad to hear it. Have you a MC address?
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline pinwc4

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #9 on: December 20, 2013, 02:55:05 PM »
That was embarrassing, my correct address would be MMTkW4RDPqY63D6B9rLXWBQe8KdXKAZf8P

Also it is still running strong, no data corruption and no crashing.  Before I had a cron job to restart every 15 minutes, now it has ran no problem for over 18 hours.

I also found a block with it so I know it is working.
« Last Edit: December 20, 2013, 03:07:31 PM by pinwc4 »

Offline FreeTrade

  • Moderator
  • Hero Member
  • *****
  • Posts: 700
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #10 on: December 20, 2013, 05:30:34 PM »
That was embarrassing, my correct address would be MMTkW4RDPqY63D6B9rLXWBQe8KdXKAZf8P

Also it is still running strong, no data corruption and no crashing.  Before I had a cron job to restart every 15 minutes, now it has ran no problem for over 18 hours.

I also found a block with it so I know it is working.

Thanks so much! 200 MMC on its way to you.
“People should be more sophisticated? How are you gonna get that done?” - Jerry Seinfeld reply to Bill Maher

Offline pinwc4

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Linux Crashes - new option -useevp=0
« Reply #11 on: December 20, 2013, 06:14:29 PM »
Received and appreciated.

Thanks

 

Google+