mastercoin-MSC / mastercore

mastercore info
mastercoin.org
MIT License
24 stars 11 forks source link

Report of crash on startup for 0.0.9.2 #309

Closed zathras-crypto closed 8 years ago

zathras-crypto commented 8 years ago
msc@localhost:~/mastercore/src$ ./mastercored --start-clean -daemon
Omni Core server starting
msc@localhost:~/mastercore/src$ mastercore_init(), line 2463, file: mastercore.cpp
CMPTradeList(): OK, line 384, file: mastercore.h
CMPSTOList(): OK, line 341, file: mastercore.h
CMPTxList(): OK, line 441, file: mastercore.h
[Snapshot] Exodus balance: 
[Initialized] Exodus balance: 

************************
EXCEPTION: St9bad_alloc       
std::bad_alloc       
bitcoin in AppInit()       

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
zathras-crypto commented 8 years ago

Have requested tail of debug.log & mastercore.log

dexX7 commented 8 years ago
[Snapshot] Exodus balance: 
[Initialized] Exodus balance: 

How can this be empty?

zathras-crypto commented 8 years ago

How can this be empty?

Unsure, even a zero or incorrect value should be printed.

@achamely the startup param to ensure a clean state is --startclean (not --start-clean). I know you'd said you've already advised an rm -rf MP_* which should do the same thing, I just thought I'd mention the incorrect param for future ref :)

achamely commented 8 years ago

@zathras-crypto doh, thanks for the correction. log files from integrator follow:

achamely commented 8 years ago

tail -100 ~/.bitcoin/mastercore.log e_dex.h 2015-07-21 17:28:06 CMPOffer(5000000000): 8a45e044f22960850a1d78794b3b958ac6317e322cb14a583d5c649aa0244ab2 , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(175181497): 5c928006113fe5619acb6ffdf34bb9e555d18b5cc814fd7110ce6958d0840fbc , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(5000000000): 4d291456066d90138fde73ec06dff7490c232ca6eabd88136f41c2b594c8e451 , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(5000000000): 9cabf0245d78f39ff17c0d30a25d43c27cdc5fceb235bbf2b6d36a9c23ff46eb , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(5000000000): 008adb6edb436bd91414cadabf88ca4b78584eaeeb154c47daa1ea6763c5a896 , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(10010000): c5dbe956d4f27f7d8adb6b2977ad07987756debe91413da5b6e6d59eac3bc1cb , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(20059226190): 2bcf888a9e4aa45a07b7bfb6e048b0d4555ba05833401bcf27e22648e328b044 , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(1000000): 8c4c9667911c4f0173562c6548f50e2712cccc317ee317b58a4432b1ffcd4621 , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(5000000000): feeec55e57fb1e602684ebefdd630e96f4759b01b1d1850545a876810f093f8b , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(3359857941): 6a99305e39fb2874498a5503de7d191ff447472b19cad0be0e1ee3a8d0a57cb4 , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 CMPOffer(5000000000): e6129af0b32a22c96a5db25a1c34a7a8ffb7004ee9dd7774e96368937c0b9e36 , line 48, file: mastercore_dex.h 2015-07-21 17:28:06 msc_file_load(/home/msc/.bitcoin/MP_persist/offers-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat), loaded lines= 151, res= 0 2015-07-21 17:28:06 msc_file_load(/home/msc/.bitcoin/MP_persist/accepts-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat), loaded lines= 0, res= 0 2015-07-21 17:28:06 msc_file_load(/home/msc/.bitcoin/MP_persist/globals-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat), loaded lines= 1, res= 0 2015-07-21 17:28:06 msc_file_load(/home/msc/.bitcoin/MP_persist/crowdsales-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat), loaded lines= 13, res= 0 2015-07-21 17:28:06 DEBUG ALERT No alerts found to load

achamely commented 8 years ago

