A NOTE has been added to this issue. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=561 
====================================================================== 
Reported By:                LordVan
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   561
Category:                   IMAP daemon
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
target:                      
====================================================================== 
Date Submitted:             04-Apr-07 14:17 CEST
Last Modified:              24-Apr-07 11:30 CEST
====================================================================== 
Summary:                    dbmail-imap has lock error described in bug 0000525,
and blocks delivery of new messages until stopped
Description: 
dbmail-imap has lock error described in bug 0000525, and blocks delivery of
new messages until stopped.

seems like because of that /tmp / lock problem it keeps a lock on the db
or something.

when i stop or restart it it delivers the messages in the queue
immediately and when i start it again it works.

====================================================================== 

---------------------------------------------------------------------- 
 LordVan - 04-Apr-07 16:32  
---------------------------------------------------------------------- 
the patch i uploaded (which i got from svn according to someones
suggestion)
seems to help a bit (still no emails are delivered while my imap
connection is open.
though it seemed some of them got delivered when i logged out.
still getting those errors:
** (process:9291): CRITICAL **: dbmail_imap_session_get_msginfo: assertion
`ids && g_tree_nnodes(ids)>0' failed
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
Error Error setting lock. Trying again.
Error Error setting lock. Trying again.

** (process:9298): CRITICAL **: dbmail_imap_session_get_msginfo: assertion
`ids && g_tree_nnodes(ids)>0' failed


any help would be greatly appreciated (imap server timeouts less but still
there .. :( ) 

---------------------------------------------------------------------- 
 aaron - 04-Apr-07 18:17  
---------------------------------------------------------------------- 
Bug http://www.dbmail.org/mantis/view.php?id=525 actually had two bugs in one.
We resolved the short writes error,
and thought we'd gotten the locks. The patch you have is for additional
short write errors, but still doesn't deal with the locks.

You're actually seeing a problem in pool.c, set_lock. What filesystem type
is your /tmp? 

---------------------------------------------------------------------- 
 aaron - 04-Apr-07 18:30  
---------------------------------------------------------------------- 
Some Googleage shows that this "WARNING: there is already a transaction in
progress" comes from PostgreSQL. Do you have any corresponding PG log
files that could help narrow down the source of the transaction errors? 

---------------------------------------------------------------------- 
 LordVan - 05-Apr-07 14:16  
---------------------------------------------------------------------- 
attached logs when postgres was on debug5 logging level .. don't see
anything but maybe u can find sth out from it :) 

also, i just noticed something in my syslog:

<FF>)<D0><C1><F8>^B<89>E<F0>t01<FF><89><U+058D><B6>
Apr  5 11:06:43 lordvan dbmail/smtp[1577]: Warning 500  Permanent Failure
<9C>=^R <8D><83><D8><FE><FF><FF><8D><93><D8><FE><FF>
<FF>)<D0><C1><F8>^B<89>E<F0>t01<FF><89><U+058D><B6>
Apr  5 11:07:12 lordvan dbmail/smtp[1581]: Warning 500  Permanent Failure
<9C>=^R <8D><83><D8><FE><FF><FF><8D><93><D8><FE><FF>
<FF>)<D0><C1><F8>^B<89>E<F0>t01<FF><89><U+058D><B6>
Apr  5 11:07:37 lordvan spamd[24660]: spamd: connection from localhost
[127.0.0.1] at port 57231
Apr  5 11:07:37 lordvan spamd[24660]: spamd: setuid to qscand succeeded
Apr  5 11:07:37 lordvan spamd[24660]: spamd: checking message
<[EMAIL PROTECTED]> for qscand
:210
Apr  5 11:07:37 lordvan spamd[24660]: spamd: clean message (4.2/5.0) for
qscand:210 in 0.5 seconds, 23114 bytes.
Apr  5 11:07:37 lordvan spamd[24660]: spamd: result: . 4 -
ADVANCE_FEE_1,ADVANCE_FEE_2,ADVANCE_FEE_3,HTML_FONT_BIG,HTML_MESSAG
E,HTML_TAG_EXIST_TBODY,MAILTO_TO_SPAM_ADDR,MSGID_FROM_MTA_HEADER,SUBJ_ALL_CAPS,UNPARSEABLE_RELAY
scantime=0.5,size=23114,user=
qscand,uid=210,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=57231,mid=<[EMAIL
 PROTECTED]
mail.com>,autolearn=no
Apr  5 11:07:37 lordvan spamd[11585]: prefork: child states: II
Apr  5 11:07:37 lordvan dbmail/smtp[1597]: Message message id=6595,
size=23690 is inserted
Apr  5 11:08:40 lordvan dbmail/smtp[1610]: Warning 500  Permanent Failure
<9C>=^R <8D><83><D8><FE><FF><FF><8D><93><D8><FE><FF> 

