Bitcoin Forum
December 10, 2016, 06:47:47 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: « 1 [2] 3 »  All
  Print  
Author Topic: [solved/paid][1btc reward] PHP RPC commands freezing bitcoin  (Read 3664 times)
drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
July 30, 2012, 12:52:07 PM
 #21

Did you try it with the "sendtoaddress" line of code commented out? Trying to work out if it's the RPC calls generally or creating the transactions that causes the problem...

with that part commented out (i use sendmany, but same thing) it doesn't do anything but check the balance over and over and i haven't left it long enough to freeze, however it does freeze on checking balance half of the time when running normally, not just creating a transaction, and it does seem to "build up" (but calm down for a couple of minutes if a block comes in)

Is there a limit to the number of unconfirmed transactions? perhaps the amount of unconfirmed sent and received transactions are causing this?

I've only had one last overnight (1800 transactions, the first one) all the others after that (new wallets and blockchains) freeze between 30 and 200 transactions

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
1481395667
Hero Member
*
Offline Offline

Posts: 1481395667

View Profile Personal Message (Offline)

Ignore
1481395667
Reply with quote  #2

1481395667
Report to moderator
1481395667
Hero Member
*
Offline Offline

Posts: 1481395667

View Profile Personal Message (Offline)

Ignore
1481395667
Reply with quote  #2

1481395667
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481395667
Hero Member
*
Offline Offline

Posts: 1481395667

View Profile Personal Message (Offline)

Ignore
1481395667
Reply with quote  #2

1481395667
Report to moderator
drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
August 01, 2012, 03:47:16 AM
 #22

okay so i want to use sendmany to be able to control where the return tx get sent to, but it freezes fast using sendmany

changing back to sendtoaddress it lasts about 8 hours (1200 transactions this last time) but pays out a lot in fee's then freezes leaving me with all the losses all over the place
http://blockchain.info/tx-index/14167011/3c4ce78154144dcc3b420ec1f86bbf0944ea171dac8e6b35261e6485e51ff14c
to organise, and often when organising the client throws "Failed to create transaction" which i suspect is related to the bot failing

at least it died while it was ahead this time.

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
ErebusBat
Hero Member
*****
Offline Offline

Activity: 560

I am the one who knocks


View Profile
August 08, 2012, 05:27:13 PM
 #23

Did you get this solveD?

░▒▓█ Coinroll.it - 1% House Edge Dice Game █▓▒░ • Coinroll Thread • *FREE* 100 BTC Raffle

Signup for CEX.io BitFury exchange and get GHS Instantly!  Don't wait for shipping, mine NOW!
drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
August 08, 2012, 05:37:37 PM
 #24

Yes, the the satoshi dice thread https://bitcointalk.org/index.php?topic=77870.msg1086135#msg1086135

Dooglus suggested a change in the clients source and after all else failed i built that (took me hours to make bitcoin build in windows) and it seems the problem is solved, if it ignores the single satoshi's it doesn't freeze (well hasn't in the last 24 hours at least)

Just waiting on his bitcoin address

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
August 08, 2012, 06:16:42 PM
 #25

Yes, the the satoshi dice thread https://bitcointalk.org/index.php?topic=77870.msg1086135#msg1086135

Dooglus suggested a change in the clients source and after all else failed i built that (took me hours to make bitcoin build in windows) and it seems the problem is solved, if it ignores the single satoshi's it doesn't freeze (well hasn't in the last 24 hours at least)

Just waiting on his bitcoin address

I PM'ed drakahn my address after reading the other thread, then caught up on this thread.  I guess I may as well post the contents of the PM here:

Hi.

I'm glad my little change worked for you.

My address is: 1Up2upZ1xo4tBoq86GLYywwRmshzJc7tA

I hadn't seen your thread offering the bounty, but would have been interested to look into the problem.

Do you have a wallet which still causes the hangups and crashes but which is empty enough to share with me?  I'd like to be able to reproduce the problem without having to make thousands of SatoshiDice bets to get there...  Smiley

scribe
Sr. Member
****
Offline Offline

Activity: 295



View Profile WWW
August 08, 2012, 06:25:34 PM
 #26

Great to see you got a solve/workaround, would never have found that :-)

blocknois.es Bitcoin music label. ~ New release: This Is Art

Read: Bitcoin Life | Wear: FUTUREECONOMY
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
August 08, 2012, 06:34:50 PM
 #27

Just waiting on his bitcoin address

1 BTC received.  Thanks.

drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
August 08, 2012, 07:09:42 PM
 #28

Great to see you got a solve/workaround, would never have found that :-)
Even if i had of had the idea, i would never have found where in the source to change, i don't know the language and a lot of it is plain greek to me, hell making it build in windows was a mix of other people's stories and deleting everything under macos, linux or !windows in the .pro file

