Hello,
If anyone experienced this bug: http://lists.opensuse.org/opensuse-kde3/2012-03/msg00001.html
try this patch: http://sourceforge.net/p/kde3/kdepim/ci/a32b14d7ababc08d76195a7382e598329fb7...
Dne pá 3. května 2013 Serghei Amelian napsal(a):
Hello,
If anyone experienced this bug: http://lists.opensuse.org/opensuse-kde3/2012-03/msg00001.html
try this patch: http://sourceforge.net/p/kde3/kdepim/ci/a32b14d7ababc08d76195a7382e5983 29fb7f0a2/
I was going to commit the patch into git, but comment:
// FIXME (Serghei): i'm not sure about role of "relay"
seems to be very important. I looked into the ambient code. relayEnabled is switched by decodeContent, hence, depending on the "DECODE" in the URL. I see a potential problem remove handling 'relay' from parseReadLine, while in other code is apparently somehow used.
Therefore I believe that the patch needs further research and testing. For this reason, now I do not expect inclusion into 3.5.13.2.
Any comments or objections?
Slavek
On Tuesday 28 May 2013 18:02:21 Slávek Banko wrote:
Dne pá 3. května 2013 Serghei Amelian napsal(a):
Hello,
If anyone experienced this bug: http://lists.opensuse.org/opensuse-kde3/2012-03/msg00001.html
try this patch: http://sourceforge.net/p/kde3/kdepim/ci/a32b14d7ababc08d76195a7382e5983 29fb7f0a2/
I was going to commit the patch into git, but comment:
// FIXME (Serghei): i'm not sure about role of "relay"
seems to be very important. I looked into the ambient code. relayEnabled is switched by decodeContent, hence, depending on the "DECODE" in the URL. I see a potential problem remove handling 'relay' from parseReadLine, while in other code is apparently somehow used.
Therefore I believe that the patch needs further research and testing. For this reason, now I do not expect inclusion into 3.5.13.2.
Any comments or objections?
Slavek
I agree that this patch needs more investigations, for this reason I wrote the FIXME comment. However, without it the kio_imap4 is completely unusable on 64 bit systems (it enter to endless loop). So far I did not noticed any problem related to "relay".
Dne út 28. května 2013 Serghei Amelian napsal(a):
On Tuesday 28 May 2013 18:02:21 Slávek Banko wrote:
Dne pá 3. května 2013 Serghei Amelian napsal(a):
Hello,
If anyone experienced this bug: http://lists.opensuse.org/opensuse-kde3/2012-03/msg00001.html
try this patch: http://sourceforge.net/p/kde3/kdepim/ci/a32b14d7ababc08d76195a7382e 5983 29fb7f0a2/
I was going to commit the patch into git, but comment:
// FIXME (Serghei): i'm not sure about role of "relay"
seems to be very important. I looked into the ambient code. relayEnabled is switched by decodeContent, hence, depending on the "DECODE" in the URL. I see a potential problem remove handling 'relay' from parseReadLine, while in other code is apparently somehow used.
Therefore I believe that the patch needs further research and testing. For this reason, now I do not expect inclusion into 3.5.13.2.
Any comments or objections?
Slavek
I agree that this patch needs more investigations, for this reason I wrote the FIXME comment. However, without it the kio_imap4 is completely unusable on 64 bit systems (it enter to endless loop). So far I did not noticed any problem related to "relay".
I use kmail with IMAP4 on 64bit system for a long time and I did not notice endless loops before using your patch, even then.
Several problems was fixed by François in earlier patches:
+ 786fea2 Fix another endless loop in imapparser (Bug 1235) + 590161f Fix more SEGV in imapparser (Bug 1235) + 9b43d6e Fix segfault in IMAP folder parsing + b0c92b3 Fix long response time on large IMAP folders (Bug 1009) + aa2af25 Fix IMAP hang on auth failure (Bug 1007)
Slavek
On Tuesday 28 May 2013 18:31:37 Slávek Banko wrote: [...]
I use kmail with IMAP4 on 64bit system for a long time and I did not notice endless loops before using your patch, even then.
Several problems was fixed by François in earlier patches:
- 786fea2 Fix another endless loop in imapparser (Bug 1235)
- 590161f Fix more SEGV in imapparser (Bug 1235)
- 9b43d6e Fix segfault in IMAP folder parsing
- b0c92b3 Fix long response time on large IMAP folders (Bug 1009)
- aa2af25 Fix IMAP hang on auth failure (Bug 1007)
Slavek
I guess that the endless-loop on 64 bit systems is fixed by one of François' patches.
My patch fixed this issue as a side effect, I discovered that kio_imap4 read lines of stream wrongly (i.e. read one line and half, instead one line at once) and I tried to address this.
Le 28/05/2013 17:53, Serghei Amelian a écrit :
On Tuesday 28 May 2013 18:31:37 Slávek Banko wrote: [...]
I use kmail with IMAP4 on 64bit system for a long time and I did not notice endless loops before using your patch, even then.
Several problems was fixed by François in earlier patches:
- 786fea2 Fix another endless loop in imapparser (Bug 1235)
- 590161f Fix more SEGV in imapparser (Bug 1235)
- 9b43d6e Fix segfault in IMAP folder parsing
- b0c92b3 Fix long response time on large IMAP folders (Bug 1009)
- aa2af25 Fix IMAP hang on auth failure (Bug 1007)
Slavek
I guess that the endless-loop on 64 bit systems is fixed by one of François' patches.
My patch fixed this issue as a side effect, I discovered that kio_imap4 read lines of stream wrongly (i.e. read one line and half, instead one line at once) and I tried to address this.
Hello, I confirm that my own patches were written to solve 2 frequent issues that I had seen : - Segmentation fault while parsing imap stream, causing kmail crash; - Endless loop while parsing imag stream, causing 100% CPU and kmail hang. (I'm on 64 bit BTW.)
Now kmail does not crash anymore, but I still have issues with imap parsing: when opening a big imap folder containing "bad" mails (chinese spam, badly encoded ...), kmail often shows them as "unknown" and "unread" This is because the imap parser fails. So when I open my spam folder containing lots of badly-encoded chinese spam, I see lots of "unknown/unread" messages, but this is wrong. They are correctly displayed in Thunderbird.
Now, the kio_imap4 fix from Serghei seems to fixes the parsing issues: now I can browse all my folders correctly in kmail. So, I think we should push this patch in 3.5.13.2. Without it, I consider kmail as being unusable with imap (at least: I would not recommend using kmail without this patch).
Francois
Dne út 28. května 2013 François Andriot napsal(a):
Now, the kio_imap4 fix from Serghei seems to fixes the parsing issues: now I can browse all my folders correctly in kmail. So, I think we should push this patch in 3.5.13.2. Without it, I consider kmail as being unusable with imap (at least: I would not recommend using kmail without this patch).
Francois
It seems that I found the problem of missing 'relay' handling!
I use KOrn for notification. KOrn also uses kio_imap4. With the patch from Serghei KOrn constantly reported broken connection to a remote IMAP server. When I revert kio_imap4 to version without this patch, KOrn working properly.
I would like to incorporate this patch - looks good. However, the problem with missing 'relay' handling I consider confirmed and necessary for fix.
Slavek --
Le 28/05/2013 19:44, Slávek Banko a écrit :
Dne út 28. května 2013 François Andriot napsal(a):
Now, the kio_imap4 fix from Serghei seems to fixes the parsing issues: now I can browse all my folders correctly in kmail. So, I think we should push this patch in 3.5.13.2. Without it, I consider kmail as being unusable with imap (at least: I would not recommend using kmail without this patch).
Francois
It seems that I found the problem of missing 'relay' handling!
I use KOrn for notification. KOrn also uses kio_imap4. With the patch from Serghei KOrn constantly reported broken connection to a remote IMAP server. When I revert kio_imap4 to version without this patch, KOrn working properly.
I would like to incorporate this patch - looks good. However, the problem with missing 'relay' handling I consider confirmed and necessary for fix.
Slavek
Please try attached patch ...
Francois
Le 28/05/2013 19:44, Slávek Banko a écrit :
Dne út 28. května 2013 François Andriot napsal(a):
Now, the kio_imap4 fix from Serghei seems to fixes the parsing issues: now I can browse all my folders correctly in kmail. So, I think we should push this patch in 3.5.13.2. Without it, I consider kmail as being unusable with imap (at least: I would not recommend using kmail without this patch).
Francois
It seems that I found the problem of missing 'relay' handling!
I use KOrn for notification. KOrn also uses kio_imap4. With the patch from Serghei KOrn constantly reported broken connection to a remote IMAP server. When I revert kio_imap4 to version without this patch, KOrn working properly.
I would like to incorporate this patch - looks good. However, the problem with missing 'relay' handling I consider confirmed and necessary for fix.
Slavek
Sorry I made a typo in previous patch which could crash kio_imap4 (bad values comparison) Try this patch instead !
Francois
Dne út 28. května 2013 François Andriot napsal(a):
Le 28/05/2013 19:44, Slávek Banko a écrit :
Dne út 28. května 2013 François Andriot napsal(a):
Now, the kio_imap4 fix from Serghei seems to fixes the parsing issues: now I can browse all my folders correctly in kmail. So, I think we should push this patch in 3.5.13.2. Without it, I consider kmail as being unusable with imap (at least: I would not recommend using kmail without this patch).
Francois
It seems that I found the problem of missing 'relay' handling!
I use KOrn for notification. KOrn also uses kio_imap4. With the patch from Serghei KOrn constantly reported broken connection to a remote IMAP server. When I revert kio_imap4 to version without this patch, KOrn working properly.
I would like to incorporate this patch - looks good. However, the problem with missing 'relay' handling I consider confirmed and necessary for fix.
Slavek
Sorry I made a typo in previous patch which could crash kio_imap4 (bad values comparison) Try this patch instead !
Francois
I tested both your patch, and your patch with the added:
parseRelay (relayData);
(I believe this is missing in your patch), but the problem with termination connection in KOrn persists.
Slavek --
Le 29/05/2013 16:01, Slávek Banko a écrit :
Sorry I made a typo in previous patch which could crash kio_imap4 (bad values comparison) Try this patch instead !
Francois I tested both your patch, and your patch with the added:
parseRelay (relayData);
(I believe this is missing in your patch), but the problem with termination connection in KOrn persists.
Slavek
Yes, you're right, I forgot the parseRelay() call ! Oops !
BTW I now doubt that your Korn problem is related to these patches ... Are you even sure that Korn uses the "relay" feature ? I'm not.
I've just built and tested tdepim several times : 1) Without Serghei's patch: Korn works correclty 2) With Serghei's patch only: Korn works correctly 3) Serghei + yesterday's patch: Korn works correclty 4) Serghei + corrected "parseRelay" patch : still works correctly.
I have no imap disconnection at all ... So, my guess is we still don't know really what's the "relay" feature is for , and all my patches are useless.
Francois
Dne st 29. května 2013 François Andriot napsal(a):
Le 29/05/2013 16:01, Slávek Banko a écrit :
Sorry I made a typo in previous patch which could crash kio_imap4 (bad values comparison) Try this patch instead !
Francois I tested both your patch, and your patch with the added:
parseRelay (relayData);
(I believe this is missing in your patch), but the problem with termination connection in KOrn persists.
Slavek
Yes, you're right, I forgot the parseRelay() call ! Oops !
BTW I now doubt that your Korn problem is related to these patches ... Are you even sure that Korn uses the "relay" feature ? I'm not.
I've just built and tested tdepim several times :
- Without Serghei's patch: Korn works correclty
- With Serghei's patch only: Korn works correctly
- Serghei + yesterday's patch: Korn works correclty
- Serghei + corrected "parseRelay" patch : still works correctly.
I have no imap disconnection at all ... So, my guess is we still don't know really what's the "relay" feature is for , and all my patches are useless.
Francois
For me, the situation is different: 1) Without Serghei's patch: Korn works correclty 2) With Serghei's patch only: Korn is constantly disconnects 3) Serghei + yesterday's patch: Korn is constantly disconnects 4) Serghei + corrected "parseRelay" patch: Korn is constantly disconnects
Probably this is not related with the handling of 'relay'. I looked into .xsession-errors - no related problems are reported.
Strange for this behavior is that disconnects occurs only for one from the three dovecot IMAP servers, on which are mails watched.
Slavek --
On Friday 03 of May 2013 17:13:23 Serghei Amelian wrote:
Hello,
If anyone experienced this bug: http://lists.opensuse.org/opensuse-kde3/2012-03/msg00001.html
try this patch: http://sourceforge.net/p/kde3/kdepim/ci/a32b14d7ababc08d76195a7382e598329fb 7f0a2/
I have prepared a completely alternative patch! When examining the original code, I noticed that in myRead is used memcpy when moving block within the buffer.
This reminded me bug 737 and commit 65c85dca (tdebase). This commit fixes in the POP3 protocol exactly the same case as in the original code of IMAP protocol. Therefore, I have prepared a same patch for IMAP (for original code - without your previously proposed patches).
Please, try it.
Slavek --
Le 30/05/2013 04:08, Slávek Banko a écrit :
On Friday 03 of May 2013 17:13:23 Serghei Amelian wrote:
Hello,
If anyone experienced this bug: http://lists.opensuse.org/opensuse-kde3/2012-03/msg00001.html
try this patch: http://sourceforge.net/p/kde3/kdepim/ci/a32b14d7ababc08d76195a7382e598329fb 7f0a2/
I have prepared a completely alternative patch! When examining the original code, I noticed that in myRead is used memcpy when moving block within the buffer.
This reminded me bug 737 and commit 65c85dca (tdebase). This commit fixes in the POP3 protocol exactly the same case as in the original code of IMAP protocol. Therefore, I have prepared a same patch for IMAP (for original code - without your previously proposed patches).
Please, try it.
Slavek
Nice find, your alternative patch fixes my parsing problems ! For me it's OK to push it.
Francois
On Thursday 30 of May 2013 19:43:20 François Andriot wrote:
Le 30/05/2013 04:08, Slávek Banko a écrit :
On Friday 03 of May 2013 17:13:23 Serghei Amelian wrote:
Hello,
If anyone experienced this bug: http://lists.opensuse.org/opensuse-kde3/2012-03/msg00001.html
try this patch: http://sourceforge.net/p/kde3/kdepim/ci/a32b14d7ababc08d76195a7382e5 98329fb 7f0a2/
I have prepared a completely alternative patch! When examining the original code, I noticed that in myRead is used memcpy when moving block within the buffer.
This reminded me bug 737 and commit 65c85dca (tdebase). This commit fixes in the POP3 protocol exactly the same case as in the original code of IMAP protocol. Therefore, I have prepared a same patch for IMAP (for original code - without your previously proposed patches).
Please, try it.
Slavek
Nice find, your alternative patch fixes my parsing problems ! For me it's OK to push it.
Francois
Thank you for your effort and testing. Pushed to GIT in hash c830701a and also into v3.5.13-sru branch. I'm glad that we discovered soon enough that the previous proposed patch was incorrect.
Note: This could be the last patch before freezing source code for 3.5.13.2 - leaving aside the patch for increase version in tdelibs :)
Slavek --