Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termination of imap thread hangs when imap-thread is in imap-fetch #331

Closed
hpk42 opened this issue Aug 11, 2019 · 0 comments

Comments

@hpk42
Copy link
Contributor

commented Aug 11, 2019

Sometimes, liveconfig tests fail to terminate / dc_close a context. In the test_send_receive message you then see that 8.25 [imap-ac1] DC_EVENT_INFO(0,'INBOX-fetch started...') and then no message anymore from the imap-ac1 thread. I think that the request typically takes 0.2 seconds and in that time frame at 8.40 main-ac1 terminates imap (closes down the stream) but there is a deadlock somehwere.

8.25 [imap-ac1] DC_EVENT_INFO(0,'dc_perform_imap_jobs starting.')
8.25 [imap-ac1] DC_EVENT_INFO(0,'dc_perform_imap_jobs ended.')
8.25 [imap-ac1] DC_EVENT_INFO(0,'INBOX-fetch started...')
8.34 [imap-ac2] DC_EVENT_INFO(0,'Receiving message INBOX/1...')
8.36 [imap-ac2] DC_EVENT_INFO(0,'set gossiped_timestamp for all chats to 0.')
8.38 [imap-ac2] DC_EVENT_INFO(0,'Message has 1 parts and is assigned to chat #10.')
8.39 [imap-ac2] DC_EVENT_INFO(0,'Interrupting IMAP-IDLE...')
8.39 [imap-ac2] DC_EVENT_INFO(0,'received message 1 has Message-Id: Mr.vlIcTRKnSUT.LNpuUNSfBXv@testrun.org')
8.39 [imap-ac2] DC_EVENT_MSGS_CHANGED(10,10)
****************************** finalizing ******************************
8.39 [MAIN-ac2] DC_EVENT_INFO(0,'No ongoing process to stop.')
8.39 [MAIN-ac2] DC_EVENT_INFO(0,'Interrupting IMAP-IDLE...')
8.39 [MAIN-ac2] DC_EVENT_INFO(0,'Interrupting SMTP-idle...')
8.39 [MAIN-ac2] DC_EVENT_INFO(0,'disconnecting INBOX-watch')
8.39 [smtp-ac2] DC_EVENT_INFO(0,'SMTP-idle ended.')
8.39 [MAIN-ac2] DC_EVENT_INFO(0,'IMAP unsetup_handle starts')
8.39 [smtp-ac2] py-bindings-info(0,'SMTP THREAD FINISHED')
8.39 [MAIN-ac2] DC_EVENT_INFO(0,'IMAP unsetup_handle step 1 (closing down stream).')
8.39 [MAIN-ac2] DC_EVENT_INFO(0,'IMAP unsetup_handle step 2 (acquiring session.lock)')
failed to close connection: Io(Os { code: 32, kind: BrokenPipe, message: "Broken pipe" })
8.39 [MAIN-ac2] DC_EVENT_INFO(0,'IMAP unsetup_handle step 3 (clearing config).')
8.40 [imap-ac2] DC_EVENT_INFO(0,'1 mails read from "INBOX".')
8.40 [imap-ac2] DC_EVENT_INFO(0,'Cannot select folder "INBOX" for fetching.')
8.40 [MAIN-ac2] DC_EVENT_INFO(0,'IMAP unsetup_handle step 4 (disconnected).')
8.40 [imap-ac2] DC_EVENT_INFO(0,'INBOX-fetch done in 11.6150 ms.')
8.40 [MAIN-ac2] DC_EVENT_INFO(0,'disconnecting sentbox-thread')
8.40 [MAIN-ac2] DC_EVENT_INFO(0,'disconnecting mvbox-thread')
8.40 [MAIN-ac2] DC_EVENT_INFO(0,'disconnecting SMTP')
8.40 [MAIN-ac2] DC_EVENT_INFO(0,'Database closed.')
8.40 [imap-ac2] DC_EVENT_ERROR(0,'sql: Failed query_row: Sqlite: Connection closed')
8.40 [MAIN-ac2] DC_EVENT_INFO(0,'No ongoing process to stop.')
8.40 [imap-ac2] DC_EVENT_INFO(0,'INBOX-IDLE will not be started because of waiting jobs.')
8.40 [MAIN-ac2] DC_EVENT_INFO(0,'Interrupting IMAP-IDLE...')
8.40 [MAIN-ac2] DC_EVENT_INFO(0,'Interrupting SMTP-idle...')
8.40 [imap-ac2] py-bindings-info(0,'IMAP THREAD FINISHED')
8.40 [MAIN-ac1] DC_EVENT_INFO(0,'No ongoing process to stop.')
8.40 [MAIN-ac1] DC_EVENT_INFO(0,'Interrupting IMAP-IDLE...')
8.40 [MAIN-ac1] DC_EVENT_INFO(0,'Interrupting SMTP-idle...')
8.40 [MAIN-ac1] DC_EVENT_INFO(0,'disconnecting INBOX-watch')
8.40 [smtp-ac1] DC_EVENT_INFO(0,'SMTP-idle ended.')
8.40 [MAIN-ac1] DC_EVENT_INFO(0,'IMAP unsetup_handle starts')
8.40 [smtp-ac1] py-bindings-info(0,'SMTP THREAD FINISHED')
8.40 [MAIN-ac1] DC_EVENT_INFO(0,'IMAP unsetup_handle step 1 (closing down stream).')
8.40 [MAIN-ac1] DC_EVENT_INFO(0,'IMAP unsetup_handle step 2 (acquiring session.lock)')
<HANGS>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.