Mailing List Archive

unable to read mail on 2.x
Hi All,

I'm testing the 2.x codebase. I've migrated a copy of my dbmail-1 db.

I'm seeing some strange things. Mostly though I'm seeing lots of Broken
pipe on write stream. These are rather common on my 1.2.3 installations
as well, but on 2.x-cvs they make the imap server unusable.

Any clues ?


dbmail/imap4d[3961]: IMAPClientHandler(): Executing command status...
dbmail/imap4d[3961]: db.c,db_findmailbox: looking for mailbox with FQN
[Drafts].
dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [SELECT
mailbox_idnr FROM mailboxes WHERE name='Drafts' AND owner_idnr='1']
dbmail/imap4d[3961]: db.c,db_acl_has_right: checking ACL for user [1] on
mailbox [58]
dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [.SELECT
mailbox_idnr FROM mailboxes WHERE mailbox_idnr = '58' AND owner_idnr = '1']
dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [SELECT
permission,seen_flag,answered_flag,deleted_flag,flagged_flag,recent_flag,draft_flag
FROM mailboxes WHERE mailbox_idnr = '58']
Feb 24 12:57:31 shiko dbmail/imap4d[3961]: dbmysql.c,db_query: executing
query [.SELECT message_idnr, seen_flag, recent_flag FROM messages WHERE
mailbox_idnr = '58' AND status < 2 AND unique_id != '' ORDER BY
message_idnr ASC]
Feb 24 12:57:31 shiko dbmail/imap4d[3961]: dbmysql.c,db_query: executing
query [SELECT MAX(message_idnr) FROM messages WHERE unique_id != '']
Feb 24 12:57:31 shiko dbmail/imap4d[3961]: IMAPClientHandler(): Finished
command status
Feb 24 12:57:31 shiko dbmail/imap4d[3961]: IMAPClientHandler(): line
read for PID 3961
Feb 24 12:57:31 shiko dbmail/imap4d[3961]: COMMAND: [2]
Feb 24 12:57:32 shiko dbmail/imap4d[3961]: IMAPClientHandler(): error
[Broken pipe] on write-stream
Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask(): client
handling complete, closing streams
Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask():
connection closed
Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask(): waiting
for connection



--
________________________________________________________________
Paul Stevens paul@nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl
Re: unable to read mail on 2.x [ In reply to ]
I haven't seen anything like this here. It looks like a bad TCP
connection to me. Have you tried this on other hardware/OS-version?

Ilja

Paul J Stevens wrote:

> Hi All,
>
> I'm testing the 2.x codebase. I've migrated a copy of my dbmail-1 db.
>
> I'm seeing some strange things. Mostly though I'm seeing lots of Broken
> pipe on write stream. These are rather common on my 1.2.3 installations
> as well, but on 2.x-cvs they make the imap server unusable.
>
> Any clues ?
>
>
> dbmail/imap4d[3961]: IMAPClientHandler(): Executing command status...
> dbmail/imap4d[3961]: db.c,db_findmailbox: looking for mailbox with FQN
> [Drafts].
> dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [SELECT
> mailbox_idnr FROM mailboxes WHERE name='Drafts' AND owner_idnr='1']
> dbmail/imap4d[3961]: db.c,db_acl_has_right: checking ACL for user [1] on
> mailbox [58]
> dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [.SELECT
> mailbox_idnr FROM mailboxes WHERE mailbox_idnr = '58' AND owner_idnr = '1']
> dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [SELECT
> permission,seen_flag,answered_flag,deleted_flag,flagged_flag,recent_flag,draft_flag
> FROM mailboxes WHERE mailbox_idnr = '58']
> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: dbmysql.c,db_query: executing
> query [.SELECT message_idnr, seen_flag, recent_flag FROM messages WHERE
> mailbox_idnr = '58' AND status < 2 AND unique_id != '' ORDER BY
> message_idnr ASC]
> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: dbmysql.c,db_query: executing
> query [SELECT MAX(message_idnr) FROM messages WHERE unique_id != '']
> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: IMAPClientHandler(): Finished
> command status
> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: IMAPClientHandler(): line
> read for PID 3961
> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: COMMAND: [2]
> Feb 24 12:57:32 shiko dbmail/imap4d[3961]: IMAPClientHandler(): error
> [Broken pipe] on write-stream
> Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask(): client
> handling complete, closing streams
> Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask():
> connection closed
> Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask(): waiting
> for connection
>
>
>
Re: unable to read mail on 2.x [ In reply to ]
I'm guessing it's a client related issue.

This occurs when I access dbmail-2 from a thunderbird-0.5 client that
has several accounts with many folders configured.

I've also moved my dbmail-2 imap server around to a UML instance on the
same machine as my dbmail-1 server, and also to a totally different
machine in the same network.

In all cases: thunderbird triggers the closed pipe error, whereas
squirrelmail and ilohamail work just fine.

I've finally tested this with mozilla-1.6 with only one account: same
problem. One additional thing I noticed though: on first accessing a new
account, mozilla and thunderbird hang while 'Getting folder ACL'.

Closing and restarting the client gives me access to the INBOX, but no
other folders. weird...

I've tested with balsa and with sylpheed. Oops. Same broken-pipe. No
problems reading email though.

Balsa sez:

