Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search thread does not exist. Can't get derived key for #128

Closed
ghost opened this issue Jan 24, 2019 · 7 comments
Closed

Search thread does not exist. Can't get derived key for #128

ghost opened this issue Jan 24, 2019 · 7 comments

Comments

@ghost
Copy link

ghost commented Jan 24, 2019

Hello,

I started to get this error messages constantly

image

Also when I try to get unspent outputs, I get this error . Sometimes it returns unspent outputs, but most of the time I get this 'Search thread does not exist' error

sergey@DESKTOP-BGBIKND:/mnt/c/Users/ankar$ curl  -w "\n" -X POST http://monero.node.com/get_unspent_outs -d '{"address": "address", "view_key": "view_key", "amount":"0","mixin":4,"use_dust":false,"dust_threshold":"1000000000"}'
{"reason":"Search thread does not exist.","status":"error"}

Ubuntu 17.04

Thank you

@moneroexamples
Copy link
Owner

Search threads are created for an account when you login. When they encounter an exception, like in this case, they terminate. To restart them have to login again.

The exception happens as it can't decode outputs in the tx you are currently decoding. Does this happen only for this single tx? Or different txs? Also is it testnet network?

Have you checked devel branch of openmonero: https://github.com/moneroexamples/openmonero/tree/devel It is most up to date.

@ghost
Copy link
Author

ghost commented Jan 25, 2019

It's mainnet. I will try the most recent version.

After login I am able to get unspent outputs. It resolved my problem, thank you!

@ghost ghost closed this as completed Jan 25, 2019
@ghost
Copy link
Author

ghost commented Jan 26, 2019

The "Search thread does not exist" problem was resolved. But I didn't managed to figure out, what causes the "Cant get derived key for a tx. It will be cleared"...

When I invoke login or other request method I always get this error message displayed in openmonero logs
Also I can't see any transaction history records starting from 1757690 block approximately
And balance is displayed incorrectly. Seems like openmonero stopped monitoring this particular user
And I get the same error message for other users as well
Also I noticed, if transaction is unconfirmed, it is displayed, but once it gets one or more confirmations, it dissapears.

-01-26 20:19:44,033 INFO  [openmonero]
Transaction 236e623561772bdd921379aa48d6addf0c92a404a484f35ebbcd59184746410f already present in mysql, so remove it
2019-01-26 20:19:44,038 INFO  [openmonero] Found some possible inputs in block 1755636, tx: 236e623561772bdd921379aa48d6addf0c92a404a484f35ebbcd59184746410f
2019-01-26 20:19:44,817 INFO  [openmonero] Analyzing 200 blocks from 1367667 to 1367866 out of 1757687 blocks
2019-01-26 20:19:46,387 INFO  [openmonero] Analyzing 200 blocks from 1378307 to 1378506 out of 1757687 blocks
2019-01-26 20:19:47,944 INFO  [openmonero]
Transaction 3702cae6a5571fb8af61b2bca1aff0d262ce9bd5db44ef45d8d099748b90fa61 already present in mysql, so remove it
2019-01-26 20:19:47,945 INFO  [openmonero] Found some possible inputs in block 1755770, tx: 3702cae6a5571fb8af61b2bca1aff0d262ce9bd5db44ef45d8d099748b90fa61
2019-01-26 20:19:48,052 ERROR [openmonero] Cant get derived key for:
pub_tx_key: 5e9f50dabc8d86c8d31f013b1e34580fe0e3b8be9d383c5cf1970ffa7b808052 and prv_view_key0x2f29d9a
2019-01-26 20:19:48,103 ERROR [openmonero] Exception in TxSearch for 4AA7PvHGfeu9BB8RwstcR44krDyxmzvt4CL2jYKsiAoBXDFPahSe24kjKGDwuq9hTU1JVmQVmANQL4khVxfqyjKkBhdLPPB
2019-01-26 20:19:48,103 INFO  [openmonero] Stopping the thread by setting continue_search=false
2019-01-26 20:19:48,103 INFO  [openmonero] Stopping the thread by setting continue_search=false
2019-01-26 20:19:49,941 INFO  [openmonero] Analyzing 200 blocks from 1385547 to 1385746 out of 1757687 blocks
2019-01-26 20:19:51,402 INFO  [openmonero] Current blockchain height: 1757687, no of mempool txs: 4
2019-01-26 20:19:51,402 ERROR [openmonero] Error in search thread: Cant get derived key for a tx. It will be cleared.
2019-01-26 20:19:51,402 INFO  [openmonero] Ereasing a search thread
2019-01-26 20:19:51,402 INFO  [openmonero] TxSearch destroyed
2019-01-26 20:19:51,961 INFO  [openmonero] Analyzing 200 blocks from 1367867 to 1368066 out of 

I tried to run openmonero (master branch) on completely different machine and after synchronization I started to get the same error. The error starts from 1757690 block approximately (everything was perfect until this block)

Also I tried to build the devel branch against v0.13.0.4 monero. I get compilation error

