Author

Topic: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please? (Read 518 times)

member
Activity: 60
Merit: 20
Software test and validation is a key branch in software engineering. A lot of big defence projects fail in end due to runtime errors and lost huge $. You need skills in software test, and a well-designed test plan, and a testing environment to run the test and debug.
legendary
Activity: 4466
Merit: 1798
Linux since 1997 RedHat 4
...
You know ckpool source code better than anyone . Have you seen my errors before? Can you tell me why i get no errors on testnet but then issues on mainnet. Please. If anyone can help it is you. I have tried everything. Changing hardware 96 GB ram and 24 cores. Nothing seems to fix this
He kicked me out of the ckpool git years ago - sorry my version is not the same.
His git doesn't even work with ckdb - he broke that back then just after he kicked me out.
I've only ever run it on intel 64 bit hardware. No idea what you are using.

However, sounds like you need to learn how to debug code to find whatever the problem is.
This is why I've publicly said from the start when we started developing ckpool/kdb that it's not point and click, you need to be a good developer (as well as many other things) to run a pool.
copper member
Activity: 99
Merit: 4
Quick question ... if I run a BTC node in prune mode, will I still be able to mine off it? or does pruning disrupt the mining process! I'm looking into setting up my own ckpool node (for the fun of it)
Yes, but performance would be shit.
Alas the comment by ck is wrong.
It's his usual "I think this is so, so I will claim it is true" god complex.
Usually, as a programmer with experience in developing software, it's advisable to test things first, before making claims.

You know ckpool source code better than anyone . Have you seen my errors before? Can you tell me why i get no errors on testnet but then issues on mainnet. Please. If anyone can help it is you. I have tried everything. Changing hardware 96 GB ram and 24 cores. Nothing seems to fix this
legendary
Activity: 4466
Merit: 1798
Linux since 1997 RedHat 4
Quick question ... if I run a BTC node in prune mode, will I still be able to mine off it? or does pruning disrupt the mining process! I'm looking into setting up my own ckpool node (for the fun of it)
Yes, but performance would be shit.
Alas the comment by ck is wrong.
It's his usual "I think this is so, so I will claim it is true" god complex.
Usually, as a programmer with experience in developing software, it's advisable to test things first, before making claims.
legendary
Activity: 3220
Merit: 1220
Quick question ... if I run a BTC node in prune mode, will I still be able to mine off it? or does pruning disrupt the mining process! I'm looking into setting up my own ckpool node (for the fun of it)
Yes, but performance would be shit.
copper member
Activity: 99
Merit: 4
Code:
[2022-06-30 22:12:23.062] ckpool generator starting
[2022-06-30 22:12:23.062] ckpool stratifier starting
[2022-06-30 22:12:23.063] ckpool connector starting
malloc(): invalid size (unsorted)
Aborted

more error logs
copper member
Activity: 99
Merit: 4
Is your core wallet synched?

Yes very much so. Tried running every possible bitcoin.conf to reduce ram usage

Code:
server=1
daemon=1
blocksonly=1
prune=550
dbcache=10
maxconnections=3
maxmempool=10
rpcthreads=2
par=1
rpcuser=user
rpcpassword=pass
rpcallowip=127.0.0.1

tried these in sequence. trial and error over the past 3 weeks. The Bitcoin testnet works perfect with my build of ckpool. ONLY when in mainnet does it crash and throw error

Are you sure that you are fully synced? I noticed one thing under your bitcoin.conf config look at the prune above.

As you can see it is set to 550 which means your bitcoin core is not yet fully synced you only downloaded/synced 550MB of blocks. Mainnet full node requires 450GB because the current size of the blockchain is around 400GB.

This is I think the reason why you get those allocation errors. To disable prune mode you can set it to 0.



Thank you very very very much for your reply. I will test it out. got some debugging logs here . See anything? The node is fully synced and prune just means it is fully sunced but holds on to only the latest 550MB of data from the chain. The prune thing is not the issue here seems to be. failure seems to be at the ckpool connector starting. Prune just holds on  the required last 288 blocks on disk. All my flawless testnet blocks solved i was running in prune mode.

