Moved config directory and now receiving duplicates #801
Labels
No Label
bug
build
dependencies
developers
documentation
duplicate
enhancement
formatting
invalid
legal
mobile
obsolete
packaging
performance
protocol
question
refactoring
regression
security
test
translation
usability
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Bitmessage/PyBitmessage-2024-12-13#801
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
A few weeks ago I moved my
.config/PyBitmessage
to another computer, ran bitmessage from there for a few days and moved it back to its original place. Everything works fine except since then I receive many messages I've already received.I think I only receive duplicates of messages that first arrived before I made this config switch, but I'm not sure.
It's different from #611 because the duplicates are still there after I restart bitmesssage.
I'm running current master.
You have received the duplicates on the same computer? (As opposed to receiving the same message on two different computers?)
If the sender resends the message then this can happen with the current code. The current code no longer removes duplicates based on the [sender, receiver, subject, message] combination but rather using a hash of the signature (so it is basically a random ID). If the sender resends a message before the previous message expires for some reason, or if you change your client to not send acknowledgements, then you can receive duplicates. I'm not really sure why this would happen with an unmodified client.
Yes. I received some of them 3 or 4 times.
I guess it's the sighash in the inbox table. The duplicate messages do have different sighash. Actually, one of them has an empty sighash. Is that normal? (It's only on one case though. There are duplicates that all have a non blank sighash)
So these duplicates could mean the sender didn't receive my acknowledgments for some reason?
Yes, it could mean that the sender did not receive the acknowledgements.
The empty sighash could be a message that you received before you upgraded your software.
I got the confirmation the other end is using a standard PyBitMessage and has some messages that haven't received the acknowledgment. I keep receiving duplicates, including on very recent messages. I also received one duplicate from someone else, so I guess it's not a problem with the other end. Is it possible my acknowledgments are invalid somehow? How can I check that?
@sigmike I will try to reproduce it. Are you available for helping me debug it?
Yes. The issue still occurs.
Based on the config file location, it looks like you're using a Unix-like system other than OSX (probably linux), correct?
Yes, Linux.
Which version are you using: the latest stable (0.4.4), the latest master, or perhaps my fork (https://github.com/mailchuck/PyBitmessage)?
Master a little before the time I created the issue. I'm at
b3afbb4308
.@sigmike Also, what version is the other side (the person who says they haven't received the acknowledgement) use? You write they use "standard PyBitMessage", is that 0.4.4 or latest master? The duplication fixes @Atheros1 made were done post-0.4.4, but I always thought that it is the recipient that should upgrade, the sender doesn't have to.
The other side is using 0.4.4.
I looked at the code and I have a theory about what happened. If you received the messages and shut down PyBitmessage before the acknowledgements were actually broadcasted (or, the recipient was offline for too long), it looks like it could have the effect you describe. Your client would think that it already sent the acks, and would not send them again if it received the message again.
To test this theory, what you can do is shutdown PyBitmessage (your, not the senders) and clean the inventory table:
That deletes the local copy of the objects on the P2P network and fetches them again. It would also cause PyBitmessage to create new acks when it receives messages which have you as a recipient. You still may receive one final duplicate, but this time you'll generate the ack and the recipient should receive it.
Other than causing you to redownload stuff and requiring a bit more disk space until the next vacuum, I don't think this has adverse effects.
Ok I'll try that.
But note that this is happening on multiple messages sent at varying interval. So it seems unlikely I closed the client between the message reception and ack broadcast that often.
I'm also pretty confident the other side very rarely lets the software closed for more than one day.
I tried it just to make sure it doesn't break anything, and I could not notice any adverse effect.
How about you ask them to send messages to me? This is the address I use for testing: BM-2cWuABX2d7XEPzxNmFb6wBedZ6zbW6Evgh
It was pointed out to me that ACK messages have a TTL of 1 hour (I haven't checked it out myself yet though). This would explain the type of behaviour you're experiencing.
Try to make sure both of you are online at the same time (not in order to fix it, but in order to seei if you can still reproduce it).
The minimum ACK TTL is not one hour, rather 1 day. In 0.4.4, it was fixed at 2.5 days.
I can't reproduce this.
I recommend that you all upgrade to a version of post-TTL (e.g. latest official master or the mailchuck fork) instead of 0.4.4 and make sure that the client syncs at least once a day. The mailchuck fork has faster message downloading and a status indicator showing if it's synced up.