read messages revert to unread (and then revert back), perhaps more with slow connections



16 years ago
2 years ago


(Reporter: luca, Unassigned)


(Blocks 1 bug)

Bug Flags:
wanted-thunderbird +
blocking-thunderbird3.1 -

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [datalossy][summary: comment 3])



16 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Win98; ca; rv:1.3) Gecko/20030312
Build Identifier: Mozilla/5.0 (Windows; U; Win98; ca; rv:1.3) Gecko/20030312

When I read a message its seen state changes from unseen to seen (ie, the
subject goes from bold to normal). From time to time, right after going from
unseen to seen it goes right back to unseen, and then, after a while (couple of
seconds) it reverts back to seen (even if I'm now reading another message, in
fact at the same time all messages displaying as "unseen" but that have been
seen go back to seen).
I'm not sure the component is Networking:IMAP, but I'm seeing it with an imap
server (cyrus imaps 2.1.12) and have no local folders.
I know that cyrus imapd have some problems with multiple connection uptating the
seen state, anyway I have selected compile time options to minimize this problem
(It happened no more that once a month up to mozilla 1.2.1 but without the
flickering I'm reporting now, ie. seen messages just reverted to unseen).
I didn't see the same problem on Linux.

Reproducible: Sometimes

Steps to Reproduce:

Comment 1

16 years ago

*** This bug has been marked as a duplicate of 195787 ***
Last Resolved: 16 years ago
Resolution: --- → DUPLICATE
Summary: seen state flickers → read messages revert to unread (and then revert back)

Comment 2

16 years ago
I'm not convinced this is the same as bug 195787 (though I didn't think to
search for "read" since the flag is "seen"), it's similar but not the same:

1) in bug 195787 messages go back to unseen/unread and then stay that way, while
in my case they eventually reflect the correct (seen/read) state.

2) bug 195787 is about the inbox, I see this in every folder (including the inbox).

3) bug 195787 has been reported for mozilla 1.0.0, while I never saw this
behaviour until mozilla 1.3 (yes, I saw something similar to bug 195787 but that
was a cyrus bug now solved).

Comment 3

16 years ago
I don't know if this is a dup or not. I'm going to re-open this one.

Your comment in bug 195787 is pretty close to spot on:
"1) the message is preloaded in the cache
2) the user selects the message for display, the message won't be fetched again,
and mozilla displays it as read but...
3) at the same time there's a check for new mail running, all threads are busy
so 2) cannot mark the message as read in the server immediately, the order to
mark it as read is queued
4) the check for new mail fetches the flags from the server. Since the update
from 2) is still pending, it will see the message as unread and display it that way
5) eventually 3) terminates so 2) can update the server. The message displays
again as new.

The time between 2) and 5) can be very short (the flicker will be barely
noticeable) or can be various seconds."

There is an extra complication, which is that we won't make two simultaneous
connections to a folder, so if an update of the current folder is going on, we
won't be able to store the seen flag until that update is finished. And for a
little more fun, if you have a message filtered into a currently open folder, we
will update the current folder. If you read a message while that's going on,
there will be the same flicker.

So, fixing this is harder than it might sound. We don't keep track of these
pending stores of the seen flag. If you have a ton of folders that you're
checking for new mail, it does make this much more likely to happen. My
preference for fixing that would be to chain the checks for new mail in all
those folders instead of firing them off all at once, and to try to use the
status command.
Resolution: DUPLICATE → ---
Product: MailNews → Core
confirming tho possible dup of bug b/c might not want to lose
the bug in the "big auto triage"
Ever confirmed: true

Comment 5

12 years ago
I have Version Build 20070326 - and I have exactly the same bug. Random emails revert to bold/unread. This is only in my local folder, not in my profiles. It's not all emails, and the number of undread/bold increases each time I run Thunderbird. Any suggestions for a fix? 

Comment 6

11 years ago
See also: bug 284030, bug 243117, bug 436769.

I'm not sure if these are all the same bug or not, especially given David's comment 3.  That explanation sounds different from my wild guess, which is:

""When anything refreshes or modifies the list pane, and the pane ends up with a message selected, the 'Mark message read after N seconds' preference will start its countdown on that message.  In many cases, that is undesirable behavior."  (But: see bug 436769 comment 7 for someone who disagrees with me, and thinks it's usually desirable.)


10 years ago
Product: Core → MailNews Core


10 years ago
QA Contact: grylchan → networking.imap
xref bug 513235 read/unread status bounces when marking message as read

luca writes "sometimes there's a short flicker" using v2
Severity: normal → minor
bienvenu, is the cause for the following essentially the same as you describe here in comment 3?

- Bug 243117 - Message marked unread gets marked read again after IMAP download complete
- Bug 284030 - Clearing quicksearch marks unread mail read
- Bug 373366 - "Wait before marking messages read" broken on large IMAP messages