/root/openmonero_devel/src/MicroCore.h: In member function ‘virtual void xmreg::MicroCore::get_output_key(uint64_t, const std::vector<long unsigned int>&, std::vector<cryptonote::output_data_t>&)’:
/root/openmonero_devel/src/MicroCore.h:76:58: error: no matching function for call to ‘cryptonote::BlockchainDB::get_output_key(epee::span<const long unsigned int>, const std::vector<long unsigned int>&, std::vector<cryptonote::output_data_t>&)’
                                 absolute_offsets, outputs);
                                                          ^
In file included from /root/monero/src/cryptonote_core/tx_pool.h:46:0,
                 from /root/openmonero_devel/src/monero_headers.h:25,
                 from /root/openmonero_devel/src/MicroCore.h:11,
                 from /root/openmonero_devel/src/MicroCore.cpp:5:
/root/monero/src/blockchain_db/blockchain_db.h:1262:25: note: candidate: virtual cryptonote::output_data_t cryptonote::BlockchainDB::get_output_key(const uint64_t&, const uint64_t&)
   virtual output_data_t get_output_key(const uint64_t& amount, const uint64_t& index) = 0;
                         ^
/root/monero/src/blockchain_db/blockchain_db.h:1262:25: note:   candidate expects 2 arguments, 3 provided
/root/monero/src/blockchain_db/blockchain_db.h:1314:16: note: candidate: virtual void cryptonote::BlockchainDB::get_output_key(const uint64_t&, const std::vector<long unsigned int>&, std::vector<cryptonote::output_data_t>&, bool)
   virtual void get_output_key(const uint64_t &amount, const std::vector<uint64_t> &offsets, std::vector<output_data_t> &outputs, bool allow_partial = false) = 0;
                ^
/root/monero/src/blockchain_db/blockchain_db.h:1314:16: note:   no known conversion for argument 1 from ‘epee::span<const long unsigned int>’ to ‘const uint64_t& {aka const long unsigned int&}’
In file included from /root/openmonero_devel/src/MicroCore.cpp:5:0:
/root/openmonero_devel/src/MicroCore.h: In member function ‘virtual std::vector<long unsigned int> xmreg::MicroCore::get_tx_amount_output_indices(const uint64_t&) const’:
/root/openmonero_devel/src/MicroCore.h:136:59: error: could not convert ‘cryptonote::BlockchainDB::get_tx_amount_output_indices(((uint64_t)tx_id)).std::vector<_Tp, _Alloc>::front<long unsigned int, std::allocator<long unsigned int> >()’ from ‘__gnu_cxx::__alloc_traits<std::allocator<long unsigned int> >::value_type {aka long unsigned int}’ to ‘std::vector<long unsigned int>’
                 .get_tx_amount_output_indices(tx_id).front();
                                                           ^
src/CMakeFiles/myxrm.dir/build.make:62: recipe for target 'src/CMakeFiles/myxrm.dir/MicroCore.cpp.o' failed
make[2]: *** [src/CMakeFiles/myxrm.dir/MicroCore.cpp.o] Error 1
CMakeFiles/Makefile2:123: recipe for target 'src/CMakeFiles/myxrm.dir/all' failed
make[1]: *** [src/CMakeFiles/myxrm.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

Any thoughts?
I can send the both monerod.log and openmonero.log if it helps you

Thank you

@ghost ghost reopened this Jan 26, 2019
@ghost
Copy link
Author

ghost commented Jan 26, 2019

Openmonero is being used for wallet with many users right now. Right now they can't access their monero. I will very appreciate, if you give me some advise on how to resolve it. Please, feel free to ask any additional information.

Thank you!

@moneroexamples
Copy link
Owner

devel branch will not work with v0.13.0.4. You need latest monero from it's github's master branch. But due to nature of this issue, I think in devel branch will have sime problem. I will modify the code, so that the search threads don't terminate when they encounter this error (there is something wrong with the tx being scanned). Instead, they will just skip it, and move to the next.

Should be done today. I will report back when its done.

@ghost
Copy link
Author

ghost commented Jan 26, 2019

Thank you very much for your work. You are doing a lot for this project

@moneroexamples
Copy link
Owner

Can confirm and reproduce error. It's caused by this tx: https://www.xmrchain.net/tx/9c9490642d4c648c8b645e68d9b4c8474f48f185b72914dcf024702dce59d570

2019-01-27 00:12:45,041 ERROR [openmonero] Cant get derived key for: 
pub_tx_key: 5e9f50dabc8d86c8d31f013b1e34580fe0e3b8be9d383c5cf1970ffa7b808052 and prv_view_key0x55fac830276a
2019-01-27 00:12:45,041 WARN  [openmonero] 44ogAw :tx 9c9490642d4c648c8b645e68d9b4c8474f48f185b72914dcf024702dce59d570 skipped.

Commit 02d192b makes failures in derivation of keys to skip problematic txs, instead of terminating search threads.

Please check updated master branch of openmonero. Now you should see warning WARN [openmonero] 44ogAw :tx 9c9490642d4c648c8b645e68d9b4c8474f48f185b72914dcf024702dce59d570 skipped. for the problematic tx, instead of the search threads being stopped.

@ghost ghost closed this as completed Jan 27, 2019
@ghost ghost changed the title Search thread does not exist Search thread does not exist. Can't get derived key for Jan 27, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant