Bitcoin Forum
November 09, 2024, 02:27:07 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoind hang on 'move' command (solved)  (Read 2216 times)
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 26, 2012, 06:58:30 PM
Last edit: September 29, 2012, 12:08:58 AM by dooferorg
 #1

I have a few bitcoin 'accounts' on my particular instance. I know these accounts are pretty mythical, but I wanted to clean things up a bit. I have this:

{
    "" : -5.51065462,
    "acct1" : 4.48588183,
    "acct2" : 1.02477279
}

when I issue the command

bitcoind move acct1 "" 4.48588183

it just hangs for hours. I have killed off the bitcoind (because it then stops listening to even a 'stop' command) and tried again after restarting. Same thing. Tried a remake of the wallet by repimporting dumped private keys from the previous wallet. The 'balances' there show up again, but I cannot get it to be resolved.

I moved off all coins from that wallet (total ends up as zero) but it has addresses would like to keep and use.

Any hints to resolve this?

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
zvs
Legendary
*
Offline Offline

Activity: 1680
Merit: 1000


https://web.archive.org/web/*/nogleg.com


View Profile WWW
September 26, 2012, 07:01:40 PM
 #2

I have a few bitcoin 'accounts' on my particular instance. I know these accounts are pretty mythical, but I wanted to clean things up a bit. I have this:

{
    "" : -5.51065462,
    "acct1" : 4.48588183,
    "acct2" : 1.02477279
}

when I issue the command

bitcoind move acct1 "" 4.48588183

it just hangs for hours. I have killed off the bitcoind (because it then stops listening to even a 'stop' command) and tried again after restarting. Same thing. Tried a remake of the wallet by repimporting dumped private keys from the previous wallet. The 'balances' there show up again, but I cannot get it to be resolved.

I moved off all coins from that wallet (total ends up as zero) but it has addresses would like to keep and use.

Any hints to resolve this?

does acct1 have like 10,000 satoshi dice returns?  or just normal usage?
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 26, 2012, 07:23:08 PM
 #3

The main amount that I use the 'sendtoaddress' on (my big mistake I now know  Roll Eyes ) was 1 transaction to clear most of that wallet. A subsequent other transaction was made (1 day later) to clear the remainder. Both transactions have cleared according to looking at the receiving account and 'listtransactions' to check the number of confirmations done.

So I'm confused as to why it's just sitting there. I was hoping it would just get to realizing "Yup, I have no coins, all zero'd" and be done with it.

Also, the bitcoind in question is connected to 8 peers and appears (or at least was until it hung) to be synchronized to the latest block.

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
dooferorg (OP)
Full Member
***
Offline Offline

Activity: 163
Merit: 100


View Profile
September 29, 2012, 12:05:21 AM
 #4

For the sake of completeness, I thought I'd post how I solved this.

- I extracted the private keys of the addresses I had received coins to and saved them to a text file along with the expected address

- I recompiled the 0.7 release from source. Moved it in place of the old binary (when it was all shut down)