The source looks easy enough to follow, like php, but... there is a lot of it, and i have a feeling to know one part of it i would need to know most of it...

What i know of php i know from changing other people work, the same will probably hold true for bitcoin, next on my list is to make a client that lists the single satoshi's as a separate balance, and has a button/text box that will make a transaction with N single satoshi's - but i'm not stressing too much on it, just looking through source every now and then following variables to see what they do

Eventually computer programming will be done by thought, and there will be no need to "know how" to do it.... either that or computer programming will be done by computers, and they will have no need for us... except as entertainment...

note to self : add 'boredom' to future skynet

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
August 08, 2012, 08:37:23 PM
 #29

Do you have a wallet which still causes the hangups and crashes but which is empty enough to share with me?  I'd like to be able to reproduce the problem without having to make thousands of SatoshiDice bets to get there...  Smiley

I have a copy of your wallet.  It contains:

  * 2121 addresses which have been used and are currently empty,
  * 1484 which contain a single satoshi,
  * 1 address with 8 separate single satoshis, and
  * 1 address with a single 48508 satoshi coin.

I'll see if I can get the client to hang when I ask it to select coins for a transaction.

grue
Global Moderator
Legendary
*
Offline Offline

Activity: 1932



View Profile
August 08, 2012, 09:49:54 PM
 #30

Try this;-

1. Shut everything down.

2. Disable your firewall.

3. Disable your Virus protection.

4. Go to User Account Control Settings and set it all the way to the bottom

5. Reboot (making sure that none of the above start automatically)

6. Start Bitcoind as administrator (right click on the Icon and "Run as administrator")

7. Start your process that invokes the PHP script (right click on the Icon and "Run as administrator")

8. See if it is fixed!!!

At that point, if it is not fixed restart all of the above and reboot.  If it is fixed work backwards up the list until it is broken again, then yell "Aha, that's the problem".  ;P
now that's what i call shotgun debugging!

It is pitch black. You are likely to be eaten by a grue.

Tired of annoying signature ads? Ad block for signatures
gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
August 08, 2012, 09:55:49 PM
 #31

Yes, the the satoshi dice thread https://bitcointalk.org/index.php?topic=77870.msg1086135#msg1086135

