Bitcoin Forum

Bitcoin => Mining software (miners) => Topic started by: KitKatZ on June 10, 2022, 06:24:17 PM



Title: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please?
Post by: KitKatZ on June 10, 2022, 06:24:17 PM
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/ (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?


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: BitMaxz on June 10, 2022, 10:51:51 PM
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


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: KitKatZ on June 11, 2022, 02:23:39 PM
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.




Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: Biffa on June 12, 2022, 12:02:17 PM
Is your core wallet synched?


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: KitKatZ on June 12, 2022, 01:28:09 PM
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  :'(


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: mikeywith on June 13, 2022, 12:17:53 AM
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.


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: KitKatZ on June 13, 2022, 02:36:48 AM
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. 


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: DaveF on June 13, 2022, 02:54:18 AM
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



Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: KitKatZ on June 13, 2022, 04:44:00 PM
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 (https://bitcointalk.org/index.php?topic=5402449.msg60351089#msg60351089)
 
Wanted to release it after all the kinks got worked out but might be fun to do it all together.  Community driven


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: KitKatZ on June 17, 2022, 05:07:43 PM
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.

https://i.imgur.com/KCswTpo.jpg

https://i.imgur.com/KCswTpo.jpg

https://i.imgur.com/sROMFzR.jpg

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.


Title: Re: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please?
Post by: KitKatZ on June 17, 2022, 05:15:02 PM
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 .


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: mikeywith on June 18, 2022, 12:53:53 AM
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.


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: KitKatZ on June 18, 2022, 04:23:49 PM
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.


Title: Re: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please?
Post by: KitKatZ on June 30, 2022, 08:16:26 PM
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.  ??? I can run and mine bitcointenet no problem but switching to mainnet and nothing but problems.


Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: BitMaxz on June 30, 2022, 10:09:00 PM
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.



Title: Re: Trying to run my own CKPOOL solo pool with with no luck on mainnet
Post by: KitKatZ on June 30, 2022, 10:19:09 PM
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)


Title: Re: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please?
Post by: KitKatZ on July 01, 2022, 03:13:56 AM
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


Title: Re: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please?
Post by: Biffa on July 11, 2022, 09:02:02 AM
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.


Title: Re: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please?
Post by: kano on July 12, 2022, 05:10:16 AM
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.


Title: Re: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please?
Post by: KitKatZ on July 18, 2022, 06:55:42 PM
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


Title: Re: CKPOOL solo pool gives ERROR on mainnet.realloc():invalid next size.Help please?
Post by: kano on July 22, 2022, 08:40:51 AM
...
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.