[Dovecot] dovecot 2.0b3 crash with lmtp and DNS based proxy
Hello, i am trying to proxy a LMTP connection with version 2.0b3 Currently i have the problem when trying to use a named based proxy for LMTP the process doesn't resolve the hostname and crashes:
Feb 26 16:53:26 auth: Debug: ldap(vodafonemail56@vodafone.de,::1): pass
search: base=ou=mailboxes,ou=vfag,c=de,o=vodafone scope=subtree
filter=(&(objectClass=uco)(mail=vodafonemail56@vodafone.de))
fields=userpassword,isactive,host
Feb 26 16:53:26 auth: Debug: ldap(vodafonemail56@vodafone.de,::1):
result: userpassword(password)=<hidden> proxy(proxy)=1
host(host)=kangaroo.arcor-so.net
Feb 26 16:53:26 auth: Debug: master out: PASS 1 proxy
host=kanagroo.arcor-so.net
Feb 26 16:53:26 lmtp(17929): Debug: auth input: proxy
host=kangaroo.arcor-so.net
Feb 26 16:53:26 lmtp(17929): Error: lmtp client: kangaroo.arcor-so.net
is not a valid IP
Feb 26 16:53:30 lmtp(17929): Info: Disconnect from ::1: Client quit
Feb 26 16:53:30 master: Error: service(lmtp): child 17929 killed with
signal 11 (core dumped)
Program terminated with signal 11, Segmentation fault. #0 0x00000000004081fe in lmtp_proxy_try_finish (proxy=0x633898) at lmtp-proxy.c:193 193 if (lmtp_proxy_send_data_replies(proxy) && (gdb) bt full #0 0x00000000004081fe in lmtp_proxy_try_finish (proxy=0x633898) at lmtp-proxy.c:193 No locals. #1 0x0000000000409bb3 in lmtp_client_deinit (_client=<value optimized out>) at lmtp-client.c:137 client = (struct lmtp_client *) 0x633db8 #2 0x00000000004089c8 in lmtp_proxy_deinit (_proxy=<value optimized out>) at lmtp-proxy.c:86 proxy = (struct lmtp_proxy *) 0x633898 #3 0x000000000040602e in client_destroy (client=0x6191c8, prefix=<value optimized out>, reason=<value optimized out>) at client.c:255 No locals. #4 0x00000000004067d3 in cmd_quit (client=0xb, args=<value optimized out>) at commands.c:407 No locals. #5 0x000000000040669b in client_input_handle (client=0x6191c8) at client.c:61 _data_stack_cur_id = 3 output = (struct ostream *) 0x619b80 line = 0x631461 "quit" ret = <value optimized out> #6 0x00007f3217c9b8db in io_loop_handler_run (ioloop=<value optimized out>) at ioloop-epoll.c:208 ctx = (struct ioloop_handler_context *) 0x6177b0 event = (const struct epoll_event *) 0x617820 list = (struct io_list *) 0x619c60 io = (struct io_file *) 0x619c20 tv = {tv_sec = 59, tv_usec = 976185} t_id = 2 msecs = <value optimized out> ret = 1 call = <value optimized out> #7 0x00007f3217c9aa48 in io_loop_run (ioloop=0x6175a0) at ioloop.c:350 No locals. #8 0x00007f3217c8ae03 in master_service_run (service=0x617480, callback=0x6) at master-service.c:478 No locals. #9 0x0000000000405b92 in main (argc=1, argv=0x617370) at main.c:92 ---Type <return> to continue, or q <return> to quit--- set_roots = {0x40bd00, 0x40b980, 0x0} service_flags = <value optimized out> storage_service_flags = 675 c = <value optimized out> (gdb)
Regards, Oliver Eales
On Fri, 2010-02-26 at 17:32 +0100, Oliver Eales wrote:
Hello, i am trying to proxy a LMTP connection with version 2.0b3 Currently i have the problem when trying to use a named based proxy for LMTP the process doesn't resolve the hostname and crashes:
Fixed crash and added DNS support:
http://hg.dovecot.org/dovecot-2.0/rev/bd28e6f29711 http://hg.dovecot.org/dovecot-2.0/rev/cc3f6adc1e0b
Timo Sirainen schrieb:
On Fri, 2010-02-26 at 17:32 +0100, Oliver Eales wrote:
Hello, i am trying to proxy a LMTP connection with version 2.0b3 Currently i have the problem when trying to use a named based proxy for LMTP the process doesn't resolve the hostname and crashes:
Fixed crash and added DNS support:
http://hg.dovecot.org/dovecot-2.0/rev/bd28e6f29711 http://hg.dovecot.org/dovecot-2.0/rev/cc3f6adc1e0b
Thank you Timo, it is working now. But unfortunately i ran into a second problem which was already existent before the DNS fix. When the LMTP client sends the terminating dot to the LMTP proxy, the proxy stalls for about 30sec at an epoll_wait() syscall. It reads the "250 2.0.0 xxxxx" response from the backend server and then waits. When the epoll_wait timeout is reached, the proxy sends the "250 2.0.0 xxxxx" backend response to the client and the communication goes on normally. (QUIT from the client or new MAIL..) Attached is a strace excerpt of the LMTP proxy.
read(11, "sdf\r\n", 4017) = 5 write(15, "sdf", 3) = 3 read(11, 0x631454, 4012) = -1 EAGAIN (Resource temporarily unavailable) read(11, 0x631454, 4012) = -1 EAGAIN (Resource temporarily unavailable) read(11, 0x631454, 4012) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(10, {{EPOLLIN, {u32=6396992, u64=6396992}}}, 8, 60000) = 1 read(11, ".\r\n", 4012) = 3 write(15, "\r\n", 2) = 2 write(15, ".\r\n", 3) = 3 epoll_ctl(10, EPOLL_CTL_DEL, 11, {0, {u32=6396992, u64=6396992}}) = 0 epoll_wait(10, {{EPOLLIN, {u32=6506320, u64=6506320}}}, 8, 30000) = 1 read(15, "250 2.0.0 <vodafonemail56@vodafo"..., 860) = 69 read(15, 0x634859, 791) = -1 EAGAIN (Resource temporarily unavailable) epoll_wait(10,{}, 8, 29992) = 0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Here it hangs for 29992 msec.
epoll_wait(10, {}, 8, 2) = 0 epoll_ctl(10, EPOLL_CTL_DEL, 15, {0, {u32=6506320, u64=6506320}}) = 0 close(15) = 0 setsockopt(11, SOL_TCP, TCP_CORK, [1], 4) = 0 write(11, "250 2.0.0 <vodafonemail56@vodafo"..., 69) = 69 setsockopt(11, SOL_TCP, TCP_CORK, [0], 4) = 0 epoll_ctl(10, EPOLL_CTL_ADD, 11, {EPOLLIN|EPOLLPRI|EPOLLERR|EPOLLHUP, {u32=6396992, u64=6396992}}) = 0 brk(0x657000) = 0x657000
Thank you and regards, Oliver Eales
On ti, 2010-03-02 at 13:14 +0100, Oliver Eales wrote:
When the LMTP client sends the terminating dot to the LMTP proxy, the proxy stalls for about 30sec at an epoll_wait() syscall.
Finally fixed: http://hg.dovecot.org/dovecot-2.0/rev/2d6cf78982dc
Am 07.06.2010 um 22:02 schrieb Timo Sirainen:
On ti, 2010-03-02 at 13:14 +0100, Oliver Eales wrote:
When the LMTP client sends the terminating dot to the LMTP proxy, the proxy stalls for about 30sec at an epoll_wait() syscall.
Finally fixed: http://hg.dovecot.org/dovecot-2.0/rev/2d6cf78982dc
Hello Timo, thanks, it is working. If you finally could get the new director service usable as userdb socket for LMTP..... :-)
Btw: For managesieve proxy i successfully tried the director service. This might be obvious but i just wanted to confirm it.
service managesieve-login { executable = managesieve-login director inet_listener managesieve { port = 2000 } }
Regards, Oliver Eales
participants (2)
-
Oliver Eales
-
Timo Sirainen