Code:
tarting program: /usr/local/bin/ckpool
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff7c4e700 (LWP 2120)]
[New Thread 0x7ffff744d700 (LWP 2121)]
[New Thread 0x7ffff6c4c700 (LWP 2122)]
[New Thread 0x7ffff644b700 (LWP 2123)]
[2022-06-30 17:14:06.584] ckpool generator starting
[New Thread 0x7ffff5c4a700 (LWP 2124)]
[New Thread 0x7ffff5449700 (LWP 2125)]
[New Thread 0x7ffff4c48700 (LWP 2126)]
[2022-06-30 17:14:06.585] ckpool stratifier starting
[New Thread 0x7fffdffff700 (LWP 2127)]
[New Thread 0x7fffdf7fe700 (LWP 2128)]
[2022-06-30 17:14:06.611] ckpool connector starting
malloc(): corrupted top size
[New Thread 0x7fffdeffd700 (LWP 2129)]
[New Thread 0x7fffde7fc700 (LWP 2130)]

Thread 5 "ckp@generator" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff644b700 (LWP 2123)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb)
legendary
Activity: 3206
Merit: 2904
Block halving is coming.
Is your core wallet synched?

Yes very much so. Tried running every possible bitcoin.conf to reduce ram usage

Code:
server=1
daemon=1
blocksonly=1
prune=550
dbcache=10
maxconnections=3
maxmempool=10
rpcthreads=2
par=1
rpcuser=user
rpcpassword=pass
rpcallowip=127.0.0.1

tried these in sequence. trial and error over the past 3 weeks. The Bitcoin testnet works perfect with my build of ckpool. ONLY when in mainnet does it crash and throw error

Are you sure that you are fully synced? I noticed one thing under your bitcoin.conf config look at the prune above.

As you can see it is set to 550 which means your bitcoin core is not yet fully synced you only downloaded/synced 550MB of blocks. Mainnet full node requires 450GB because the current size of the blockchain is around 400GB.

This is I think the reason why you get those allocation errors. To disable prune mode you can set it to 0.

copper member
Activity: 99
Merit: 4
Purchased a testing Server to work through some of the issue. This server has 24 cores 96GB ram . Still having these errors . Any help. I am very generous to people that help. If coin is what you seek then so be it. Please help .

Errors after running sudo ckpool -k -L


Code:
malloc(): corrupted top size


All the errors have something to do with memory . Something from bitcoin testnet to mainnet changes that throws these errors.  Huh I can run and mine bitcointenet no problem but switching to mainnet and nothing but problems.
copper member
Activity: 99
Merit: 4
Thank you for the reply . no cannot find the cause for nothing . must be a way to limit usage in CKpool source.  

I assume you don't have any previous experience with programming, you can't just jump into this without knowing the basics at least, you need to learn how to use a proper compiler and debugger, that way you get to know that exact line that caused the issue, you can't just execute the program and keep guessing, even if you get lucky with fixing this issue you will face more issues.

I can compile just fine and learn fast.I have already compiled ckpool and ran it fine with a bitcoin node testnet. I have solved 50+ bitcoin testnet blocks. I have modified ckpool to do many things other than the stock source code functions. I know a good deal about coding but my knowledge is spotty . Somethings i do not understand. Just need to tackle the issues as they happen. Community Driven is more than one person working on a singular goal. I just need a little help getting started. Just need a little help now and again from a helpful and caring  community. That is why we are here right? To be a community. A community helps one another.
legendary
Activity: 2170
Merit: 6279
be constructive or S.T.F.U
Thank you for the reply . no cannot find the cause for nothing . must be a way to limit usage in CKpool source. 

I assume you don't have any previous experience with programming, you can't just jump into this without knowing the basics at least, you need to learn how to use a proper compiler and debugger, that way you get to know that exact line that caused the issue, you can't just execute the program and keep guessing, even if you get lucky with fixing this issue you will face more issues.
copper member
Activity: 99
Merit: 4
Yes . I am aware i should upgrade server to better specs. More cores more ram. My budget wont allow that right now. Tell then i have 2 VPS with not the best specs but i can run the bitcoin full node on one and ckpool on the other. My goal is to figure out how to work with the limited resources now. Then later upgrade the VPS as i save more money to be used to upgrade the VPS's. Strange thing is. I am able to run Bitcoin core testnet and Ckpool on 1 vps and works fine. What about moving to mainnet has cause this error to happen? Very excited to learn and gain better understanding . Thank you in advance for your time in helping me gain more knowledge .
copper member
Activity: 99
Merit: 4
Code:
realloc(): invalid next size
Aborted