Comment 9

10 years ago
Wayne, yes, I believe it is.
This affects perceived perf, so it affects perf.  I'm seeing it more often than before, not sure why.
Flags: blocking-thunderbird3.1?
Keywords: perf
OS: Windows 98 → All
Hardware: x86 → All

Comment 11

10 years ago
Bwinton kindly suggested using to simulate slow connections, which davida thinks might make it easier to see this issue. I wonder if dropped connections might be involved as well.

Comment 12

10 years ago
High latency connection also could suffer from this, message could "toggle" or "blink"

Comment 13

10 years ago
FWIW, though, I'm seeing this on my mail server (Dovecot 1.2), which I am the sole user of, and which is 10 feet away via gigabit Ethernet.

Comment 14

10 years ago
For sake of completeness I've never seen such problem with dovecot 1.2 server which is in another country. Only when connection is unreliable or slow as hell.

Comment 15

10 years ago
Oh! Sorry, I got confused.  This bug is about *all* cases of messages changing status; I only see it under specific circumstances (switching folders/views) as in #284030.  I bet there are similar race conditions with slow/dropped connections.

Comment 16

10 years ago
yeah, np, yes, this is a completely different bug.

Comment 17

9 years ago
I don't think we'd block for this, given the other more important bugs we have.
Flags: wanted-thunderbird+
Flags: blocking-thunderbird3.1?
Flags: blocking-thunderbird3.1-


9 years ago
Blocks: 232967
33 bugs, several are probably related: (plus bug 525307)

I am seeing a new phenomenon (for me anyway) where only messages with html content go unread immediately upon selection, and these messages have "this may be a scam" or "display remote content".  And for some reason, it stops happening after some event or number of messages. This on my win7 with new profile, and Automatic mark unread is disabled. I haven't found a bug report for this, and perhaps deserves a new bug. But I mention it hear, to ask could this behavior be related to this bug?  Or perhaps related to bug 525307?  (tried to reproduce once with pop account - unsuccessful)
Severity: minor → normal
Whiteboard: [datalossy][summary: comment 3]
Duplicate of this bug: 603257
Duplicate of this bug: 659758


7 years ago
Assignee: mozilla → nobody
perhaps a better query
Summary: read messages revert to unread (and then revert back) → read messages revert to unread (and then revert back), perhaps more with slow connections

Comment 22

3 years ago
Is 10 Mbit/s connection slow?
For me it happens only in inbox; messages do not become "read" later.
For example, today I opened Daily and got together 6 bugzilla messages; no other activity (64-bit Windows 8.1 and Daily). 

List is ordered by time, latest at the bottom; lower pane shows message text; options set to mark as read immediately on display.
I clickedsuccessively each of top 3, and statuses properly changed. It was not fast, I was reading texts.
Then I clicked fourth, and the one above became unread.

Sometimes just only one message arrives, and then stubbornly refuses to get status 'read'.
It might require multiple actions - random combination of 'get messages', open message in tab, display other message(s) and then return to the latest one).
> Is 10 Mbit/s connection slow?

If you have smallish messages I would sy 10 isn't too slow.  Connections which are much slower are the ones that tend to have trouble - and the issues tend to be server related.

Comment 24

3 years ago
While the issue should be related to external mail server, but also it is possible that Thunderbird does not always changes/sets its internal states properly.
For example: there was a tray notification for received e-mail (one message).
It was the last in the list, and text was displayed in message pane below.
However, in the tree pane 'Inbox' was still highlighted with bold typeface and blue colour even though it was not 'Inbox(1)'. Clicking on the root and back on Inbox finally changed colour to standard black.

Comment 25

2 years ago
I have my settings to mark messages as read immediately, no delay.
When I get new messages, open one and then scroll to others, the first message I opened reverts back to being unread. I believe it only happens to the first message I open.

I am on Thunderbird 45.5.1. I believe this started happening with the latest release or the one before that.

Comment 26

2 years ago
(In reply to Aca Vengo from comment #25)
> I have my settings to mark messages as read immediately, no delay.
> When I get new messages, open one and then scroll to others, the first
> message I opened reverts back to being unread. I believe it only happens to
> the first message I open.
> I am on Thunderbird 45.5.1. I believe this started happening with the latest
> release or the one before that.

I have the exact same problem and I agree that it's fairly recent.

After clicking a message or choosing to mark the folder read, they immediately show as read and sometimes (often), one or more of them will revert to unread.

It's as if the sync from the server was done before it got the update from the client.  I suspect (I haven't looked at the code) that the client dismisses it's update list when it receives an update from the server.

I can also add that it happens with different IMAP providers exactly in the same fashion.


2 years ago
Keywords: perf

Comment 27

2 years ago
Some problem here (Thunderbird 52.0b3 on Windows), it's fairly recent.
You need to log in before you can comment on or make changes to this bug.