---------------------------------------------------------------------- 
 LordVan - 05-Apr-07 14:28  
---------------------------------------------------------------------- 
one other thing. the logs also include me using squirrelmail to do a search
- and some other things. one important bit is when i used the search and
tried to move mails to the Spam folder it gave me an error . this has
happened before. it does apparently copy the mails but not delete them
from my inbox.
also had an imap connection timeout (squirrelmail on same server as
dbmail) near end of the log.

all in all the receiving works ok but when i try to use imap server it
gives quite a few problems.

oh and my /tmp is on a ext3 filesystem. 

---------------------------------------------------------------------- 
 LordVan - 05-Apr-07 17:08  
---------------------------------------------------------------------- 
by the wya .. those messages only happen when dbmail-imap is running
(haven't tried it with sieve and other daemon yet as i don't need them
right now)
when dbmail-imap is off no errors appear..

last part of my current log(last line is from stopping dbmail-imap):
WARNING:  there is already a transaction in progress
STATEMENT:  BEGIN
WARNING:  there is already a transaction in progress
STATEMENT:  BEGIN
WARNING:  there is already a transaction in progress
STATEMENT:  BEGIN
LOG:  unexpected EOF on client connection 

---------------------------------------------------------------------- 
 LordVan - 10-Apr-07 13:42  
---------------------------------------------------------------------- 
an update with more details now:

this is from the moment when i was trying to access mails/folders using
squirrelmail:

/var/log/dbmail.err:
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress
Error Error setting lock. Trying again.
Error Error setting lock. Trying again.
WARNING:  there is already a transaction in progress
WARNING:  there is already a transaction in progress

/var/log/qmail/qmail-send/current:
@40000000461b76ba2d062174 delivery 36061: deferral:
@40000000461b76ba2d06ec94 status: local 1/10 remote 0/20
@40000000461b76ba2d203924 delivery 36062: deferral:
@40000000461b76ba2d20641c status: local 0/10 remote 0/20
@40000000461b76d62d5b138c starting delivery 36063: msg 111889 to local
[EMAIL PROTECTED]
@40000000461b76d62d5bbb84 status: local 1/10 remote 0/20
@40000000461b76d62d5cb19c starting delivery 36064: msg 111889 to local
[EMAIL PROTECTED]
@40000000461b76d62d5d3284 status: local 2/10 remote 0/20
@40000000461b76d632dc5ce4 delivery 36063: deferral:
@40000000461b76d632dc689c status: local 1/10 remote 0/20
@40000000461b76d632f4ceb4 delivery 36064: deferral:
@40000000461b76d632f4d684 status: local 0/10 remote 0/20

/var/log/qmail/qmail-smtpd/current:
@40000000461b768c3087c26c tcpserver: status: 1/40
@40000000461b768c308a00a4 tcpserver: pid 21279 from 85.141.200.23
@40000000461b768c30ab6384 tcpserver: ok 21279
server88-208-201-184.live-servers.net:88.208.201.184:25
ppp85-141-200-23.pppoe
.mtu-net.ru:85.141.200.23::3718
@40000000461b768c30bbda5c tcpserver: end 21279 status 256
@40000000461b768c30bbe22c tcpserver: status: 0/40
@40000000461b76a0005ca8b4 tcpserver: status: 1/40
@40000000461b76a00062230c tcpserver: pid 21292 from 210.221.74.60
@40000000461b76a0007827c4 tcpserver: ok 21292
server88-208-201-184.live-servers.net:88.208.201.184:25
:210.221.74.60::3543
@40000000461b76a20420e08c tcpserver: end 21292 status 0
@40000000461b76a20420f02c tcpserver: status: 0/40

/var/log/postgres/postgresql-2007-04-10_000000.log:

"marilynmanson" "lordvan.com")(NIL NIL "nin" "lordvan.com")(NIL NIL "omi"
"lordvan.com")) NIL NIL "<MAILSENDERNG3GKeD116941
[EMAIL PROTECTED]>")')
ERROR:  current transaction is aborted, commands ignored until end of
transaction block
STATEMENT:  SELECT physmessage_id FROM dbmail_messages WHERE message_idnr
= 37906
ERROR:  current transaction is aborted, commands ignored until end of
transaction block
STATEMENT:  SELECT physmessage_id FROM dbmail_messages WHERE message_idnr
= 37908
WARNING:  there is already a transaction in progress
STATEMENT:  BEGIN
WARNING:  there is already a transaction in progress
STATEMENT:  BEGIN
LOG:  unexpected EOF on client connection 

---------------------------------------------------------------------- 
 aaron - 10-Apr-07 15:38  
---------------------------------------------------------------------- 
About line 93 of the  2007-04-05 log files seems to be the first query gone
wrong that might have caused the transaction to abort:

Error query failed [INSERT INTO dbmail_headername (headername) VALUES
('cc')] : [ERROR:  duplicate key violates unique constraint
"dbmail_headername_1"
]

Error query failed [INSERT INTO dbmail_tofield (physmessage_id, toname,
toaddr) VALUES (213,'','[EMAIL PROTECTED]')] : [ERROR:  current
transaction is aborted, commands ignored until end of transaction block
]

There were some earlier queries that died with this message:

Error query failed [SELECT login, sock_allow, sock_deny, userid FROM
dbmail_usermap WHERE login in ('lordvan','ANY') ORDER BY sock_allow,
sock_deny] : [FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
]

That's definitely a new one around here! 

---------------------------------------------------------------------- 
 LordVan - 13-Apr-07 11:45  
---------------------------------------------------------------------- 
now that is not good for me :(

here is a question then: how 'supported' is dbmail on postgresql ? as it
seems to me it is not 100% tested ;(

anyway .. i'm willing to help testing of course to get those problems
fixed - i dont' really  wanna try to swap to mysql now .. though i'm
tempted as reading my emails is qutie a pain (i have to have imap server
stopped most of the time..)

 

---------------------------------------------------------------------- 
 froeske - 24-Apr-07 09:59  
---------------------------------------------------------------------- 
we have a similar Problem with dmbail-lmtp:

---- Maillog ----
Apr 23 20:46:49 pure08 dbmail/lmtpd[4305]: Error [Lock wait timeout
exceeded; try restarting transaction] [UPDATE dbmail_users SET
curmail_size = curmail_size + 1959 WHERE user_idnr = 198]

Apr 23 20:46:49 pure08 dbmail/lmtpd[4305]: Error error setting the new
quotum used value for user [198]

Apr 23 20:46:49 pure08 dbmail/lmtpd[4305]: Error error copying message to
user [198]

Apr 23 20:46:49 pure08 dbmail/lmtpd[4305]: Error unknown temporary failure
in sort_and_deliver for useridnr [198]

Apr 23 20:46:49 pure08 postfix/lmtp[25617]: C4A9DC3486C:
to=<[EMAIL PROTECTED]>, relay=localhost[127.0.0.1],
delay=51, status=bounced (host localhost[127.0.0.1] said: 511 Recipient
<[EMAIL PROTECTED]> Permanent Failure Address Status Bad
destination mailbox address (in reply to end of DATA command))
----

The Problem here is, that the eMails are rejected with Code 511, instead
of a 4xx Error Message.

After restarting the dbmail-Subsystem (dbmail-lmtp, dbmail-imapd,
dbmail-pop3d) everything works fine again.

We are using dbmail with mysql InnoDB

 

---------------------------------------------------------------------- 
 LordVan - 24-Apr-07 11:30  
---------------------------------------------------------------------- 
I found out that if i use evolution imap client instead of squirrelmail
emails do get delivered, so it has to do somehow with how squirrelmail
handles connections probably.

though i get some other errors when using evolution. - and the same errors
when i try to move / delete a number of messages. will attach logs shortly. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
04-Apr-07 14:17 LordVan        New Issue                                    
04-Apr-07 16:31 LordVan        File Added: dbmail-2.2.4-r1.patch                
   
04-Apr-07 16:32 LordVan        Note Added: 0002003                          
04-Apr-07 18:17 aaron          Note Added: 0002004                          
04-Apr-07 18:30 aaron          Note Added: 0002005                          
05-Apr-07 14:16 LordVan        File Added: dbmail_and_postgres_log 2007-04-05
1300 passwords replaced.tar.bz2                    
05-Apr-07 14:16 LordVan        Note Added: 0002012                          
05-Apr-07 14:28 LordVan        Note Added: 0002013                          
05-Apr-07 17:08 LordVan        Note Added: 0002014                          
10-Apr-07 13:42 LordVan        Note Added: 0002023                          
10-Apr-07 15:38 aaron          Note Added: 0002024                          
10-Apr-07 16:21 LordVan        Note Added: 0002025                          
12-Apr-07 16:33 nethzt         Issue Monitored: nethzt                      
13-Apr-07 11:45 LordVan        Note Edited: 0002025                         
24-Apr-07 09:49 froeske        Issue Monitored: froeske                     
24-Apr-07 09:53 froeske        Note Added: 0002084                          
24-Apr-07 09:54 froeske        Note Edited: 0002084                         
24-Apr-07 09:59 froeske        Note Edited: 0002084                         
24-Apr-07 11:30 LordVan        Note Added: 0002085                          
======================================================================

_______________________________________________
Dbmail-dev mailing list
Dbmail-dev@dbmail.org
http://twister.fastxs.net/mailman/listinfo/dbmail-dev

Reply via email to