tail -100 ~/.bitcoin/debug.log 2015-07-21 14:26:09 Bound to [::]:8333 2015-07-21 14:26:09 Bound to 0.0.0.0:8333 2015-07-21 14:26:09 init message: Loading block index... 2015-07-21 14:26:09 Opening LevelDB in /home/msc/.bitcoin/blocks/index 2015-07-21 14:26:09 Opened LevelDB successfully 2015-07-21 14:26:09 Opening LevelDB in /home/msc/.bitcoin/chainstate 2015-07-21 14:26:09 Opened LevelDB successfully 2015-07-21 14:26:12 LoadBlockIndexDB(): last block file = 294 2015-07-21 14:26:12 LoadBlockIndexDB(): last block file info: CBlockFileInfo(blocks=112, size=67862612, heights=364070...364179, time=2015-07-06...2015-07-06) 2015-07-21 14:26:12 LoadBlockIndexDB(): transaction index enabled 2015-07-21 14:26:12 LoadBlockIndexDB(): hashBestChain=00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4 height=364178 date=2015-07-06 22:55:44 progress=0.981078 2015-07-21 14:26:12 init message: Verifying blocks... 2015-07-21 14:26:12 Verifying last 288 blocks at level 3 2015-07-21 14:27:25 No coin database inconsistencies in last 112 blocks (133455 transactions) 2015-07-21 14:27:25 block index 76815ms 2015-07-21 14:27:25 init message: Performing out of order block detection... 2015-07-21 14:27:25 init message: Parsing Omni Layer transactions... 2015-07-21 14:27:26 msc_file_load(): file: /home/msc/.bitcoin/MP_persist/balances-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat , loaded lines= 7196, res= 0 2015-07-21 14:27:26 msc_file_load(): file: /home/msc/.bitcoin/MP_persist/offers-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat , loaded lines= 151, res= 0 2015-07-21 14:27:26 msc_file_load(): file: /home/msc/.bitcoin/MP_persist/accepts-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat , loaded lines= 0, res= 0 2015-07-21 14:27:26 msc_file_load(): file: /home/msc/.bitcoin/MP_persist/globals-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat , loaded lines= 1, res= 0 2015-07-21 14:27:26 msc_file_load(): file: /home/msc/.bitcoin/MP_persist/crowdsales-00000000000000000d3508c73ddbdc354ac48ef082f7ca729828dd64866e33f4.dat , loaded lines= 13, res= 0 2015-07-21 14:27:26 init message: Loading wallet... 2015-07-21 14:27:26 nFileVersion = 90300 2015-07-21 14:27:26 Keys: 0 plaintext, 537 encrypted, 537 w/ metadata, 537 total 2015-07-21 14:27:26 wallet 35ms 2015-07-21 14:27:28


EXCEPTION: St9bad_alloc
std::bad_alloc
bitcoin in AppInit()

2015-07-21 14:27:28 Shutdown : In progress... 2015-07-21 14:27:28 StopNode() 2015-07-21 17:27:00

dexX7 commented 8 years ago
  1. Is this reproducable?
  2. Since when does this issue appear?
  3. Could it be that the system was out of memory? If so, -dbcache can be used to lower the footprint (at the cost of UTXO access time).
achamely commented 8 years ago
  1. It was reproducible in users environment, everytime he started
  2. started yesterday
  3. Actually partially. Its a 4GB ram system but the ram was shared with other processes. That in combination that i incorrectly had him using --start-clean. user properly cleaned out the MP_* folders, added some additionally swap and is restarting now. Appears to be starting properly. he will let me know if it fails again.
dexX7 commented 8 years ago

Interesting, at least when switching from 0.0.9.1 to 0.0.9.2, then the DB should be compatible. Would be great, but probably nearly impossible, if we could reproduce it in a dev environment, so we could try to catch potential exceptions, or detect OOM situations early.

The logs show it was caused directly after the initialization of the client, so if the current progress is past that point, i.e. Omni Core is responsive via RPC etc., then it's a good sign.

If it turns out to be a memory issue: -dbcache=4 is the minimum IIRC.

zathras-crypto commented 8 years ago

Interesting, at least when switching from 0.0.9.1 to 0.0.9.2, then the DB should be compatible.

Yep, though I've seen crashes (and force kills) corrupt persistence before - it might only take one startup on a memory starved system that fails and crashes out to make a mess of persistence, subsequently requiring a --startclean - ideally we'll harden this up with some extra testing on aborted/improperly init'd startups and see if we make it reproducible under fixed circumstances (which would allow us to tighten up detection of failures).

Appears to be starting properly. he will let me know if it fails again.

Great to hear :)

Thanks guys :)

achamely commented 8 years ago

User reports all is working now. Extra ram and actually using the proper --startclean / rm -rf MP_* worked