Feb 24 16:14:41 sarge dbmail/imap4d[8522]: db.c,db_acl_has_right:
checking ACL for user [1] on mailbox [1]
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmysql.c,db_query: executing
query [.SELECT mailbox_idnr FROM mailboxes WHERE mailbox_idnr = '1' AND
owner_idnr = '1']
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: Fetching msgID 266371 (fetch
num 266372)
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmysql.c,db_query: executing
query [SELECT physmessage_id FROM messages WHERE message_idnr = '266371']
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmysql.c,db_query: executing
query [.SELECT messageblk FROM messageblks WHERE physmessage_id =
'266371' ORDER BY messageblk_idnr]
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: db_start_msg(): starting,
stopbound: '<null>'
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: mime_readheader(): entering
mime loop
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: mime_readheader(): found
double newline; header size: 35 lines
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: db_start_msg(): found
singlepart msg
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmsgbuf.c,db_update_msgbuf:
update msgbuf_buf updating 9105330798592, 1627792605184, 1627792605184,
578557108660731904
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmsgbuf.c,db_update_msgbuf:
update msgbuf: entire fit
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmsgbuf.c,db_update_msgbuf
update msgbuf succes NOMORE
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: db_start_msg(): exit
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmysql.c,db_query: executing
query [SELECT physmessage_id FROM messages WHERE message_idnr = '266371']
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmsgbuf.c,db_dump_range:
Dumping range: (1,0) - (1,378)
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmysql.c,db_query: executing
query [.SELECT messageblk FROM messageblks WHERE physmessage_id =
'266371' ORDER BY messageblk_idnr]
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmysql.c,db_query: executing
query [.SELECT seen_flag FROM messages WHERE message_idnr = '266371' AND
status< '2' AND unique_id != '' AND mailbox_idnr = '1']
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: dbmysql.c,db_query: executing
query [.SELECT seen_flag FROM messages WHERE message_idnr = '266371' AND
status< '2' AND unique_id != '' AND mailbox_idnr = '1']
Feb 24 16:14:41 sarge dbmail/imap4d[8522]: IMAPClientHandler(): Finished
command uid
Feb 24 16:14:47 sarge dbmail/imap4d[8521]: IMAPClientHandler(): line
read for PID 8521
Feb 24 16:14:47 sarge dbmail/imap4d[8521]: COMMAND: [147]
Feb 24 16:14:47 sarge dbmail/imap4d[8521]: IMAPClientHandler(): line
read for PID 8521
Feb 24 16:14:47 sarge dbmail/imap4d[8521]: COMMAND: [147]
Feb 24 16:14:47 sarge dbmail/imap4d[8521]: IMAPClientHandler(): error
[Broken pipe] on write-stream
Feb 24 16:14:47 sarge dbmail/imap4d[8521]: PerformChildTask(): client
handling complete, closing streams
Feb 24 16:14:47 sarge dbmail/imap4d[8521]: PerformChildTask():
connection closed
Feb 24 16:14:47 sarge dbmail/imap4d[8521]: PerformChildTask(): waiting
for connection




Anyone seeing similar behaviour?




Ilja Booij wrote:
> I haven't seen anything like this here. It looks like a bad TCP
> connection to me. Have you tried this on other hardware/OS-version?
>
> Ilja
>
> Paul J Stevens wrote:
>
>> Hi All,
>>
>> I'm testing the 2.x codebase. I've migrated a copy of my dbmail-1 db.
>>
>> I'm seeing some strange things. Mostly though I'm seeing lots of
>> Broken pipe on write stream. These are rather common on my 1.2.3
>> installations as well, but on 2.x-cvs they make the imap server unusable.
>>
>> Any clues ?
>>
>>
>> dbmail/imap4d[3961]: IMAPClientHandler(): Executing command status...
>> dbmail/imap4d[3961]: db.c,db_findmailbox: looking for mailbox with FQN
>> [Drafts].
>> dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [SELECT
>> mailbox_idnr FROM mailboxes WHERE name='Drafts' AND owner_idnr='1']
>> dbmail/imap4d[3961]: db.c,db_acl_has_right: checking ACL for user [1]
>> on mailbox [58]
>> dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [.SELECT
>> mailbox_idnr FROM mailboxes WHERE mailbox_idnr = '58' AND owner_idnr =
>> '1']
>> dbmail/imap4d[3961]: dbmysql.c,db_query: executing query [SELECT
>> permission,seen_flag,answered_flag,deleted_flag,flagged_flag,recent_flag,draft_flag
>> FROM mailboxes WHERE mailbox_idnr = '58']
>> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: dbmysql.c,db_query:
>> executing query [.SELECT message_idnr, seen_flag, recent_flag FROM
>> messages WHERE mailbox_idnr = '58' AND status < 2 AND unique_id != ''
>> ORDER BY message_idnr ASC]
>> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: dbmysql.c,db_query:
>> executing query [SELECT MAX(message_idnr) FROM messages WHERE
>> unique_id != '']
>> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: IMAPClientHandler():
>> Finished command status
>> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: IMAPClientHandler(): line
>> read for PID 3961
>> Feb 24 12:57:31 shiko dbmail/imap4d[3961]: COMMAND: [2]
>> Feb 24 12:57:32 shiko dbmail/imap4d[3961]: IMAPClientHandler(): error
>> [Broken pipe] on write-stream
>> Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask(): client
>> handling complete, closing streams
>> Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask():
>> connection closed
>> Feb 24 12:57:32 shiko dbmail/imap4d[3961]: PerformChildTask(): waiting
>> for connection
>>
>>
>>
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>

--
________________________________________________________________
Paul Stevens paul@nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl
RE: unable to read mail on 2.x [ In reply to ]
This sounds very similar to the problems I am having with
Mozilla/Thunderbird and 2.0rc2. Only access to the INBOX, doesn't check for
mail when I tell it to, etc. So far my only solution has been to use Outlook
:-/

-----Original Message-----
From: dbmail-dev-admin@dbmail.org [mailto:dbmail-dev-admin@dbmail.org] On
Behalf Of Paul J Stevens
Sent: Tuesday, February 24, 2004 8:18 AM
To: dbmail-dev@dbmail.org
Subject: Re: [Dbmail-dev] unable to read mail on 2.x

I'm guessing it's a client related issue.

This occurs when I access dbmail-2 from a thunderbird-0.5 client that
has several accounts with many folders configured.

I've also moved my dbmail-2 imap server around to a UML instance on the
same machine as my dbmail-1 server, and also to a totally different
machine in the same network.

In all cases: thunderbird triggers the closed pipe error, whereas
squirrelmail and ilohamail work just fine.

I've finally tested this with mozilla-1.6 with only one account: same
problem. One additional thing I noticed though: on first accessing a new
account, mozilla and thunderbird hang while 'Getting folder ACL'.

Closing and restarting the client gives me access to the INBOX, but no
other folders. weird...

I've tested with balsa and with sylpheed. Oops. Same broken-pipe. No
problems reading email though.

...
RE: unable to read mail on 2.x [ In reply to ]
I see this with Mozilla 1.6, too. In fact, it was driving me nuts when I was
testing my latest patch because I thought I had ruined the delivery chain...
only to try KMail instead and discover that things really were working ;-)

Someone should sit down with a tcpdump or ethereal-type protocol analyzer and
try getting to the bottom of this! KMail does not support the Namespace
extension, and might not support ACL either. So something about one or both
must be a little bit buggered, either by us or Mozilla; only a true patch will
tell :-)

Aaron


""Blake Mitchell"" <blake@barkingspoon.com> said:

> This sounds very similar to the problems I am having with
> Mozilla/Thunderbird and 2.0rc2. Only access to the INBOX, doesn't check for
> mail when I tell it to, etc. So far my only solution has been to use Outlook
> :-/
>
> -----Original Message-----
> From: dbmail-dev-admin@dbmail.org [mailto:dbmail-dev-admin@dbmail.org] On
> Behalf Of Paul J Stevens
> Sent: Tuesday, February 24, 2004 8:18 AM
> To: dbmail-dev@dbmail.org
> Subject: Re: [Dbmail-dev] unable to read mail on 2.x
>
> I'm guessing it's a client related issue.
>
> This occurs when I access dbmail-2 from a thunderbird-0.5 client that
> has several accounts with many folders configured.
>
> I've also moved my dbmail-2 imap server around to a UML instance on the
> same machine as my dbmail-1 server, and also to a totally different
> machine in the same network.
>
> In all cases: thunderbird triggers the closed pipe error, whereas
> squirrelmail and ilohamail work just fine.
>
> I've finally tested this with mozilla-1.6 with only one account: same
> problem. One additional thing I noticed though: on first accessing a new
> account, mozilla and thunderbird hang while 'Getting folder ACL'.
>
> Closing and restarting the client gives me access to the INBOX, but no
> other folders. weird...
>
> I've tested with balsa and with sylpheed. Oops. Same broken-pipe. No
> problems reading email though.
>
> ...
>
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>



--
Re: unable to read mail on 2.x [ In reply to ]
I don't really think its the acl stuff that's causing this. 1.2.3 has
similar problems with mozilla type clients, it just got much worse on 2.x.

I'll investigate and see what I can come up with.


Aaron Stone wrote:
> I see this with Mozilla 1.6, too. In fact, it was driving me nuts when I was
> testing my latest patch because I thought I had ruined the delivery chain...
> only to try KMail instead and discover that things really were working ;-)
>
> Someone should sit down with a tcpdump or ethereal-type protocol analyzer and
> try getting to the bottom of this! KMail does not support the Namespace
> extension, and might not support ACL either. So something about one or both
> must be a little bit buggered, either by us or Mozilla; only a true patch will
> tell :-)
>
> Aaron
>
>
> ""Blake Mitchell"" <blake@barkingspoon.com> said:
>
>
>>This sounds very similar to the problems I am having with
>>Mozilla/Thunderbird and 2.0rc2. Only access to the INBOX, doesn't check for
>>mail when I tell it to, etc. So far my only solution has been to use Outlook
>>:-/
>>
>>-----Original Message-----
>>From: dbmail-dev-admin@dbmail.org [mailto:dbmail-dev-admin@dbmail.org] On
>>Behalf Of Paul J Stevens
>>Sent: Tuesday, February 24, 2004 8:18 AM
>>To: dbmail-dev@dbmail.org
>>Subject: Re: [Dbmail-dev] unable to read mail on 2.x
>>
>>I'm guessing it's a client related issue.
>>
>>This occurs when I access dbmail-2 from a thunderbird-0.5 client that
>>has several accounts with many folders configured.
>>
>>I've also moved my dbmail-2 imap server around to a UML instance on the
>>same machine as my dbmail-1 server, and also to a totally different
>>machine in the same network.
>>
>>In all cases: thunderbird triggers the closed pipe error, whereas
>>squirrelmail and ilohamail work just fine.
>>
>>I've finally tested this with mozilla-1.6 with only one account: same
>>problem. One additional thing I noticed though: on first accessing a new
>>account, mozilla and thunderbird hang while 'Getting folder ACL'.
>>
>>Closing and restarting the client gives me access to the INBOX, but no
>>other folders. weird...
>>
>>I've tested with balsa and with sylpheed. Oops. Same broken-pipe. No
>>problems reading email though.
>>
>>...
>>
>>_______________________________________________
>>Dbmail-dev mailing list
>>Dbmail-dev@dbmail.org
>>http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>>
>
>
>
>

--
________________________________________________________________
Paul Stevens paul@nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl
Re: unable to read mail on 2.x [ In reply to ]
As promised: I've zoomed in on a tcp session that goes haywire.

I've attached such a session in a pcap file: see attachment.

Looks like mozilla initiates an active close after receiving a 'OK
STATUS completed' but dbmail failes to properly close the session,
leading to the client sending RST packets that trigger the broken pipe
problem.

I guess serverchild.c needs some serious refactoring... :-)


Paul J Stevens wrote:
> I don't really think its the acl stuff that's causing this. 1.2.3 has
> similar problems with mozilla type clients, it just got much worse on 2.x.
>
> I'll investigate and see what I can come up with.
>
>
> Aaron Stone wrote:
>
>> I see this with Mozilla 1.6, too. In fact, it was driving me nuts when
>> I was
>> testing my latest patch because I thought I had ruined the delivery
>> chain...
>> only to try KMail instead and discover that things really were working
>> ;-)
>>
>> Someone should sit down with a tcpdump or ethereal-type protocol
>> analyzer and
>> try getting to the bottom of this! KMail does not support the Namespace
>> extension, and might not support ACL either. So something about one or
>> both
>> must be a little bit buggered, either by us or Mozilla; only a true
>> patch will
>> tell :-)
>>
>> Aaron
>>
>>
>> ""Blake Mitchell"" <blake@barkingspoon.com> said:
>>
>>
>>> This sounds very similar to the problems I am having with
>>> Mozilla/Thunderbird and 2.0rc2. Only access to the INBOX, doesn't
>>> check for
>>> mail when I tell it to, etc. So far my only solution has been to use
>>> Outlook
>>> :-/
>>>
>>> -----Original Message-----
>>> From: dbmail-dev-admin@dbmail.org
>>> [mailto:dbmail-dev-admin@dbmail.org] On
>>> Behalf Of Paul J Stevens
>>> Sent: Tuesday, February 24, 2004 8:18 AM
>>> To: dbmail-dev@dbmail.org
>>> Subject: Re: [Dbmail-dev] unable to read mail on 2.x
>>>
>>> I'm guessing it's a client related issue.
>>>
>>> This occurs when I access dbmail-2 from a thunderbird-0.5 client that
>>> has several accounts with many folders configured.
>>>
>>> I've also moved my dbmail-2 imap server around to a UML instance on
>>> the same machine as my dbmail-1 server, and also to a totally
>>> different machine in the same network.
>>>
>>> In all cases: thunderbird triggers the closed pipe error, whereas
>>> squirrelmail and ilohamail work just fine.
>>>
>>> I've finally tested this with mozilla-1.6 with only one account: same
>>> problem. One additional thing I noticed though: on first accessing a
>>> new account, mozilla and thunderbird hang while 'Getting folder ACL'.
>>>
>>> Closing and restarting the client gives me access to the INBOX, but
>>> no other folders. weird...
>>>
>>> I've tested with balsa and with sylpheed. Oops. Same broken-pipe. No
>>> problems reading email though.
>>>
>>> ...
>>>
>>> _______________________________________________
>>> Dbmail-dev mailing list
>>> Dbmail-dev@dbmail.org
>>> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>>>
>>
>>
>>
>>
>

--
________________________________________________________________
Paul Stevens paul@nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl
Re: unable to read mail on 2.x [ In reply to ]
What's an active close?

Going off on a tangent, I started reading over severchild.c to see what I
could see, and I noticed this big FIXME towards the end of PerformChildTask()

db_disconnect();
auth_disconnect();
connected = 0; /* FIXME a signal between this line and the previous one
* would screw things up. Would like to have all this in
* db_disconnect() making 'connected' obsolete
*/

To prevent the signal problem, create a noop function and set it as the
universal signal handler right before the disconnection code. Any signals
coming in during the "critical shutdown zone" would basically be ignored.

Right, and now back to our regularly scheduled bug hunt ;-)

Aaron


Paul J Stevens <paul@nfg.nl> said:

> As promised: I've zoomed in on a tcp session that goes haywire.
>
> I've attached such a session in a pcap file: see attachment.
>
> Looks like mozilla initiates an active close after receiving a 'OK
> STATUS completed' but dbmail failes to properly close the session,
> leading to the client sending RST packets that trigger the broken pipe
> problem.
>
> I guess serverchild.c needs some serious refactoring... :-)
>
>
> Paul J Stevens wrote:
> > I don't really think its the acl stuff that's causing this. 1.2.3 has
> > similar problems with mozilla type clients, it just got much worse on 2.x.
> >
> > I'll investigate and see what I can come up with.
> >
> >
> > Aaron Stone wrote:
> >
> >> I see this with Mozilla 1.6, too. In fact, it was driving me nuts when
> >> I was
> >> testing my latest patch because I thought I had ruined the delivery
> >> chain...
> >> only to try KMail instead and discover that things really were working
> >> ;-)
> >>
> >> Someone should sit down with a tcpdump or ethereal-type protocol
> >> analyzer and
> >> try getting to the bottom of this! KMail does not support the Namespace
> >> extension, and might not support ACL either. So something about one or
> >> both
> >> must be a little bit buggered, either by us or Mozilla; only a true
> >> patch will
> >> tell :-)
> >>
> >> Aaron
> >>
> >>
> >> ""Blake Mitchell"" <blake@barkingspoon.com> said:
> >>
> >>
> >>> This sounds very similar to the problems I am having with
> >>> Mozilla/Thunderbird and 2.0rc2. Only access to the INBOX, doesn't
> >>> check for
> >>> mail when I tell it to, etc. So far my only solution has been to use
> >>> Outlook
> >>> :-/
> >>>
> >>> -----Original Message-----
> >>> From: dbmail-dev-admin@dbmail.org
> >>> [mailto:dbmail-dev-admin@dbmail.org] On
> >>> Behalf Of Paul J Stevens
> >>> Sent: Tuesday, February 24, 2004 8:18 AM
> >>> To: dbmail-dev@dbmail.org
> >>> Subject: Re: [Dbmail-dev] unable to read mail on 2.x
> >>>
> >>> I'm guessing it's a client related issue.
> >>>
> >>> This occurs when I access dbmail-2 from a thunderbird-0.5 client that
> >>> has several accounts with many folders configured.
> >>>
> >>> I've also moved my dbmail-2 imap server around to a UML instance on
> >>> the same machine as my dbmail-1 server, and also to a totally
> >>> different machine in the same network.
> >>>
> >>> In all cases: thunderbird triggers the closed pipe error, whereas
> >>> squirrelmail and ilohamail work just fine.
> >>>
> >>> I've finally tested this with mozilla-1.6 with only one account: same
> >>> problem. One additional thing I noticed though: on first accessing a
> >>> new account, mozilla and thunderbird hang while 'Getting folder ACL'.
> >>>
> >>> Closing and restarting the client gives me access to the INBOX, but
> >>> no other folders. weird...
> >>>
> >>> I've tested with balsa and with sylpheed. Oops. Same broken-pipe. No
> >>> problems reading email though.
> >>>
> >>> ...
> >>>
> >>> _______________________________________________
> >>> Dbmail-dev mailing list
> >>> Dbmail-dev@dbmail.org
> >>> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> >>>
> >>
> >>
> >>
> >>
> >
>
> --
> ________________________________________________________________
> Paul Stevens paul@nfg.nl
> NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
> The Netherlands_______________________________________www.nfg.nl
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>



--
Re: unable to read mail on 2.x [ In reply to ]
I've done some more testing. It's real simple to trigger this bug:
simply telnet on port 143 and quit without doing anything.

Even though the client sends a FIN,ACK to the server, the server still
responds with * BAD No tag specified. It should respond by closing the
streams instead.

Doesn't solve the problems with mozilla though :-(

Aaron Stone wrote:
> What's an active close?
>
> Going off on a tangent, I started reading over severchild.c to see what I
> could see, and I noticed this big FIXME towards the end of PerformChildTask()
>
> db_disconnect();
> auth_disconnect();
> connected = 0; /* FIXME a signal between this line and the previous one
> * would screw things up. Would like to have all this in
> * db_disconnect() making 'connected' obsolete
> */
>
> To prevent the signal problem, create a noop function and set it as the
> universal signal handler right before the disconnection code. Any signals
> coming in during the "critical shutdown zone" would basically be ignored.
>
> Right, and now back to our regularly scheduled bug hunt ;-)
>
> Aaron
>
>
> Paul J Stevens <paul@nfg.nl> said:
>
>
>>As promised: I've zoomed in on a tcp session that goes haywire.
>>
>>I've attached such a session in a pcap file: see attachment.
>>
>>Looks like mozilla initiates an active close after receiving a 'OK
>>STATUS completed' but dbmail failes to properly close the session,
>>leading to the client sending RST packets that trigger the broken pipe
>>problem.
>>
>>I guess serverchild.c needs some serious refactoring... :-)
>>
>>
>>Paul J Stevens wrote:
>>
>>>I don't really think its the acl stuff that's causing this. 1.2.3 has
>>>similar problems with mozilla type clients, it just got much worse on 2.x.
>>>
>>>I'll investigate and see what I can come up with.
>>>
>>>
>>>Aaron Stone wrote:
>>>
>>>
>>>>I see this with Mozilla 1.6, too. In fact, it was driving me nuts when
>>>>I was
>>>>testing my latest patch because I thought I had ruined the delivery
>>>>chain...
>>>>only to try KMail instead and discover that things really were working
>>>>;-)
>>>>
>>>>Someone should sit down with a tcpdump or ethereal-type protocol
>>>>analyzer and
>>>>try getting to the bottom of this! KMail does not support the Namespace
>>>>extension, and might not support ACL either. So something about one or
>>>>both
>>>>must be a little bit buggered, either by us or Mozilla; only a true
>>>>patch will
>>>>tell :-)
>>>>
>>>>Aaron
>>>>
>>>>
>>>>""Blake Mitchell"" <blake@barkingspoon.com> said:
>>>>
>>>>
>>>>
>>>>>This sounds very similar to the problems I am having with
>>>>>Mozilla/Thunderbird and 2.0rc2. Only access to the INBOX, doesn't
>>>>>check for
>>>>>mail when I tell it to, etc. So far my only solution has been to use
>>>>>Outlook
>>>>>:-/
>>>>>
>>>>>-----Original Message-----
>>>>>From: dbmail-dev-admin@dbmail.org
>>>>>[mailto:dbmail-dev-admin@dbmail.org] On
>>>>>Behalf Of Paul J Stevens
>>>>>Sent: Tuesday, February 24, 2004 8:18 AM
>>>>>To: dbmail-dev@dbmail.org
>>>>>Subject: Re: [Dbmail-dev] unable to read mail on 2.x
>>>>>
>>>>>I'm guessing it's a client related issue.
>>>>>
>>>>>This occurs when I access dbmail-2 from a thunderbird-0.5 client that
>>>>>has several accounts with many folders configured.
>>>>>
>>>>>I've also moved my dbmail-2 imap server around to a UML instance on
>>>>>the same machine as my dbmail-1 server, and also to a totally
>>>>>different machine in the same network.
>>>>>
>>>>>In all cases: thunderbird triggers the closed pipe error, whereas
>>>>>squirrelmail and ilohamail work just fine.
>>>>>
>>>>>I've finally tested this with mozilla-1.6 with only one account: same
>>>>>problem. One additional thing I noticed though: on first accessing a
>>>>>new account, mozilla and thunderbird hang while 'Getting folder ACL'.
>>>>>
>>>>>Closing and restarting the client gives me access to the INBOX, but
>>>>>no other folders. weird...
>>>>>
>>>>>I've tested with balsa and with sylpheed. Oops. Same broken-pipe. No
>>>>>problems reading email though.
>>>>>
>>>>>...
>>>>>
>>>>>_______________________________________________
>>>>>Dbmail-dev mailing list
>>>>>Dbmail-dev@dbmail.org
>>>>>http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>>>>>
>>>>
>>>>
>>>>
>>>>
>>--
>> ________________________________________________________________
>> Paul Stevens paul@nfg.nl
>> NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
>> The Netherlands_______________________________________www.nfg.nl
>>_______________________________________________
>>Dbmail-dev mailing list
>>Dbmail-dev@dbmail.org
>>http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>>
>
>
>
>

--
________________________________________________________________
Paul Stevens paul@nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl
Re: unable to read mail on 2.x [ In reply to ]
Ive been doing some more testing and debugging on this problem. I think
the problem is in imap4.c

Client issues a close.
Server continues reading and writing on closed streams.
Client responds with RST packets.
Server barfs on EPIPE.

There is no check in the code before each read/write on whether the
stream is still open. I would guess that all read/write actions on the
streams should check their state.

Perhaps the fgets and fprintf call should be moved to wrapper calls that
do proper error handling. Any takers ?


Paul J Stevens wrote:
> I've done some more testing. It's real simple to trigger this bug:
> simply telnet on port 143 and quit without doing anything.
>
> Even though the client sends a FIN,ACK to the server, the server still
> responds with * BAD No tag specified. It should respond by closing the
> streams instead.
>
> Doesn't solve the problems with mozilla though :-(
>
> Aaron Stone wrote:
>
>> What's an active close?
>>
>> Going off on a tangent, I started reading over severchild.c to see what I
>> could see, and I noticed this big FIXME towards the end of
>> PerformChildTask()
>>
>> db_disconnect();
>> auth_disconnect();
>> connected = 0; /* FIXME a signal between this line and the
>> previous one
>> * would screw things up. Would like to have all
>> this in
>> * db_disconnect() making 'connected' obsolete
>> */
>>
>> To prevent the signal problem, create a noop function and set it as the
>> universal signal handler right before the disconnection code. Any signals
>> coming in during the "critical shutdown zone" would basically be ignored.
>>
>> Right, and now back to our regularly scheduled bug hunt ;-)
>>
>> Aaron
>>
>>
>> Paul J Stevens <paul@nfg.nl> said:
>>
>>
>>> As promised: I've zoomed in on a tcp session that goes haywire.
>>>
>>> I've attached such a session in a pcap file: see attachment.
>>>
>>> Looks like mozilla initiates an active close after receiving a 'OK
>>> STATUS completed' but dbmail failes to properly close the session,
>>> leading to the client sending RST packets that trigger the broken
>>> pipe problem.
>>>
>>> I guess serverchild.c needs some serious refactoring... :-)
>>>
>>>
>>> Paul J Stevens wrote:
>>>
>>>> I don't really think its the acl stuff that's causing this. 1.2.3
>>>> has similar problems with mozilla type clients, it just got much
>>>> worse on 2.x.
>>>>
>>>> I'll investigate and see what I can come up with.
>>>>
>>>>
>>>> Aaron Stone wrote:
>>>>
>>>>
>>>>> I see this with Mozilla 1.6, too. In fact, it was driving me nuts
>>>>> when I was
>>>>> testing my latest patch because I thought I had ruined the delivery
>>>>> chain...
>>>>> only to try KMail instead and discover that things really were
>>>>> working ;-)
>>>>>
>>>>> Someone should sit down with a tcpdump or ethereal-type protocol
>>>>> analyzer and
>>>>> try getting to the bottom of this! KMail does not support the
>>>>> Namespace
>>>>> extension, and might not support ACL either. So something about one
>>>>> or both
>>>>> must be a little bit buggered, either by us or Mozilla; only a true
>>>>> patch will
>>>>> tell :-)
>>>>>
>>>>> Aaron
>>>>>
>>>>>
>>>>> ""Blake Mitchell"" <blake@barkingspoon.com> said:
>>>>>
>>>>>
>>>>>
>>>>>> This sounds very similar to the problems I am having with
>>>>>> Mozilla/Thunderbird and 2.0rc2. Only access to the INBOX, doesn't
>>>>>> check for
>>>>>> mail when I tell it to, etc. So far my only solution has been to
>>>>>> use Outlook
>>>>>> :-/
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: dbmail-dev-admin@dbmail.org
>>>>>> [mailto:dbmail-dev-admin@dbmail.org] On
>>>>>> Behalf Of Paul J Stevens
>>>>>> Sent: Tuesday, February 24, 2004 8:18 AM
>>>>>> To: dbmail-dev@dbmail.org
>>>>>> Subject: Re: [Dbmail-dev] unable to read mail on 2.x
>>>>>>
>>>>>> I'm guessing it's a client related issue.
>>>>>>
>>>>>> This occurs when I access dbmail-2 from a thunderbird-0.5 client
>>>>>> that has several accounts with many folders configured.
>>>>>>
>>>>>> I've also moved my dbmail-2 imap server around to a UML instance
>>>>>> on the same machine as my dbmail-1 server, and also to a totally
>>>>>> different machine in the same network.
>>>>>>
>>>>>> In all cases: thunderbird triggers the closed pipe error, whereas
>>>>>> squirrelmail and ilohamail work just fine.
>>>>>>
>>>>>> I've finally tested this with mozilla-1.6 with only one account:
>>>>>> same problem. One additional thing I noticed though: on first
>>>>>> accessing a new account, mozilla and thunderbird hang while
>>>>>> 'Getting folder ACL'.
>>>>>>
>>>>>> Closing and restarting the client gives me access to the INBOX,
>>>>>> but no other folders. weird...
>>>>>>
>>>>>> I've tested with balsa and with sylpheed. Oops. Same broken-pipe.
>>>>>> No problems reading email though.
>>>>>>
>>>>>> ...
>>>>>>
>>>>>> _______________________________________________
>>>>>> Dbmail-dev mailing list
>>>>>> Dbmail-dev@dbmail.org
>>>>>> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>> --
>>> ________________________________________________________________
>>> Paul Stevens paul@nfg.nl
>>> NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
>>> The Netherlands_______________________________________www.nfg.nl
>>> _______________________________________________
>>> Dbmail-dev mailing list
>>> Dbmail-dev@dbmail.org
>>> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>>>
>>
>>
>>
>>
>

--
________________________________________________________________
Paul Stevens paul@nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands_______________________________________www.nfg.nl
Re: unable to read mail on 2.x [ In reply to ]
Sure! I don't entirely understand the scope of the problem, though.

Is this something that we can do elegantly in the current code, or do we just
need to hack it a little bit in a few places? For a more thorough solution,
what about an exception framework, with wrappers around fgets and fprintf that
raise exceptions if something goes wrong. Take a look at this:

http://ldeniau.home.cern.ch/ldeniau/html/exception/exception.html

I have already emailed the author to find out what his licensing terms are;
nothing is mentioned on that page or in the code.

Aaron


Paul J Stevens <paul@nfg.nl> said:

> Ive been doing some more testing and debugging on this problem. I think
> the problem is in imap4.c
>
> Client issues a close.
> Server continues reading and writing on closed streams.
> Client responds with RST packets.
> Server barfs on EPIPE.
>
> There is no check in the code before each read/write on whether the
> stream is still open. I would guess that all read/write actions on the
> streams should check their state.
>
> Perhaps the fgets and fprintf call should be moved to wrapper calls that
> do proper error handling. Any takers ?
>
>
> Paul J Stevens wrote:
> > I've done some more testing. It's real simple to trigger this bug:
> > simply telnet on port 143 and quit without doing anything.
> >
> > Even though the client sends a FIN,ACK to the server, the server still
> > responds with * BAD No tag specified. It should respond by closing the
> > streams instead.
> >
> > Doesn't solve the problems with mozilla though :-(
> >
> > Aaron Stone wrote:
> >
> >> What's an active close?
> >>
> >> Going off on a tangent, I started reading over severchild.c to see what I
> >> could see, and I noticed this big FIXME towards the end of
> >> PerformChildTask()
> >>
> >> db_disconnect();
> >> auth_disconnect();
> >> connected = 0; /* FIXME a signal between this line and the
> >> previous one
> >> * would screw things up. Would like to have all
> >> this in
> >> * db_disconnect() making 'connected' obsolete
> >> */
> >>
> >> To prevent the signal problem, create a noop function and set it as the
> >> universal signal handler right before the disconnection code. Any signals
> >> coming in during the "critical shutdown zone" would basically be ignored.
> >>
> >> Right, and now back to our regularly scheduled bug hunt ;-)
> >>
> >> Aaron
> >>
> >>
> >> Paul J Stevens <paul@nfg.nl> said:
> >>
> >>
> >>> As promised: I've zoomed in on a tcp session that goes haywire.
> >>>
> >>> I've attached such a session in a pcap file: see attachment.
> >>>
> >>> Looks like mozilla initiates an active close after receiving a 'OK
> >>> STATUS completed' but dbmail failes to properly close the session,
> >>> leading to the client sending RST packets that trigger the broken
> >>> pipe problem.
> >>>
> >>> I guess serverchild.c needs some serious refactoring... :-)
> >>>
> >>>
> >>> Paul J Stevens wrote:
> >>>
> >>>> I don't really think its the acl stuff that's causing this. 1.2.3
> >>>> has similar problems with mozilla type clients, it just got much
> >>>> worse on 2.x.
> >>>>
> >>>> I'll investigate and see what I can come up with.
> >>>>
> >>>>
> >>>> Aaron Stone wrote:
> >>>>
> >>>>
> >>>>> I see this with Mozilla 1.6, too. In fact, it was driving me nuts
> >>>>> when I was
> >>>>> testing my latest patch because I thought I had ruined the delivery
> >>>>> chain...
> >>>>> only to try KMail instead and discover that things really were
> >>>>> working ;-)
> >>>>>
> >>>>> Someone should sit down with a tcpdump or ethereal-type protocol
> >>>>> analyzer and
> >>>>> try getting to the bottom of this! KMail does not support the
> >>>>> Namespace
> >>>>> extension, and might not support ACL either. So something about one
> >>>>> or both
> >>>>> must be a little bit buggered, either by us or Mozilla; only a true
> >>>>> patch will
> >>>>> tell :-)
> >>>>>
> >>>>> Aaron
> >>>>>
> >>>>>
> >>>>> ""Blake Mitchell"" <blake@barkingspoon.com> said:
> >>>>>
> >>>>>
> >>>>>
> >>>>>> This sounds very similar to the problems I am having with
> >>>>>> Mozilla/Thunderbird and 2.0rc2. Only access to the INBOX, doesn't
> >>>>>> check for
> >>>>>> mail when I tell it to, etc. So far my only solution has been to
> >>>>>> use Outlook
> >>>>>> :-/
> >>>>>>
> >>>>>> -----Original Message-----
> >>>>>> From: dbmail-dev-admin@dbmail.org
> >>>>>> [mailto:dbmail-dev-admin@dbmail.org] On
> >>>>>> Behalf Of Paul J Stevens
> >>>>>> Sent: Tuesday, February 24, 2004 8:18 AM
> >>>>>> To: dbmail-dev@dbmail.org
> >>>>>> Subject: Re: [Dbmail-dev] unable to read mail on 2.x
> >>>>>>
> >>>>>> I'm guessing it's a client related issue.
> >>>>>>
> >>>>>> This occurs when I access dbmail-2 from a thunderbird-0.5 client
> >>>>>> that has several accounts with many folders configured.
> >>>>>>
> >>>>>> I've also moved my dbmail-2 imap server around to a UML instance
> >>>>>> on the same machine as my dbmail-1 server, and also to a totally
> >>>>>> different machine in the same network.
> >>>>>>
> >>>>>> In all cases: thunderbird triggers the closed pipe error, whereas
> >>>>>> squirrelmail and ilohamail work just fine.
> >>>>>>
> >>>>>> I've finally tested this with mozilla-1.6 with only one account:
> >>>>>> same problem. One additional thing I noticed though: on first
> >>>>>> accessing a new account, mozilla and thunderbird hang while
> >>>>>> 'Getting folder ACL'.
> >>>>>>
> >>>>>> Closing and restarting the client gives me access to the INBOX,
> >>>>>> but no other folders. weird...
> >>>>>>
> >>>>>> I've tested with balsa and with sylpheed. Oops. Same broken-pipe.
> >>>>>> No problems reading email though.
> >>>>>>
> >>>>>> ...
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> Dbmail-dev mailing list
> >>>>>> Dbmail-dev@dbmail.org
> >>>>>> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>> --
> >>> ________________________________________________________________
> >>> Paul Stevens paul@nfg.nl
> >>> NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
> >>> The Netherlands_______________________________________www.nfg.nl
> >>> _______________________________________________
> >>> Dbmail-dev mailing list
> >>> Dbmail-dev@dbmail.org
> >>> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
> >>>
> >>
> >>
> >>
> >>
> >
>
> --
> ________________________________________________________________
> Paul Stevens paul@nfg.nl
> NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
> The Netherlands_______________________________________www.nfg.nl
> _______________________________________________
> Dbmail-dev mailing list
> Dbmail-dev@dbmail.org
> http://twister.fastxs.net/mailman/listinfo/dbmail-dev
>



--