Could not identify which line throws that error in a debug mode or something? I am not familiar with Ckpool source code but this error seems to be related to dynamic memory allocation, look for a declaration of a char called buffer/buf which is used in something like realloc(), and try to increase the size of that char and see if it makes any difference.







Quote
and try to increase the size of that char and see if it makes any difference.

So many char. What is the char to increase. Thank you so much for your help.
copper member
Activity: 99
Merit: 4
My vps is 4 core and 4gb ram. Should not be having this issue right?

Are you running both BTC and the pool and all the other services on 1 box? if so 4GB is probably not enough.
It should work but performance is going to suffer. 8GB at a minimum IMO?
How much space do you have configured for swap?

-Dave



thanks for your reply. Decided to just make the main thread for the project solo-bitcoin.com
 
Wanted to release it after all the kinks got worked out but might be fun to do it all together.  Community driven
legendary
Activity: 3458
Merit: 6231
Crypto Swap Exchange
My vps is 4 core and 4gb ram. Should not be having this issue right?

Are you running both BTC and the pool and all the other services on 1 box? if so 4GB is probably not enough.
It should work but performance is going to suffer. 8GB at a minimum IMO?
How much space do you have configured for swap?

-Dave

copper member
Activity: 99
Merit: 4
Code:
realloc(): invalid next size
Aborted

Could not identify which line throws that error in a debug mode or something? I am not familiar with Ckpool source code but this error seems to be related to dynamic memory allocation, look for a declaration of a char called buffer/buf which is used in something like realloc(), and try to increase the size of that char and see if it makes any difference.

Thank you for the reply . no cannot find the cause for nothing . must be a way to limit usage in CKpool source. 
legendary
Activity: 2170
Merit: 6279
be constructive or S.T.F.U
Code:
realloc(): invalid next size
Aborted

Could not identify which line throws that error in a debug mode or something? I am not familiar with Ckpool source code but this error seems to be related to dynamic memory allocation, look for a declaration of a char called buffer/buf which is used in something like realloc(), and try to increase the size of that char and see if it makes any difference.
copper member
Activity: 99
Merit: 4
Is your core wallet synched?

Yes very much so. Tried running every possible bitcoin.conf to reduce ram usage

Code:
server=1
daemon=1
blocksonly=1
prune=550
dbcache=10
maxconnections=3
maxmempool=10
rpcthreads=2
par=1
rpcuser=user
rpcpassword=pass
rpcallowip=127.0.0.1

tried these in sequence. trial and error over the past 3 weeks. The Bitcoin testnet works perfect with my build of ckpool. ONLY when in mainnet does it crash and throw error

Code:
realloc(): invalid next size

So frustrating . Been working on this for a month  Cry
legendary
Activity: 3220
Merit: 1220
Is your core wallet synched?
copper member
Activity: 99
Merit: 4
I don't know where did you get that source but what actually do you want to achieve here?
Are you planning to host your own pool? Or mine solo?

If you are planning to mine solo why not use https://solo.ckpool.org/

Or if you are looking for an open-source pool that you can host on your own check this one https://github.com/xavatar/yiimp_install_scrypt

I have a couple reasons for getting this working. Mostly to learn . Thank you for the link but would like to stay with CKpool source code as the foundation. It is really this best in my opinion. Many fast testnet blocks solved.


legendary
Activity: 3206
Merit: 2904
Block halving is coming.
I don't know where did you get that source but what actually do you want to achieve here?
Are you planning to host your own pool? Or mine solo?

If you are planning to mine solo why not use https://solo.ckpool.org/

Or if you are looking for an open-source pool that you can host on your own check this one https://github.com/xavatar/yiimp_install_scrypt
copper member
Activity: 99
Merit: 4
I have managed to get it to work with testnet and solved many testnet blocks. When trying to run it with bitcoin mainnet and starting ckpool https://bitbucket.org/ckolivas/ckpool/src/master/ and get

Code:
realloc(): invalid next size
Aborted


I have tried everything . Messed with bitcoin.conf to the max to make it less consuming . My vps is 4 core and 4gb ram. Should not be having this issue right?
Jump to: