Sean,
Your bug should be reported separately. And it's not triggered by
db_get_msgflag. Your trace doesn't match the query. Looks more like
db_search to me. A TRACE_LEVEL=5 syslog trace for the pid involved would
be best. I need the exact imap-command.
[EMAIL PROTECTED] wrote:
A BUGNOTE has been added to this bug.
======================================================================
http://dbmail.org/mantis/bug_view_advanced_page.php?bug_id=0000091
======================================================================
Reported By: xing
Assigned To:
======================================================================
Project: DBMail
Bug ID: 91
Category: Database layer
Reproducibility: N/A
Severity: major
Priority: normal
Status: confirmed
======================================================================
Date Submitted: 15-Sep-04 20:33 CEST
Last Modified: 05-Nov-04 20:26 CET
======================================================================
Summary: Possible infinite loop within either POP3/IMAP
code,
Description:
I noticed my dbmail server's mysql CPU avergaing 75%+ which is out of the
normal by a landslide. After investigation I noticed a infinite loop type
query sent from likely the DBMAIL pop3/imap process by looking at the db
login name and query.
The following mysql query is executed in a infinite loop by a dbmail
process (again I don't know which one).
----------------------------
UPDATE messages set
status=17794368026245745520 WHERE message_idnr=17794367648288623384 AND
status<2
----------------------------
======================================================================
----------------------------------------------------------------------
xing - 15-Sep-04 20:42 CEST
----------------------------------------------------------------------
Confirmed dbmail POP3 daemon as the origin of the queries.
Killing all imapd processes had no effect.
Killing all pop3d processes stopped the infinite loop query.
----------------------------------------------------------------------
aaron - 07-Oct-04 00:58 CEST
----------------------------------------------------------------------
I see this with IMAPD lately. Not a clue at all what's bringing it on :-\
----------------------------------------------------------------------
seanc - 05-Nov-04 16:14 CET
----------------------------------------------------------------------
When uploading a message from a local mailbox to the server, I can trigger
this 100% of the time. It's devatsating to the database... it loops
infinitely with the following two queries:
[EMAIL PROTECTED]: [local] 952 2004-11-05 07:05:23 PST LOG: statement:
SELECT message_idnr FROM dbmail_messages WHERE mailbox_idnr = '5' AND
status < '2' AND unique_id!='' AND recent_flag=1
[EMAIL PROTECTED]: [local] 952 2004-11-05 07:05:23 PST LOG: duration:
0.880 ms
[EMAIL PROTECTED]: [local] 952 2004-11-05 07:05:23 PST LOG: statement:
SELECT lock.messageblk FROM dbmail_messageblks block, dbmail_messages msg
WHERE block.physmessage_id = msg.physmessage_id AND msg.message_idnr =
'118' ORDER BY block.messageblk_idnr
[EMAIL PROTECTED]: [local] 952 2004-11-05 07:05:23 PST LOG: duration:
0.900 ms
Is there a workaround/fix for this bug that can be applied to 2.0.0? My
users are constantly doing this and on an amd64, it doesn't take too long
to generate 500GB of pgsql log data if the database goes unchecked
overnight. :)
----------------------------------------------------------------------
jnorell - 05-Nov-04 17:36 CET
----------------------------------------------------------------------
seanc: your problem is in copying a mailbox to the server - using
mailbox2dbmail? That's going to be a different problem than the infinite
loop this ticket is about (in pop3d).
[EMAIL PROTECTED]: [local] 952 2004-11-05 07:05:23 PST LOG:
statement:
SELECT lock.messageblk FROM dbmail_messageblks block, dbmail_messages
msg
^^^^ is that really "lock," not "block"? (ought to get an
error
on the query if so)
WHERE block.physmessage_id = msg.physmessage_id AND msg.message_idnr =
'118' ORDER BY block.messageblk_idnr
[EMAIL PROTECTED]: [local] 952 2004-11-05 07:05:23 PST LOG:
duration:
0.900 ms
----------------------------------------------------------------------
seanc - 05-Nov-04 20:26 CET
----------------------------------------------------------------------
That's correct... I must have deleted the 'b' when pasting my message. It
seems as though the db_get_msgflag() and db_get_main_header() are getting
called in an infinite loop via _ic_fetch(). What could cause such a
problem?
Bug History
Date Modified Username Field Change
======================================================================
15-Sep-04 20:33xing New Bug
15-Sep-04 20:42xing Bugnote Added: 0000264
07-Oct-04 00:58aaron Bugnote Added: 0000288
07-Oct-04 00:59aaron Status new => confirmed
05-Nov-04 16:14seanc Bugnote Added: 0000342
05-Nov-04 16:14seanc Bug Monitored: seanc
05-Nov-04 17:36jnorell Bugnote Added: 0000343
05-Nov-04 20:26seanc Bugnote Added: 0000344
======================================================================
_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev
--
________________________________________________________________
Paul Stevens mailto:[EMAIL PROTECTED]
NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED]
The Netherlands________________________________http://www.nfg.nl