After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 573240 - "no output stream" error when deleting emails and doing ctrl-e quickly
"no output stream" error when deleting emails and doing ctrl-e quickly
Status: RESOLVED OBSOLETE
Product: evolution-data-server
Classification: Platform
Component: Mailer
2.26.x (obsolete)
Other Linux
: Normal critical
: ---
Assigned To: Milan Crha
Evolution QA team
: 573241 574733 577188 578193 688620 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-02-26 09:44 UTC by Sebastien Bacher
Modified: 2013-06-20 14:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
proposed eds patch (3.24 KB, patch)
2009-02-26 10:19 UTC, Milan Crha
needs-work Details | Review
test patch with debug messages (2.82 KB, text/plain)
2009-03-17 15:42 UTC, Milan Crha
  Details
test patch ][ (3.42 KB, text/plain)
2009-03-24 12:26 UTC, Milan Crha
  Details
proposed eds patch ][ (2.34 KB, patch)
2009-04-07 13:10 UTC, Milan Crha
none Details | Review

Description Sebastien Bacher 2009-02-26 09:44:08 UTC
* open a folder or an imap server
* del del del del del del ctrl-e
* sometimes is displays "no output stream" error
Comment 1 Sebastien Bacher 2009-02-26 09:46:13 UTC

*** This bug has been marked as a duplicate of 573241 ***
Comment 2 Sebastien Bacher 2009-02-26 09:47:13 UTC
*** Bug 573241 has been marked as a duplicate of this bug. ***
Comment 3 Sebastien Bacher 2009-02-26 09:50:10 UTC
sorry for the duplicated bug, the isse is easy to trigger using del several time and then ctrl-e but happens on normal use too, deleted emails are listed as stricked there no sure that makes a difference
Comment 4 Milan Crha 2009-02-26 10:19:30 UTC
Created attachment 129554 [details] [review]
proposed eds patch

for evolution-data-server;

try this please
Comment 5 Sebastien Bacher 2009-02-26 10:26:03 UTC
the change seems to work great, no warning or error dialog when using it after several tries
Comment 6 Srinivasa Ragavan 2009-02-26 10:37:02 UTC
Looks awesome to me. Did you see what broke it recently? or was it a inherent problem that we just saw?
Comment 7 Milan Crha 2009-02-26 11:57:13 UTC
Committed to trunk. Committed revision 10102.

Based on changes in http://svn.gnome.org/viewvc/evolution-data-server/trunk/camel/providers/imap/camel-imap-command.c?view=log
this is there even in a year 2005 (I didn't go later), so nothing new.
Comment 8 Matthew Barnes 2009-03-07 19:15:28 UTC
I'm reverting this patch for 2.26 because it causes serious IMAP regressions as well as potential summary database corruption.  We'll need to rework this after branching.

As the user cursors through message summaries, the IMAP connection eventually gets out of sync and Evolution begins failing to load message bodies.  The error message reported in the preview pane is usually "Could not find message body in FETCH response", but I've also seen the IMAP provider get so confused that the error messages start showing raw IMAP responses from the server.  When that happens, database corruption soon follows.

After reverting this patch and letting Evolution rebuild my summary database, the message loading problems did not occur after nearly a full day's use.

After restoring the patch the message loading problems resurfaced after only a few minutes of paging over the message list and purposefully cancelling slow loading messages.

I'm taking heat about this from every corner of Red Hat, and the "IMAP stops working after awhile" bugs are already starting to trickle into Bugzilla.

It might just be that we need to flush the stream when it's interrupted in lieu of disconnecting, or something simple like that.  But this is a no go for 2.26; it needs further investigation and testing and we're days away from a hard code freeze.

Patch reverted in revision 10143.
Comment 9 Milan Crha 2009-03-09 10:42:45 UTC
Bad, I wouldn't expect such breakage after this patch :(
Comment 10 Matthew Barnes 2009-03-09 12:51:55 UTC
Jeff Cai confirmed this in bug #574236.

I think the root problem is we leave the input stream in an unknown state after an interrupt and can't reliably parse it thereafter.  Hanging up and redialing (like a phone call) keeps us in a known state.  If we're not gonna hang up, we might just need to wait for the server to stop talking (finish reading and then flush the stream) to get us back to a known state.  Or there might be other got'chas, I don't know.
Comment 11 Matthew Barnes 2009-03-10 11:57:45 UTC
*** Bug 574733 has been marked as a duplicate of this bug. ***
Comment 12 Milan Crha 2009-03-17 15:42:41 UTC
Created attachment 130831 [details]
test patch with debug messages

for evolution-data-server;

just a test patch, with new debug info prints, and only one relevant change (moving reconnect to start command from continuation command). It'll write on console whether you faced the issue, and if it'll not show in the UI anything wrong like before, and all the operations will succeed even on the server, then it should be file. Please try. Thanks a lot.
Comment 13 Sebastien Bacher 2009-03-18 09:42:22 UTC
using the change and deleting and using ctrl-e several time leads quickly to 

"(evolution:17621): camel-WARNING **: camel_exception_get_id called with NULL parameter.
camel_imap_store_readline: disconnect
imap_command_start: disconnect
imap_command_start: disconnect
imap_command_start: disconnect
camel_imap_store_readline: disconnect
imap_command_start: not connected probably..."

where the warning and not connected line are repeated a lot
Comment 14 Milan Crha 2009-03-18 10:05:36 UTC
it would be nice to know where exactly the camel-WARNING comes from, but for those other it's correct, it just monitors what it does. For example, in a version without patch, you should get the "no output stream" error after
imap_command_start: not connected probably...
but here is reconnects and continues happily forward. Does the UI/database/whatever indicates any issue like before (comment #8) while using the test patch?
Comment 15 Sebastien Bacher 2009-03-18 11:00:27 UTC
the change seems to lead to crashes on error sometime

"#0  0xb6838898 in vfprintf () from /lib/tls/i686/cmov/libc.so.6
  • #1 __vasprintf_chk
    from /lib/tls/i686/cmov/libc.so.6
  • #2 IA__g_vasprintf
    at /usr/include/bits/stdio2.h line 199
  • #3 IA__g_strdup_vprintf
    at /build/buildd/glib2.0-2.20.0/glib/gstrfuncs.c line 244
  • #4 IA__g_logv
    at /build/buildd/glib2.0-2.20.0/glib/gmessages.c line 472
  • #5 IA__g_log
    at /build/buildd/glib2.0-2.20.0/glib/gmessages.c line 517
  • #6 camel_exception_get_id
    at camel-exception.c line 238
  • #7 connect_to_server_wrapper
    at camel-imap-store.c line 976
  • #8 imap_connect

Comment 16 Milan Crha 2009-03-18 13:19:14 UTC
(In reply to comment #15)
> the change seems to lead to crashes on error sometime

It doesn't crash, does it?

> #6  0xb79df828 in camel_exception_get_id (ex=0x0) at camel-exception.c:238
> #7  0xb36ad42f in connect_to_server_wrapper (service=0x8ef8d10, ex=0x0)
>     at camel-imap-store.c:976
> #8  0xb36ad5b6 in imap_connect (service=0x8ef8d10, ex=0x0)

here continues the interesting part, which I think leads up to imap_command_start? could you provide as long as possible backtrace of that output, except of lines above camel_exception_get_id, which are irrelevant (if it doesn't crash there, which I doubt).
Comment 17 Sebastien Bacher 2009-03-18 15:00:24 UTC
it seems to be doing the same calls in loop copying some interations

"#0  0xb69b3afe in _IO_default_xsputn () from /lib/tls/i686/cmov/libc.so.6
  • #1 vfprintf
    from /lib/tls/i686/cmov/libc.so.6
  • #2 __vasprintf_chk
    from /lib/tls/i686/cmov/libc.so.6
  • #3 IA__g_vasprintf
    at /usr/include/bits/stdio2.h line 199
  • #4 IA__g_strdup_vprintf
    at /build/buildd/glib2.0-2.20.0/glib/gstrfuncs.c line 244
  • #5 IA__g_logv
    at /build/buildd/glib2.0-2.20.0/glib/gmessages.c line 472
  • #6 IA__g_log
    at /build/buildd/glib2.0-2.20.0/glib/gmessages.c line 517
  • #7 camel_exception_get_id
    at camel-exception.c line 238
  • #8 connect_to_server_wrapper
    at camel-imap-store.c line 976
  • #9 imap_connect
    at camel-imap-store.c line 1411
  • #10 camel_service_connect
    at camel-service.c line 369
  • #11 camel_imap_store_connected
    at camel-imap-store.c line 2989
  • #12 imap_command_start
    at camel-imap-command.c line 185
  • #13 camel_imap_command
    at camel-imap-command.c line 111
  • #14 imap_disconnect
    at camel-imap-store.c line 1552
  • #15 camel_service_disconnect
    at camel-service.c line 432
  • #16 imap_connect
    at camel-imap-store.c line 1414
  • #17 camel_service_connect
    at camel-service.c line 369
  • #18 camel_imap_store_connected
    at camel-imap-store.c line 2989
  • #19 imap_command_start
    at camel-imap-command.c line 185
  • #20 camel_imap_command
    at camel-imap-command.c line 111
  • #21 imap_disconnect
    at camel-imap-store.c line 1552
  • #22 camel_service_disconnect
    at camel-service.c line 432
  • #23 imap_connect
    at camel-imap-store.c line 1414
  • #24 camel_service_connect
    at camel-service.c line 369
  • #25 camel_imap_store_connected
    at camel-imap-store.c line 2989
  • #26 imap_command_start
    at camel-imap-command.c line 185
  • #27 camel_imap_command
    at camel-imap-command.c line 111
  • #28 imap_disconnect
    at camel-imap-store.c line 1552
  • #29 camel_service_disconnect
    at camel-service.c line 432
  • #30 imap_connect
    at camel-imap-store.c line 1414
  • #31 camel_service_connect
    at camel-service.c line 369
  • #32 camel_imap_store_connected
    at camel-imap-store.c line 2989
  • #33 imap_command_start
    at camel-imap-command.c line 185
  • #34 camel_imap_command
    at camel-imap-command.c line 111
  • #35 imap_disconnect
    at camel-imap-store.c line 1552
  • #36 camel_service_disconnect
    at camel-service.c line 432
  • #37 imap_connect
    at camel-imap-store.c line 1414
  • #38 camel_service_connect
    at camel-service.c line 369

Comment 18 Milan Crha 2009-03-18 15:05:41 UTC
I see, you've right, it crashes after some time on a stack overflow or something very similar.
Comment 19 Milan Crha 2009-03-24 12:26:45 UTC
Created attachment 131250 [details]
test patch ][

for evolution-data-server;

please give a try to this one, it's quite similar, only the stack cycle on disconnect is correctly managed, as in the other place where the LOGOUT is used.
It'll write one more message about LOGOUT when you would be going to face the above issue again. I wasn't able to reproduce it myself, though.
Comment 20 Fabio Durán Verdugo 2009-03-30 04:07:54 UTC
*** Bug 577188 has been marked as a duplicate of this bug. ***
Comment 21 Fabio Durán Verdugo 2009-04-07 12:30:48 UTC
*** Bug 578193 has been marked as a duplicate of this bug. ***
Comment 22 Milan Crha 2009-04-07 13:10:08 UTC
Created attachment 132267 [details] [review]
proposed eds patch ][

for evolution-data-server;

stripped debug messages from the test patch ][
Comment 23 Akhil Laddha 2009-04-14 03:52:41 UTC
is bug 578827 related to this one ? 
Comment 24 Milan Crha 2009-04-14 10:48:05 UTC
(In reply to comment #23)
> is bug 578827 related to this one ? 

I think it isn't. It probably crashed in thread 2 in

Thread 2 (process 1603)

  • #0 sqlite3DbFree
    at sqlite3.c line 16453

No idea what that can do after hibernation.
Comment 25 Srinivasa Ragavan 2009-04-20 07:51:42 UTC
Seb, does this patch work well for you?
Comment 26 Sebastien Bacher 2009-04-20 08:17:36 UTC
is the change in 2.26.1? I was using the patch for some time without using but I'm using 2.26.1 now so if the change is not there it could need another round of testing on this version
Comment 27 Srinivasa Ragavan 2009-04-27 05:00:02 UTC
I dont think the change is  in 2.26.1. Probably, if it works well for you, we can include it in the upcoming release.
Comment 28 Milan Crha 2009-10-09 10:32:44 UTC
Sebastien, what's the status on this, please?
Comment 29 Sebastien Bacher 2009-11-24 12:56:21 UTC
the bug didn't happen for a while not it seems to have been fixed in the 2.27 cycle...
Comment 30 Sebastien Bacher 2009-11-24 12:57:13 UTC
not -> now, ie feel free to close the bug
Comment 31 Milan Crha 2009-11-24 13:06:45 UTC
OK, thanks for the update. I'm closing it, but feel free to reopen.
Comment 32 Milan Crha 2009-11-25 12:15:55 UTC
(In reply to comment #31)
> OK, thanks for the update. I'm closing it, but feel free to reopen.

Hrm, reopening per Andre's comment on IRC about "I'm seeing this on 2.28.0". 

Unfortunately I'm not much sure with a proposed patch, whether it has any side effects, thus some testing from anyone seeing this (often) will be very appreciated.
Comment 33 Milan Crha 2013-03-15 13:25:48 UTC
The old IMAP is gone in 3.8, replaced by IMAP+, which made this bug obsolete.
Comment 34 Milan Crha 2013-06-20 14:01:53 UTC
*** Bug 688620 has been marked as a duplicate of this bug. ***