A NOTE has been added to this issue. 
====================================================================== 
http://www.dbmail.org/mantis/view.php?id=879 
====================================================================== 
Reported By:                jpecar
Assigned To:                
====================================================================== 
Project:                    DBMail
Issue ID:                   879
Category:                   Database layer
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     new
target:                      
====================================================================== 
Date Submitted:             31-Jan-11 16:21 CET
Last Modified:              01-Feb-11 12:04 CET
====================================================================== 
Summary:                    login hangs if DB unavailable
Description: 
I'm setting up a HA environment of dbmail instances over replicated mysql.
I want to monitor health by connecting to pop port and issuing login
statements, fully expecting some kind of error msg if db has gone away.
However, I see that login hangs indefinitely after pass is given, without
any feedback.
====================================================================== 

---------------------------------------------------------------------- 
 (0003156) paul (administrator) - 31-Jan-11 16:33
 http://www.dbmail.org/mantis/view.php?id=879#c3156 
---------------------------------------------------------------------- 
I'm not seeing this behaviour on git-master. I'm seeing immediate network
disconnects. Yes, providing an informative error would be nicer, but
terminating the connection at least will tell you something is amiss. 

---------------------------------------------------------------------- 
 (0003158) jpecar (reporter) - 01-Feb-11 12:04
 http://www.dbmail.org/mantis/view.php?id=879#c3158 
---------------------------------------------------------------------- 
Just compiled fresh code from git and it behaves the same here.

Here's the strace output:
....
[pid  3306] read(14, "user test2\r\n", 4095) = 12
[pid  3306] read(14, 0x7fffdd61be40, 4095) = -1 EAGAIN (Resource
temporarily unavailable)
[pid  3306] write(14, "+OK Password required for test2\r\n", 33) = 33
[pid  3306] epoll_ctl(8, EPOLL_CTL_MOD, 14, {EPOLLIN|EPOLLOUT, {u32=14,
u64=14}}) = 0
[pid  3306] epoll_wait(8, {{EPOLLOUT, {u32=14, u64=14}}}, 32, 53841) = 1
[pid  3306] clock_gettime(CLOCK_MONOTONIC, {1616277, 212805117}) = 0
[pid  3306] epoll_ctl(8, EPOLL_CTL_MOD, 14, {EPOLLIN, {u32=14, u64=14}}) =
0
[pid  3306] epoll_wait(8, {{EPOLLIN, {u32=14, u64=14}}}, 32, 53834) = 1
[pid  3306] clock_gettime(CLOCK_MONOTONIC, {1616279, 477993117}) = 0
[pid  3306] read(14, "pass test2\r\n", 4095) = 12
[pid  3306] read(14, 0x7fffdd61be40, 4095) = -1 EAGAIN (Resource
temporarily unavailable)
[pid  3306] poll([{fd=3, events=POLLIN|POLLPRI}], 1, 0) = 0 (Timeout)
[pid  3306] write(3, "\1\0\0\0\16", 5)  = 5
[pid  3306] read(3,  <unfinished ...>
[pid  3308] <... futex resumed> )       = -1 ETIMEDOUT (Connection timed
out)
[pid  3308] futex(0x1a57c3d8, FUTEX_WAIT_PRIVATE, 2, NULL

And lsof confirms that fd3 is indeed tcp connection to mysql.

Telnet session to dbmail-pop3d returns nothing after pass is given, just
sits there.

One thing I need to verify - I have dbmail compiled against
libmysqlclient15 from mysql 5.0, while I have mysq 5.1 on server with
client version 16. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
31-Jan-11 16:21  jpecar         New Issue                                    
31-Jan-11 16:33  paul           Note Added: 0003156                          
01-Feb-11 12:04  jpecar         Note Added: 0003158                          
======================================================================

_______________________________________________
Dbmail-dev mailing list
[email protected]
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail-dev

Reply via email to