Accidental recursion error
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

There is a what appears like an infinite recursion error in the v0.6 branch of PyBitmessage. I cannot reliably reproduce it and I don't know where in the code it's triggered. The code isn't supposed to be recursive at all (apart from minor exceptions, which test negative for this bug).

More info: https://github.com/Bitmessage/PyBitmessage/issues/1079

A solution would, in the minimum, pinpoint the code location where it happens and provide a method for triggering it. A pull request against the v0.6 branch that fixes it will receive a tip. When creating a pull request, please follow the contribution guidelines, of most importance is that:

  • the pull request is against the v0.6 branch
  • all the commits in the pull request are PGP signed
  • the pull request can be merged using a fast-forward merge
Hi peter, hi have downloaded the code(V0.6) and all its dependencies, and tried to run the python bitmessagemain.py , but I got no error.Any idea why that might be so?Thank you
Codeword 9 days ago
You may have to wait for hours for the error to appear. That's one of the problems, I don't know how to trigger it. Try to make sure you're accepting incoming connections, that may help it trigger faster.
PeterSurda 9 days ago
okay thanks.Let me run it for few hour, to see if i can get the error.
Codeword 9 days ago
It looks like g1itch's comment is correct, if you empty the inventory and join a chan, it will trigger faster. Tested with the "general" chan. To delete the inventory, execute while PyBM isn't running: sqlite3 ~/.config/PyBitmessage/messages.dat 'DELETE FROM inventory'
PeterSurda 8 days ago
Thanks, peter
Codeword 8 days ago
Hi Peter, I did exactly as you told, but the error doesn't seem to show up.I think it's a bit shy.Hahahaha
Codeword 7 days ago
Do you have any idea, as of where the recursion error might reside, I mean which script if you have an approximation.Thank you
Codeword 7 days ago
Try to repeat the process. After it's done syncing and still no trigger, repeat it again. Regarding where it is, that's the point, if I knew that I wouldn't ask.
PeterSurda 7 days ago
hey peter, atlast I got the error, let me see if i can find out the reason.Thank you
Codeword 4 days ago
I was able to replicate it without a chan as well by the way.
PeterSurda 4 days ago
You know, I actually got a crash at round the time when you made your comment. So maybe it was triggered by an object?
PeterSurda 4 days ago
yeah you may be right.Let me see if i can find any more info.Thank you
Codeword 4 days ago
awarded to Codeword

Crowdsource coding tasks.

1 Solution

Winning solution

Hey Peter, As you might already know, a good place to start debugging would be bitmessagemain.py, also I found this file regarding the _ctype.DictRemover as bitmessagemain.py or your application is also using ctype library which in turn is using _ctype https://github.com/python/cpython/blob/master/Modules/_ctypes/_ctypes.c
See if you can get any clue from as this file has the so-called _ctype.DictRemover in it.This is as far as I could do.Thank you

If you need more time, you can continue working and I'll send you additional bounty directly.
PeterSurda 3 days ago
If you say so then I continue searching for the error and if I found it I will report it to you here in the comment section.Thank you.Bye the way are u the author of this application?.If yes I must say this application is pretty useful.
Codeword 3 days ago
I'll award you the bounty now as I think you did improve on my understanding on the problem, but you can get more if you continue working and manage to fix it. I repeated tests over and over, and I think it's happening in the decryption thread (if I comment the "processxxxx" calls in class_objectProcessor.py, it doesn't seem to happen anymore). The decryption calls openssl functions through ctypes. You can join the "bitmessage" chan and post there. I'm not the original author of Bitmessage but I took over from him.
PeterSurda 3 days ago
Okay, Peter, I will go through the whole code thoroughly and see if I can find the error and will report you as soon as I get any clue.And thank you for awarding me the bounty.
Codeword 3 days ago