- Moved the whole .bitcoin directory out of my home directory (I'm under Linux, doing this, by the way)

- Started bitcoin with '-daemon -rescan' options and waited for a day or more to let it sync up.

- During that time I imported the private keys into the new 'fresh' wallet. The 'listaccounts' operation showed the accounts with the incorrect balances. All of them still adding up to zero though.

- Once synced, I issued the move commands and within just a few seconds I received the 'true' statement.

So, just clearing and resetting things seemed to do the trick. I never did get any more information about what happened, even with the -debug option enabled. Marking this as 'solved'.

BTC: 1dooferoD3vnwgez3Jo1E4bFfgMf81LR2
ZEC: t1gnToN2HZW4GD52kofEVdijhRijWjCNfYi
arsenische
Legendary
*
Offline Offline

Activity: 1199
Merit: 1012


View Profile
November 05, 2012, 07:53:08 PM
 #5

I have a similar problem.

When I call bitcoind move, bitcoind becomes unresponsive to bitcoind getinfo and other RPC calls (but bitcoind help works).

My wallet file is about 60 mb, it contains 30k+ addresses (not sure if it matters) and few accounts. Logs look like that:
Code:
11/05/12 19:13:34 ThreadRPCServer method=move                                                                                                  
11/05/12 19:13:34 connection timeout                                                                                                           
11/05/12 19:13:34 trying connection 89.132.10.252:8333 lastseen=6.6hrs                                                                         
11/05/12 19:13:34 connect() failed after select(): Connection refused                                                                         
...
11/05/12 19:15:06 send version message: version 60002, blocks=206627, us=78.46.69.81:8333, them=98.229.49.176:8333, peer=98.229.49.176:8333   
11/05/12 19:16:13 Flushed 12274 addresses to peers.dat  160ms                                                                                 
11/05/12 19:17:54 Flushed 12274 addresses to peers.dat  171ms                                                                                 
11/05/12 19:18:49 accepted connection 152.2.31.91:36492                                                                                       
11/05/12 19:18:59 socket closed                                                                                                               
11/05/12 19:18:59 disconnecting node 152.2.31.91:36492                                                                                         
11/05/12 19:19:34 Flushed 12274 addresses to peers.dat  163ms                                                                                 
11/05/12 19:19:38 ThreadRPCServer method=getinfo                                                                                               
11/05/12 19:21:14 Flushed 12274 addresses to peers.dat  155ms                                                                                 
...
Rescan takes 4277485ms, but it doesn't help.

I looked into sources, "move" operation looks trivial: it debits amount from one account and credits to another (didn't dig too deep into it though). What could go wrong there? Should it take more time than just few ms to execute?

2112
Legendary
*
Offline Offline

Activity: 2128
Merit: 1073



View Profile
November 05, 2012, 08:12:36 PM
 #6

What could go wrong there? Should it take more time than just few ms to execute?
Probably a dedlock. If you can build the bitcoind yourself you can quickly debug it further with db_stat. Just build the BerkelyDB utilities with exactly the same settings as the BerkeleyDB library.

Then create DB_CONFIG file containing single line "set_lg_dir database".

After that you should be able to monitor the live BerkeleyDB environment using db_stat and db_deadlock.

Well, at least this is how it worked with previous versions of bitcoind. I haven't tested this with the most recent ones.

Please comment, critique, criticize or ridicule BIP 2112: https://bitcointalk.org/index.php?topic=54382.0
Long-term mining prognosis: https://bitcointalk.org/index.php?topic=91101.0
osoverflow
Full Member
***
Offline Offline

Activity: 547
Merit: 105


Bitcoin ya no es el futuro, es el presente


View Profile WWW
November 07, 2012, 07:06:33 PM
 #7

same problem with 0.7.1 version. Rolling back to 0.7.0 to see if there is that problem there.

Bienvenidos a la nueva tecnología
osoverflow
Full Member
***
Offline Offline

Activity: 547
Merit: 105


Bitcoin ya no es el futuro, es el presente


View Profile WWW
November 07, 2012, 07:48:00 PM
 #8

the 0.7.0 version does not have the problem. I'm staying with that version until a more stable version arrives.

Bienvenidos a la nueva tecnología
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1026



View Profile
November 07, 2012, 08:38:36 PM
 #9

Heh.  I had the exact same problem with 0.7.0 and it hasn't happened to me since I moved up to 0.7.1.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
osoverflow
Full Member
***
Offline Offline

Activity: 547
Merit: 105


Bitcoin ya no es el futuro, es el presente


View Profile WWW
November 07, 2012, 10:08:39 PM
 #10

wow! that weird! why I had the problem with 0.7.1 and not with 0.7.0, and you the inverse! hahahaahahah.

Bienvenidos a la nueva tecnología
lightbox
Full Member
***
Offline Offline

Activity: 212
Merit: 100


View Profile WWW
November 13, 2012, 10:21:58 PM
 #11

I'm having the exact same problem here on 0.7.1

>bitcoind move fromaccount toaccount 2

just hangs the RPC, and blocks all other RPC commands

i dont know if the "connection timeout" right after the "method=move" in the logs is from the move, or just from all the other stuff its doing (probably the later)

debug.log shows:
ThreadRPCServer method=move
connection timeout

but my only way to recover from this is
1) "bitcoind stop"
2) wait for the debug log to be pretty much done, just waiting on the ThreadRPCServer
3) kill -9 <pid of bitcoind>
4) bitcoind -daemon

Nothing fishy going on at all, its a pretty empty wallet, just put some stuff in it to test a web-app im working on.... this makes the web-app completely die as well, as it doesnt even throw an exception in PHP, it just sits there waiting forever, until the php script times out.

Any suggestions?!


https://www.canadianbitcoins.com for quick & easy buy/sell with $CAD
Canada's Oldest Bitcoin Brokerage.  Serving Canadian Bitcoiners since 2011!
arsenische
Legendary
*
Offline Offline

Activity: 1199
Merit: 1012


View Profile
November 13, 2012, 11:06:46 PM
 #12

Any suggestions?!

There was a suggestion to debug a possible deadlock:

What could go wrong there? Should it take more time than just few ms to execute?
Probably a dedlock. If you can build the bitcoind yourself you can quickly debug it further with db_stat. Just build the BerkelyDB utilities with exactly the same settings as the BerkeleyDB library.

Then create DB_CONFIG file containing single line "set_lg_dir database".

After that you should be able to monitor the live BerkeleyDB environment using db_stat and db_deadlock.

Well, at least this is how it worked with previous versions of bitcoind. I haven't tested this with the most recent ones.


Not sure if I find time to set up the environment and learn BrerkleyDB tools. Maybe someone else could do it Smiley

Maybe the topic should be renamed as it is [not solved]

lightbox
Full Member
***
Offline Offline

Activity: 212
Merit: 100


View Profile WWW
November 13, 2012, 11:31:10 PM
 #13

okay just working with sipa on IRC, and tried a patch which has now solved the problem for my specific case.

The fix is here:

https://github.com/sipa/bitcoin/commits/fixmove

hopefully that'll get into the next released version

Thanks sipa!!

https://www.canadianbitcoins.com for quick & easy buy/sell with $CAD
Canada's Oldest Bitcoin Brokerage.  Serving Canadian Bitcoiners since 2011!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!