question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MemoryError: std::bad_alloc using the chia-create-plots command on Debian 10

See original GitHub issue

Hello

I am running Chia on a Debian 10 Virtual Private Server with following features :

  • CPU : Atom N2800
  • Cores/Threads : 2c/4t
  • CPU Frequency : 1,86GHz
  • RAM : 4Go DDR3 1066 MHz
  • Disk space : 2Tb

I issued the following command : nohup chia-create-plots -k 30 -n 5 & and then connected back later, but the 5 requested plots had not been created.

Below I have copied the content of the nohup.out file : cat nohup.out.k30.

Thank you in advance for your help!

Creating 5 plots, from index 0 to 4, of size 30, sk_seed [...] ppk <PublicKey 185d6c19e16bacca4073a2944942091fb88a91a52b0bca7fdaaa9a7fb86fa8661314c9c4ece19117d4849ad08dc08160>

Starting plotting progress into temporary dirs: . and .
Memo: 
ID: [...]
Plot size is: 30
Buffer size is: 2147483648

Starting phase 1/4: Forward Propagation into "./plot-k30-2020-07-07-21-14-[...].dat.tmp" ... Tue Jul  7 21:14:58 2020
Wrote: 146
Computing table 1
F1 complete, Time =  1780.83 seconds. CPU (92.22%) Tue Jul  7 21:44:39 2020
Computing table 2 at position 0x24000009b
        Sorting table 1
        Sort time: 2427.8 seconds. CPU (66.28%) Tue Jul  7 22:25:07 2020
        Total matches: 1073730847. Per bucket: 954.364
        Computation pass time: 5221.1 seconds. CPU (90.08%) Tue Jul  7 23:52:08 2020
Forward propagation table time: 7649.49 seconds. CPU (82.52%) Tue Jul  7 23:52:08 2020
Computing table 3 at position 0x6bffcfcdb
        Sorting table 2
        Sort time: 4270.64 seconds. CPU (64.77%) Wed Jul  8 01:03:19 2020
        Total matches: 1073771850. Per bucket: 954.401
        Computation pass time: 5567.78 seconds. CPU (86.78%) Wed Jul  8 02:36:07 2020
Forward propagation table time: 9839.02 seconds. CPU (77.22%) Wed Jul  8 02:36:07 2020
Computing table 4 at position 0xd0008712e
        Sorting table 3
Traceback (most recent call last):
  File "/home/debian/chia-blockchain/venv/bin/chia-create-plots", line 33, in <module>
    sys.exit(load_entry_point('chia-blockchain', 'console_scripts', 'chia-create-plots')())
  File "/home/debian/chia-blockchain/src/cmds/create_plots.py", line 158, in main
    args.buffer,
MemoryError: std::bad_alloc```

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
hoffmang9commented, Jul 30, 2020

You should use Beta 1.9 (which is compatible with plots and keys from Beta 1.8 only) and also try -b 512 as well.

0reactions
thomashubercommented, Aug 11, 2020

Hello wjblanke, hello hoffmang9

just wanted to confirm / get back to you: issuing the command nohup chia plots create -k 28 -n 10 -b 512 & gave back the expected results. So it seems that indeed the -k 29 size is too big for this machine.

Is there a way (maybe more detailled debug log for example or another technique / tool) by which I can gain knowledge of which feature / characteristic of the machine I should improve to be able to create -k 29 -n 10 plots? If I remember well there is a recommendation to keep the number of plots less than 200, so the bigger they are, the better 😃?

I am also looking forward for how to monitor the performance of the farming process on the machine, in the command-line-only environment (for example: knowing the global network size, knowing the average time I need to farm 1 block with my current plots, and show my wallet to be able to check that I actually earned the number of blocks I can expect for a given amount of time). But maybe there is already existing documentation for this topic?

Thank you for your help, have a nice week!

Read more comments on GitHub >

github_iconTop Results From Across the Web

MemoryError: std::bad_alloc encountered on fresh install on ...
I get MemoryError: std::bad_alloc on a fresh install on the pytorch vm image on google cloud. Steps to reproduce: Start instance export ...
Read more >
How to deal with bad_alloc in C++? - Stack Overflow
The usual notion is that if new operator cannot allocate dynamic memory of the requested size, then it should throw an exception of...
Read more >
My server is running out of memory, despite having all swap free
It is my understanding that a program will only crash with the following error: terminate called after throwing an instance of 'std::bad_alloc' ...
Read more >
std::bad_alloc - cppreference.com
Constructs a new bad_alloc object with an implementation-defined null-terminated byte string which is accessible through what(). 1) Default ...
Read more >
bad_alloc is not out-of-memory! - open-std.org
In this paper we show that there are conditions in the program reported through std::bad_alloc that do not represent out-of-memory.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found