Ticket #36 (defect)

Opened 1 year ago

Last modified 1 year ago

IDLE not working well when copying folders

Status: closed (fixed)

Reported by: anonymous Assigned to: pvanhoof
Priority: critical Milestone:
Component: libtinymail-camel Version:
Keywords: Cc:

I'm experiencing some problems when trying to copy/move folders. These issues are related to the IDLE stuff, because everything works fine without it. This is an example of the debug trace that Camel issues when copying the folder INBOX.one.test to INBOX.zero.

get folder info online
get folder info offline
Thread 0 >
Get folder info(0x80ac9a8:imap://local@192.168.3.2/, 'INBOX/one/test') =
  uri: imap://local@192.168.3.2/INBOX/one/test
  full_name: INBOX/one/test
  flags: 00000010
< 0 >
Thread 0 >
CamelStore('imap://local@192.168.3.2/;use_lsub=1'):get_folder('INBOX/one/test', 0) = 0x82920f0
< 0 >
CamelException.setv(0xbfce81d8, 202, 'No such folder INBOX/zero/test')
sending : H00025 SELECT INBOX.zero.test
received: H00024 BAD Invalid Idle continuation
CamelException.setv(0xbfce81d8, 301, 'IMAP command failed:  Invalid Idle continuation')
sending : H00026 LIST "" INBOX.zero
received: * LIST (\HasNoChildren) "." "INBOX.zero"
received: H00026 OK Completed (0.000 secs 2 calls)
sending : H00027 CREATE INBOX.zero.test
received: H00027 OK Completed
sending : H00028 SELECT INBOX.zero.test
received: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
received: * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
received: * 0 EXISTS
received: * 0 RECENT
received: * OK [UIDVALIDITY 1173977189]
received: * OK [UIDNEXT 1]
received: H00028 OK [READ-WRITE] Completed
Thread 0 >
CamelStore('imap://local@192.168.3.2/;use_lsub=1'):get_folder('INBOX/zero/test', 1) = 0x8179340
< 0 >
received: * BAD Invalid tag
received: * BAD Invalid tag
sending : H00029 SELECT INBOX.one.test
received: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
received: * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
received: * 1 EXISTS
received: * 0 RECENT
received: * OK [UIDVALIDITY 1173888775]
received: * OK [UIDNEXT 2]
received: H00029 OK [READ-WRITE] Completed
received: * BAD Invalid tag
sending : H00030 FETCH 1 UID
received: * 1 FETCH (UID 1)
received: H00030 OK Completed
sending : H00032 UID COPY 1 INBOX.zero.test
received: + idling
received: H00031 BAD Invalid Idle continuation
sending : H00033 SUBSCRIBE INBOX.zero.test
received: H00033 OK Completed
get folder info online
received: * BAD Invalid tag
sending : H00034 LIST "" INBOX.zero.test
received: * LIST (\HasNoChildren) "." "INBOX.zero.test"
received: H00034 OK Completed (0.000 secs 2 calls)
received: * BAD Invalid tag
sending : H00035 LSUB "" INBOX.zero.test
received: * LSUB () "." "INBOX.zero.test"
received: H00035 OK Completed (0.000 secs 2 calls)
received: * BAD Invalid tag
sending : H00036 LIST "" {17+}
INBOX.zero.test.%
received: H00036 OK Completed (0.000 secs 1 calls)
received: * BAD Invalid tag
sending : H00037 LSUB "" {17+}
INBOX.zero.test.%
received: H00037 OK Completed (0.000 secs 1 calls)
get folder info offline
Thread 0 >
Get folder info(0x80ac9a8:imap://local@192.168.3.2/, 'INBOX/zero/test') =
  uri: imap://local@192.168.3.2/INBOX/zero/test
  full_name: INBOX/zero/test
  flags: 00000010
< 0 >

I have verified that tinymail gets locked at some point in the connect_lock, so after the folder copy no further operation is possible.

Attachments

Change History

03/15/07 19:12:44: Modified by pvanhoof

The problem with this report is that you aren't printing the writing of the IDLE command, which is exactly the one that I would like to see for this. This happens on line 3611 of camel-imap-folder.c, can you print that one too? A backtrace from gdb would also be useful when the lock happens (thread apply all bt).

03/15/07 19:19:44: Modified by pvanhoof

Also print line 3428 of the same file. That's where the IDLE is closed (which isn't happening it seems).

03/15/07 19:44:08: Modified by anonymous

This is the bt at 3611

Thread 12 (Thread -1264940112 (LWP 11308)):
#0  0xb7fc1410 in ?? ()
#1  0xb49a8340 in ?? ()
#2  0x00000001 in ?? ()
#3  0x00000000 in ?? ()

Thread 2 (Thread -1244935248 (LWP 11295)):
#0  0xb7fc1410 in ?? ()
#1  0xb5cbc278 in ?? ()
#2  0xffffffff in ?? ()
#3  0x00000002 in ?? ()
#4  0xb71b7783 in poll () from /lib/tls/i686/cmov/libc.so.6
#5  0xb72603c6 in g_main_context_poll (context=0x8090348, timeout=-1, priority=2147483647, 
    fds=0x8090c60, n_fds=2) at gmain.c:2979
#6  0xb725f78d in g_main_context_iterate (context=0x8090348, block=1, dispatch=1, self=0x80903f8)
    at gmain.c:2672
#7  0xb725ff98 in IA__g_main_loop_run (loop=0x80903c8) at gmain.c:2881
#8  0xb7229844 in libnm_glib_init () from /usr/lib/libnm_glib.so.0
#9  0xb727f159 in g_thread_create_proxy (data=0x80903f8) at gthread.c:553
#10 0xb6e22240 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#11 0xb71c132e in clone () from /lib/tls/i686/cmov/libc.so.6

Thread 1 (Thread -1244808992 (LWP 11288)):
#0  camel_imap_folder_start_idle (folder=0x82938a0) at camel-imap-folder.c:3611
#1  0xb545e92e in camel_imap_folder_selected (folder=0x82938a0, response=0x82a33d0, ex=0xbfed2200)
    at camel-imap-folder.c:639
#2  0xb545bedc in imap_command_start (store=0x80ad9a8, folder=0x82938a0, 
    cmd=0x82a5b00 "UID COPY 1 INBOX.zero.test", ex=0xbfed2398) at camel-imap-command.c:223
#3  0xb545bcf4 in camel_imap_command (store=0x80ad9a8, folder=0x82938a0, ex=0xbfed2398, 
    fmt=0xb54773d7 "UID COPY %s %F") at camel-imap-command.c:119
#4  0xb5461950 in do_copy (source=0x82938a0, uids=0x82a8440, destination=0x817bb70, 
    delete_originals=0, ex=0xbfed2398) at camel-imap-folder.c:2017
#5  0xb5461ad5 in imap_transfer_online (source=0x82938a0, uids=0x82a8440, dest=0x817bb70, 
    transferred_uids=0x0, delete_originals=0, ex=0xbfed2398) at camel-imap-folder.c:2050
#6  0xb7c5b6db in disco_transfer_messages_to (source=0x82938a0, uids=0x82a8440, dest=0x817bb70, 
    transferred_uids=0x0, delete_originals=0, ex=0xbfed2398) at camel-disco-folder.c:393
#7  0xb7c6e440 in camel_folder_transfer_messages_to (source=0x82938a0, uids=0x82a8440, 
    dest=0x817bb70, transferred_uids=0x0, delete_originals=0, ex=0xbfed2398) at camel-folder.c:1454
#8  0xb7cb4816 in tny_camel_folder_copy_default (self=0x824f748, into=0x824f638, 
    new_name=0x8287100 "test", del=0, err=0x828d31c) at tny-camel-folder.c:1543
#9  0xb7cb405f in tny_camel_folder_copy (self=0x824f748, into=0x824f638, 
    new_name=0x8287100 "test", del=0, err=0x828d31c) at tny-camel-folder.c:1415
#10 0xb7b2e588 in tny_folder_copy (self=0x824f748, into=0x824f638, new_name=0x8287100 "test", 
    del=0, err=0x828d31c) at tny-folder.c:313

03/16/07 16:45:37: Modified by anonymous

  • status changed from new to closed.
  • resolution set to fixed.

Add/Change #36 (IDLE not working well when copying folders)




Change Properties
Action