Dooglus suggested a change in the clients source and after all else failed i built that (took me hours to make bitcoin build in windows) and it seems the problem is solved, if it ignores the single satoshi's it doesn't freeze (well hasn't in the last 24 hours at least)

Just waiting on his bitcoin address

the issue isn't bitcoind, it is windows, should have used linux Smiley

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
August 08, 2012, 09:58:01 PM
 #32

Yes, the the satoshi dice thread https://bitcointalk.org/index.php?topic=77870.msg1086135#msg1086135

Dooglus suggested a change in the clients source and after all else failed i built that (took me hours to make bitcoin build in windows) and it seems the problem is solved, if it ignores the single satoshi's it doesn't freeze (well hasn't in the last 24 hours at least)

Just waiting on his bitcoin address

the issue isn't bitcoind, it is windows, should have used linux Smiley

fyi it froze slightly quicker in ubuntu, but at least used 100% cpu instead of just one core

although building probably would have been easier in linux with gitian, after the vm taking too long i just decided to make it work in windows, and it was interesting to say the least

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
NRF
Member
**
Offline Offline

Activity: 105



View Profile
August 08, 2012, 10:06:25 PM
 #33

now that's what i call shotgun debugging!

It's Windows  Tongue .  Its the only sort of debugging I know that works with that OS.

Many a time some friend of family member asks my about a problem they are having with there windows box and the first thing I ask is "Have you switched it off and on yet?".  Works 90% of the time Tongue .

gweedo
Legendary
*
Offline Offline

Activity: 1246


Java, PHP, HTML/CSS Programmer for Hire!


View Profile WWW
August 08, 2012, 10:07:35 PM
 #34

Yes, the the satoshi dice thread https://bitcointalk.org/index.php?topic=77870.msg1086135#msg1086135

Dooglus suggested a change in the clients source and after all else failed i built that (took me hours to make bitcoin build in windows) and it seems the problem is solved, if it ignores the single satoshi's it doesn't freeze (well hasn't in the last 24 hours at least)

Just waiting on his bitcoin address

the issue isn't bitcoind, it is windows, should have used linux Smiley

fyi it froze slightly quicker in ubuntu, but at least used 100% cpu instead of just one core

still should have used linux, aka Gentoo or Centos, but if this is a big bug, is it reported? Cause I am using the latest bitcoind and I never have this problem on my VPS and I get ~1000 php rpc calls. I use hardly any CPU.

Want to earn 2500 SATOSHIS per hour? Come Chat and Chill in https://goseemybits.com/lobby
drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
August 08, 2012, 10:20:10 PM
 #35

Yes, the the satoshi dice thread https://bitcointalk.org/index.php?topic=77870.msg1086135#msg1086135

Dooglus suggested a change in the clients source and after all else failed i built that (took me hours to make bitcoin build in windows) and it seems the problem is solved, if it ignores the single satoshi's it doesn't freeze (well hasn't in the last 24 hours at least)

Just waiting on his bitcoin address

the issue isn't bitcoind, it is windows, should have used linux Smiley

fyi it froze slightly quicker in ubuntu, but at least used 100% cpu instead of just one core

still should have used linux, aka Gentoo or Centos, but if this is a big bug, is it reported? Cause I am using the latest bitcoind and I never have this problem on my VPS and I get ~1000 php rpc calls. I use hardly any CPU.
Since removing the clients ability to spend single satoshi inputs i have not had a problem, i'm not sure exactly what the problem is/was, but i think the single satoshi inputs are/were a big part of it, RPC froze the client (timeout set to 600 but it never waited that long before throwing cannot connect) and the client spat "transaction create failed" (After freezing for a few seconds to a few minutes) at me if i tried to spend "the wrong amount" of bitcoins (if it failed i tried more or less and it would eventually work)- the biggest transaction i saw was ~90kb, perhaps at a certain size the client can't do it? a better error would be "transaction too big" then... >.> but i am not sure

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
August 08, 2012, 10:58:12 PM
 #36

Okay so I'm trying to make use of the PHP martingale bot that's bouncing around, and after a while the bitcoin client freezes and jsonRPC fails to connect (the client stays frozen and won't start until the whole computer is restarted) it doesn't seem to be connected to anything specific, just after a while (30 transactions on one wallet, 1800 on another) cpu use of the client hits 25% and it freezes

bitcoind freezes then crashes

I'm in windows 7 with the latest client from bitcoin.org

Anyone know how to stop this?

edit : it seems to happen when trying to use the rpc at the same time as bitcoin is downloading a block

OK, so I'm unable to reproduce this behaviour.

When I try to create a transaction that spends most of the satoshis, it very quickly selects the right coins, but then takes about 6 seconds signing all the inputs, and then fails because the maximum transaction size is apparently 100kb:

Code:
static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;

                if (nBytes >= MAX_BLOCK_SIZE_GEN/5)
                    return false;

That puts a hard limit of something like 555 inputs on a transaction, although the coin selection code makes no attempt to keep the set of selected inputs to 555 or less.

So in summary: when you try to spend more than 555 inputs at a time it fails to create the transaction after taking a relatively long time to sign all the inputs, but I'm not yet seeing and crashes or long freezes.  Any idea what I might do to provoke the failures you were seeing?

drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
August 08, 2012, 11:06:56 PM
 #37

Okay so I'm trying to make use of the PHP martingale bot that's bouncing around, and after a while the bitcoin client freezes and jsonRPC fails to connect (the client stays frozen and won't start until the whole computer is restarted) it doesn't seem to be connected to anything specific, just after a while (30 transactions on one wallet, 1800 on another) cpu use of the client hits 25% and it freezes

bitcoind freezes then crashes

I'm in windows 7 with the latest client from bitcoin.org

Anyone know how to stop this?

edit : it seems to happen when trying to use the rpc at the same time as bitcoin is downloading a block

OK, so I'm unable to reproduce this behaviour.

When I try to create a transaction that spends most of the satoshis, it very quickly selects the right coins, but then takes about 6 seconds signing all the inputs, and then fails because the maximum transaction size is apparently 100kb:

Code:
static const unsigned int MAX_BLOCK_SIZE = 1000000;
static const unsigned int MAX_BLOCK_SIZE_GEN = MAX_BLOCK_SIZE/2;

                if (nBytes >= MAX_BLOCK_SIZE_GEN/5)
                    return false;

That puts a hard limit of something like 555 inputs on a transaction, although the coin selection code makes no attempt to keep the set of selected inputs to 555 or less.

So in summary: when you try to spend more than 555 inputs at a time it fails to create the transaction after taking a relatively long time to sign all the inputs, but I'm not yet seeing and crashes or long freezes.  Any idea what I might do to provoke the failures you were seeing?

I'm really not sure, at first i thought the new blocks coming in had something to do with it, it may have been a factor, i assume that the 100kb size limit is the problem though, 6 seconds would be some of the ones in the client, (some of them minutes) and the early 'warning sign' ones using RPC

A thing i noticed is it would get worse with every bet, i may have sent you a wallet that i stopped early so was just 'slowing down' instead of freezing and making rpc fail (i chose the smallest one first and then corrupted my blockchain yadda yadda yadda so just sent that one)

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
August 08, 2012, 11:59:25 PM
 #38

I just noticed bitcoin-qt is using 100% CPU.  It's still responsive, but it's a start...

dooglus
Legendary
*
Offline Offline

Activity: 2002



View Profile
August 09, 2012, 12:13:45 AM
 #39

I just noticed bitcoin-qt is using 100% CPU.  It's still responsive, but it's a start...

That was probably a red herring.  I was running 'bitcoin-qt -noconnect' to stop it connecting to any peers.  That seems to be what causes the 100% CPU usage, whether I use your wallet or mine.

drakahn
Hero Member
*****
Offline Offline

Activity: 504



View Profile
August 09, 2012, 12:19:50 AM
 #40

I just noticed bitcoin-qt is using 100% CPU.  It's still responsive, but it's a start...

That was probably a red herring.  I was running 'bitcoin-qt -noconnect' to stop it connecting to any peers.  That seems to be what causes the 100% CPU usage, whether I use your wallet or mine.
could broadcasting unconfirmed transactions add to it?
[~3-6 per minute ~10 minutes per block, so ~30-60 transactions some up to 90kb being broadcast]

though i'm doing the same now

14ga8dJ6NGpiwQkNTXg7KzwozasfaXNfEU
Pages: « 1 [2] 3 »  All
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!