Re: [Dovecot] crash with dovecot 2.2: Panic: Buffer full

2013-04-08 Thread to...@starbridge.org
Le 07/04/2013 22:56, Timo Sirainen a écrit :
 On Sun, 2013-04-07 at 21:47 +0200, to...@starbridge.org wrote:
 since I've upgraded to 2.2.rc5 (c24783148d78), I've got the previous
 error again:
 It's happening on a large mailbox on almost every emails, with Horde 5
 webmail client (works fine with thunderbird so far)
  Thanks for your help

 Apr  7 21:30:58 mx2 dovecot: imap(clean-quarant...@spamguard.fr): Panic:
 Buffer full (8206  8192, pool none)
 Thanks, this should fix it:
 http://hg.dovecot.org/dovecot-2.2/rev/bb25fa35d887


Hi Timo,
It's ok for this error, but now, on a few email, I've got this:
dovecot --version
2.2.rc6 (548e59794f2e)


imap(clean-quarant...@spamguard.fr): Panic: file istream.c: line 153
(i_stream_read): assertion failed: (_stream-skip != _stream-pos)
Apr  8 22:19:26 mx2 dovecot: imap(clean-quarant...@spamguard.fr): Error:
Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x60ada)
[0x7f692abe1ada] - /usr/lib/dovecot/libdovecot.so.0(+0x60b1e)
[0x7f692abe1b1e] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x7f692aba3415] -
/usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x1b9) [0x7f692abea2a9]
- /usr/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x3d)
[0x7f692abea9dd] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x9b624)
[0x7f692aed8624] -
/usr/lib/dovecot/libdovecot-storage.so.0(index_mail_get_binary_stream+0x77)
[0x7f692aed8ab7] -
/usr/lib/dovecot/libdovecot-storage.so.0(mail_get_binary_stream+0x60)
[0x7f692aeb1640] -
/usr/lib/dovecot/libdovecot-storage.so.0(imap_msgpart_open+0x9f)
[0x7f692af0db4f] - dovecot/imap() [0x418f35] - dovecot/imap()
[0x4175dd] - dovecot/imap(imap_fetch_more+0x34) [0x418534] -
dovecot/imap(cmd_fetch+0x309) [0x40e2c9] -
dovecot/imap(command_exec+0x3c) [0x41621c] - dovecot/imap() [0x415280]
- dovecot/imap() [0x41533a] - dovecot/imap(client_handle_input+0x115)
[0x4155f5] - dovecot/imap(client_input+0x72) [0x4159a2] -
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) [0x7f692abf14a6]
- /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd7)
[0x7f692abf22f7] - /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x28)
[0x7f692abf0fe8] -
/usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13)
[0x7f692aba85a3] - dovecot/imap(main+0x270) [0x40b940] -
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f692a815ead]
- dovecot/imap() [0x40ba9d]
Apr  8 22:19:26 mx2 dovecot: imap(clean-quarant...@spamguard.fr): Fatal:
master: service(imap): child 4369 killed with signal 6 (core dumped)


#0  0x7f692a829475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7f692a82c6f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x7f692abe1ae8 in default_fatal_finish (type=optimized out,
status=status@entry=0) at failures.c:191
backtrace = 0x62d818 /usr/lib/dovecot/libdovecot.so.0(+0x60ada)
[0x7f692abe1ada] - /usr/lib/dovecot/libdovecot.so.0(+0x60b1e)
[0x7f692abe1b1e] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x7f692aba3415] - /usr/lib/d...
#3  0x7f692abe1b1e in i_internal_fatal_handler (ctx=0x7fff605d4680,
format=optimized out, args=optimized out) at failures.c:652
status = 0
#4  0x7f692aba3415 in i_panic (format=format@entry=0x7f692ac06e68
file %s: line %d (%s): assertion failed: (%s)) at failures.c:263
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = {{gp_offset = 40, fp_offset = 48, overflow_arg_area =
0x7fff605d4770, reg_save_area = 0x7fff605d46b0}}
#5  0x7f692abea2a9 in i_stream_read (stream=stream@entry=0x9fa6a0)
at istream.c:153
_stream = 0x9fa640
old_size = 0
ret = -2
__FUNCTION__ = i_stream_read
#6  0x7f692abea9dd in i_stream_read_data
(stream=stream@entry=0x9fa6a0, data_r=data_r@entry=0x7fff605d4820,
size_r=size_r@entry=0x7fff605d4828, threshold=threshold@entry=0) at
istream.c:479
ret = optimized out
read_more = false
__FUNCTION__ = i_stream_read_data
#7  0x7f692aed8624 in blocks_count_lines (full_input=0x9fa6a0,
ctx=0x7fff605d4830) at index-mail-binary.c:319
block_idx = 5
p = optimized out
size = 0
data = 0x0
ret = optimized out
cur_block = 0x62d488
block_count = 7
cur_offset = 2755
skip = optimized out
#8  index_mail_read_binary_to_cache (_mail=_mail@entry=0x66d630,
part=part@entry=0x672190, include_hdr=include_hdr@entry=false,
binary_r=binary_r@entry=0x7fff605d48e6,
converted_r=converted_r@entry=0x7fff605d48e7) at index-mail-binary.c:393
mail = 0x66d630
cache = 0x657b30
ctx = {mail = 0x66d630, input = 0x685c00, has_nuls = false,
converted = true, blocks = {arr = {buffer = 0x62d3d8, element_size =
24}, v = 0x62d3d8, v_modifiable = 0x62d3d8}, copy_start_offset = 113072}
__FUNCTION__ = index_mail_read_binary_to_cache
#9  0x7f692aed8ab7 in index_mail_get_binary_stream (_mail=0x66d630,
part=0x672190, include_hdr=false, size_r=0x7fff605d49a8

Re: [Dovecot] crash with dovecot 2.2: Panic: Buffer full

2013-04-07 Thread to...@starbridge.org
Le 19/03/2013 07:24, Tonio a écrit :



 Le 18 mars 2013 à 14:47, Timo Sirainen t...@iki.fi a écrit :

 On Sat, 2013-03-16 at 13:51 +0100, to...@starbridge.org wrote:
 Hi Timo,
 I've got a crash with  dovecot 2.2

 dovecot --version
 2.2.rc2 (69c26a9e3be5)

 It's occured when accessing with imap on a large mailbox (around 50k
 messages)

 imap(clean-quarant...@spamguard.fr): Panic: Buffer full (4254  4248,
 pool none)
 These should fix it: http://hg.dovecot.org/dovecot-2.2/rev/689dbeadf168
 http://hg.dovecot.org/dovecot-2.2/rev/ee7352f46d1e



 Thx Timo
 It's ok now

 Regards 
 Tonio 


Hi Timo,
since I've upgraded to 2.2.rc5 (c24783148d78), I've got the previous
error again:
It's happening on a large mailbox on almost every emails, with Horde 5
webmail client (works fine with thunderbird so far)
 Thanks for your help

Apr  7 21:30:58 mx2 dovecot: imap(clean-quarant...@spamguard.fr): Panic:
Buffer full (8206  8192, pool none)
Apr  7 21:30:58 mx2 dovecot: imap(clean-quarant...@spamguard.fr): Error:
Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x608ea)
[0x7f29866848ea] - /usr/lib/dovecot/libdovecot.so.0(+0x6092e)
[0x7f298668492e] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x7f2986646385] - /usr/lib/dovecot/libdovecot.so.0(+0x5d198)
[0x7f2986681198] - /usr/lib/dovecot/libdovecot.so.0(+0x56d90)
[0x7f298667ad90] - /usr/lib/dovecot/libdovecot.so.0(+0x4fc1f)
[0x7f2986673c1f] - /usr/lib/dovecot/libdovecot.so.0(+0x4fc92)
[0x7f2986673c92] - /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x69)
[0x7f298668ce39] - /usr/lib/dovecot/libdovecot.so.0(+0x6ddac)
[0x7f2986691dac] - /usr/lib/dovecot/libdovecot.so.0(+0x6df59)
[0x7f2986691f59] - /usr/lib/dovecot/libdovecot.so.0(+0x6e04b)
[0x7f298669204b] - /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x69)
[0x7f298668ce39] -
/usr/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x3d)
[0x7f298668d6bd] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x9b524)
[0x7f298697b524] -
/usr/lib/dovecot/libdovecot-storage.so.0(index_mail_get_binary_stream+0x77)
[0x7f298697b9b7] -
/usr/lib/dovecot/libdovecot-storage.so.0(mail_get_binary_stream+0x60)
[0x7f2986954590] -
/usr/lib/dovecot/libdovecot-storage.so.0(imap_msgpart_open+0x9f)
[0x7f29869b0a3f] - dovecot/imap() [0x418f35] - dovecot/imap()
[0x4175dd] - dovecot/imap(imap_fetch_more+0x34) [0x418534] -
dovecot/imap(cmd_fetch+0x309) [0x40e2c9] -
dovecot/imap(command_exec+0x3c) [0x41621c] - dovecot/imap() [0x415280]
- dovecot/imap() [0x41533a] - dovecot/imap(client_handle_input+0x115)
[0x4155f5] - dovecot/imap(client_input+0x72) [0x4159a2] -
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) [0x7f2986694186]
- /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd7)
[0x7f2986694fd7]
Apr  7 21:30:58 mx2 dovecot: imap(clean-quarant...@spamguard.fr): Fatal:
master: service(imap): child 23573 killed with signal 6 (core dumped)


#0  0x7f29862cc475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt full
#0  0x7f29862cc475 in raise () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#1  0x7f29862cf6f0 in abort () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
#2  0x7f29866848f8 in default_fatal_finish (type=optimized out,
status=status@entry=0) at failures.c:191
backtrace = 0x62d6b0 /usr/lib/dovecot/libdovecot.so.0(+0x608ea)
[0x7f29866848ea] - /usr/lib/dovecot/libdovecot.so.0(+0x6092e)
[0x7f298668492e] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x7f2986646385] - /usr/lib/d...
#3  0x7f298668492e in i_internal_fatal_handler (ctx=0x7fffe230f150,
format=optimized out, args=optimized out) at failures.c:652
status = 0
#4  0x7f2986646385 in i_panic (format=format@entry=0x7f29866b3890
Buffer full (%lu  %lu, pool %s)) at failures.c:263
ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area =
0x7fffe230f240, reg_save_area = 0x7fffe230f180}}
#5  0x7f2986681198 in buffer_check_limits (data_size=38, pos=8168,
buf=optimized out) at buffer.c:65
extra = optimized out
new_size = 8206
#6  buffer_write (_buf=0x7fffe230f300, pos=8168, data=0x688beb,
data_size=38) at buffer.c:178
buf = optimized out
#7  0x7f298667ad90 in quoted_printable_decode_full (
src=src@entry=0x686c20 ' ' repeats 24 times, br\n, ' '
repeats 20 times, /strong\n, ' ' repeats 16 times, /td\n, '
' repeats 12 times, /tr\n, ' ' repeats 12 times, tr
height=3D\36\ align=3D\center\\n, ' ' repeats 16 times, td
width=3D\62%\ \n, ' ' repeats 17 times..., src_size=8192,
src_pos_r=src_pos_r@entry=0x7fffe230f2f8,
dest=dest@entry=0x7fffe230f300, eof=eof@entry=false) at
quoted-printable.c:61
hexbuf = 3D
src_pos = optimized out
pos = optimized out
next = optimized out
errors = optimized out
#8  0x7f298667af28 in quoted_printable_decode (
src=src@entry=0x686c20 ' ' repeats 24 times, br\n, ' '
repeats 20 times, /strong\n, ' ' repeats 16 times, /td\n

[Dovecot] crash with dovecot 2.2: Panic: Buffer full

2013-03-16 Thread to...@starbridge.org
Hi Timo,
I've got a crash with  dovecot 2.2

dovecot --version
2.2.rc2 (69c26a9e3be5)

It's occured when accessing with imap on a large mailbox (around 50k
messages)

imap(clean-quarant...@spamguard.fr): Panic: Buffer full (4254  4248,
pool none)
Error: Raw backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x6089a)
[0x7f9d1bcde89a] - /usr/lib/dovecot/libdovecot.so.0(+0x608de)
[0x7f9d1bcde8de] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x7f9d1bca039b] - /usr/lib/dovecot/libdovecot.so.0(+0x5d148)
[0x7f9d1bcdb148] - /usr/lib/dovecot/libdovecot.so.0(+0x56ba8)
[0x7f9d1bcd4ba8] - /usr/lib/dovecot/libdovecot.so.0(+0x4fa77)
[0x7f9d1bccda77] - /usr/lib/dovecot/libdovecot.so.0(+0x4faf2)
[0x7f9d1bccdaf2] - /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x69)
[0x7f9d1bce6de9] - /usr/lib/dovecot/libdovecot.so.0(+0x6dcac)
[0x7f9d1bcebcac] - /usr/lib/dovecot/libdovecot.so.0(+0x6de59)
[0x7f9d1bcebe59] - /usr/lib/dovecot/libdovecot.so.0(+0x6df4b)
[0x7f9d1bcebf4b] - /usr/lib/dovecot/libdovecot.so.0(i_stream_read+0x69)
[0x7f9d1bce6de9] -
/usr/lib/dovecot/libdovecot.so.0(i_stream_read_data+0x3d)
[0x7f9d1bce765d] - /usr/lib/dovecot/libdovecot-storage.so.0(+0x9af84)
[0x7f9d1bfd4f84] -
/usr/lib/dovecot/libdovecot-storage.so.0(index_mail_get_binary_stream+0x77)
[0x7f9d1bfd5417] -
/usr/lib/dovecot/libdovecot-storage.so.0(mail_get_binary_stream+0x60)
[0x7f9d1bfae5c0] -
/usr/lib/dovecot/libdovecot-storage.so.0(imap_msgpart_open+0x9f)
[0x7f9d1c00a3df] - dovecot/imap() [0x418f55] - dovecot/imap()
[0x4175fd] - dovecot/imap(imap_fetch_more+0x34) [0x418554] -
dovecot/imap(cmd_fetch+0x309) [0x40e2c9] -
dovecot/imap(command_exec+0x3c) [0x41623c] - dovecot/imap() [0x4152a0]
- dovecot/imap() [0x41535a] - dovecot/imap(client_handle_input+0x115)
[0x415615] - dovecot/imap(client_input+0x72) [0x4159c2] -
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) [0x7f9d1bcee086]
- /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xd7)
[0x7f9d1bceeed7]
Mar 16 13:37:19 mx2 dovecot: imap(clean-quarant...@spamguard.fr): Fatal:
master: service(imap): child 9983 killed with signal 6 (core dumped)

backtrace:

#0  0x7f9d1b926475 in raise () from
/lib/x86_64-linux-gnu/libc.so.6 

  

No symbol table info
available.  


 

#1  0x7f9d1b9296f0 in abort () from
/lib/x86_64-linux-gnu/libc.so.6 

  

No symbol table info
available.  


 

#2  0x7f9d1bcde8a8 in default_fatal_finish (type=optimized out,
status=status@entry=0) at
failures.c:191  

  

backtrace = 0x62d5f0 /usr/lib/dovecot/libdovecot.so.0(+0x6089a)
[0x7f9d1bcde89a] - /usr/lib/dovecot/libdovecot.so.0(+0x608de)
[0x7f9d1bcde8de] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x7f9d1bca039b] - /usr/lib/d...
#3  0x7f9d1bcde8de in i_internal_fatal_handler (ctx=0x7fff68422000,
format=optimized out, args=optimized out) at
failures.c:652  
 

status =
0   


 

#4  0x7f9d1bca039b in i_panic (format=format@entry=0x7f9d1bd0d510
Buffer full (%lu  %lu, pool %s)) at
failures.c:263  

 

ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp =
0x0}

   

args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area =
0x7fff684220f0, reg_save_area =
0x7fff68422030}} 

Re: [Dovecot] pop3 proxying error

2012-08-13 Thread to...@starbridge.org
Le 10/08/2012 01:34, Timo Sirainen a écrit :
 Actually it wasn't that obvious:
 http://hg.dovecot.org/dovecot-2.1/rev/b082b8260782 plus
 http://hg.dovecot.org/dovecot-2.1/rev/9d0873cefa08 

Thanks Timo,
it's working fine now

Best regards
Tonio Buonaguidi



Re: [Dovecot] pop3 proxying error

2012-08-09 Thread to...@starbridge.org

Le 08/08/2012 15:41, Timo Sirainen a écrit :

On 8.8.2012, at 9.42, to...@starbridge.org wrote:


I've just tried this patch, so far pop-login error doesnt shows up , but now 
I've got this one: (imap-login this time)

Aug  8 08:19:36 eol1 dovecot: imap-login: Fatal: master: service(imap-login): 
child 31887 killed with signal 6 (core dumped)

..

#6  0xb779678d in hash_table_remove (table=0x83596b8, key=0x8833fe0)
at hash.c:317
node = optimized out
hash = 1839751767
#7  0xb778adda in setting_entry_detach (entry=0x8833fd0, cache=0x8057648)
at master-service-settings-cache.c:167

I don't see how this could happen by looking at the code. I also can't 
reproduce this myself. Can you easily reproduce this? Could you run imap-login 
via valgrind (it slows things down):

service imap-login {
   executable = /usr/bin/valgrind -q --vgdb=no 
/usr/local/libexec/dovecot/imap-login
}

(you may not have/need --vgdb=no, depends on your valgrind version)



Timo,
I can'f find what trigger this error, and it seems only happenig under 
some load

here the error log in mail.log:
(by the way, this is not the same server than before, this one running a 
Debian Wheezy on a  2.6.32.2 linux kernel and 64 bits architecture.)


Aug  9 09:01:36 smtp dovecot: imap-login: Error: ==27313== Invalid read 
of size 4
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==at 
0x5069BA1: settings_parser_get_list (settings-parser.c:254)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E3EA7C: login_settings_read (login-settings.c:230)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E41347: ssl_servername_callback (ssl-proxy-openssl.c:1144)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x568F161: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x567B204: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x567F8C4: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x568C102: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E41AF0: ssl_step (ssl-proxy-openssl.c:465)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E3EE3D: client_connected_finish (main.c:139)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x508C3E4: master_service_listen (master-service.c:803)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x50A0275: io_loop_call_io (ioloop.c:379)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x50A0F06: io_loop_handler_run (ioloop-epoll.c:213)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==  Address 
0x65fc1e0 is 96 bytes inside a block of size 8,192 free'd
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==at 
0x4C27D4E: free (vg_replace_malloc.c:427)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x508DC1E: master_service_settings_cache_read 
(master-service-settings-cache.c:168)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E3EA6A: login_settings_read (login-settings.c:226)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E41347: ssl_servername_callback (ssl-proxy-openssl.c:1144)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x568F161: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x567B204: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x567F8C4: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x568C102: ??? (in /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E41AF0: ssl_step (ssl-proxy-openssl.c:465)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x50A0275: io_loop_call_io (ioloop.c:379)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x50A0F06: io_loop_handler_run (ioloop-epoll.c:213)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x509FC87: io_loop_run (ioloop.c:398)

Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313== Invalid read 
of size 4
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==at 
0x5069BB3: settings_parser_get_list (settings-parser.c:255)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E3EA7C: login_settings_read (login-settings.c:230)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x4E41347: ssl_servername_callback (ssl-proxy-openssl.c:1144)
Aug  9 09:01:37 smtp dovecot: imap-login: Error: ==27313==by 
0x568F161: ??? (in /usr/lib/x86_64

Re: [Dovecot] pop3 proxying error

2012-08-08 Thread to...@starbridge.org

Le 07/08/2012 17:21, Timo Sirainen a écrit :

On 7.8.2012, at 18.16, to...@starbridge.org wrote:


I will give it a try ASAP, but is it a bad thing to run dovecot with many local 
{} ?

Not a bad thing, but it uses up somewhat more memory.


Timo,
I've just tried this patch, so far pop-login error doesnt shows up , but 
now I've got this one: (imap-login this time)


Aug  8 08:19:36 eol1 dovecot: imap-login: Fatal: master: 
service(imap-login): child 31887 killed with signal 6 (core dumped)


Director is configured in my dovecot.conf, but I dont use it here. 
Proxying is made by sql request with static host.


(gdb) bt full
#0  0xe424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb760d941 in raise () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb7610d72 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
No symbol table info available.
#3  0xb77912c0 in default_fatal_finish (type=optimized out,
status=status@entry=0) at failures.c:191
backtrace = 0xb77de600 $\t
#4  0xb7791321 in i_internal_fatal_handler (ctx=0xbfd20944,
format=0xb77bd4de key not found from hash,
args=0xbfd20964 \204\nÒ¿Hv\005\båey·Wb¨m\230v\005\bù\232x·)
at failures.c:649
status = 0
#5  0xb7760edd in i_panic (
format=format@entry=0xb77bd4de key not found from hash) at 
failures.c:263

ctx = {type = LOG_TYPE_PANIC, exit_status = 0, timestamp = 0x0}
args = 0xbfd20964 \204\nÒ¿Hv\005\båey·Wb¨m\230v\005\bù\232x·
#6  0xb779678d in hash_table_remove (table=0x83596b8, key=0x8833fe0)
at hash.c:317
node = optimized out
hash = 1839751767
#7  0xb778adda in setting_entry_detach (entry=0x8833fd0, cache=0x8057648)
at master-service-settings-cache.c:167
No locals.
#8  cache_add (parser=0x8b2f388, output=0xbfd209c0, input=0xbfd209c8,
cache=0x8057648) at master-service-settings-cache.c:203
entry = optimized out
pool = 0x8833fc0
pool_size = optimized out
entry_local_name = optimized out
#9  master_service_settings_cache_read (cache=0x8057648,
input=input@entry=0xbfd20a68, dyn_parsers=dyn_parsers@entry=0x0,
parser_r=parser_r@entry=0xbfd20a64, error_r=error_r@entry=0xbfd20a60)
at master-service-settings-cache.c:297
output = {specific_services = 0x0, service_uses_local = 1,
  service_uses_remote = 0, used_local = 1, used_remote = 0}
new_input = {roots = 0x804dba0, config_path = 0x0,
  preserve_environment = false, preserve_user = false,
  preserve_home = false, never_exec = false, use_sysexits = false,
  parse_full_config = false, module = 0x804bc38 imap-login,
  service = 0x804bc33 imap, username = 0x0, local_ip = 
{family = 2,

u = {ip6 = {__in6_u = {
  __u6_addr8 = Wb¨m, '\000' repeats 11 times,
  __u6_addr16 = {25175, 28072, 0, 0, 0, 0, 0, 0},
  __u6_addr32 = {1839751767, 0, 0, 0}}}, ip4 = {
s_addr = 1839751767}}}, remote_ip = {family = 2, u = 
{ip6 = {

__in6_u = {__u6_addr8 = [yÇc, '\000' repeats 11 times,
  __u6_addr16 = {31067, 25543, 0, 0, 0, 0, 0, 0},
  __u6_addr32 = {1674017115, 0, 0, 0}}}, ip4 = {
s_addr = 1674017115}}}, local_name = 0x0}
set = optimized out
__FUNCTION__ = master_service_settings_cache_read
#10 0xb77ef48d in login_settings_read (pool=0x9801dc8,
local_ip=local_ip@entry=0xbfd20b1c, 
remote_ip=remote_ip@entry=0xbfd20b84,

local_name=local_name@entry=0x0,
other_settings_r=other_settings_r@entry=0xbfd20b18) at 
login-settings.c:226

input = {roots = 0x804dba0, config_path = 0x0,
  preserve_environment = false, preserve_user = false,
  preserve_home = false, never_exec = false, use_sysexits = false,
  parse_full_config = false, module = 0x804bc38 imap-login,
  service = 0x804bc33 imap, username = 0x0, local_ip = 
{family = 2,

u = {ip6 = {__in6_u = {
  __u6_addr8 = Wb¨m, '\000' repeats 11 times,
  __u6_addr16 = {25175, 28072, 0, 0, 0, 0, 0, 0},
  __u6_addr32 = {1839751767, 0, 0, 0}}}, ip4 = {
s_addr = 1839751767}}}, remote_ip = {family = 2, u = 
{ip6 = {

__in6_u = {__u6_addr8 = [yÇc, '\000' repeats 11 times,
  __u6_addr16 = {31067, 25543, 0, 0, 0, 0, 0, 0},

  __u6_addr32 = {1674017115, 0, 0, 0}}}, ip4 = {
s_addr = 1674017115}}}, local_name = 0x0}
error = optimized out
parser = optimized out
cache_sets = optimized out
sets = optimized out
i = optimized out
count = optimized out
__FUNCTION__ = login_settings_read
#11 0xb77ef833 in client_connected_finish (conn=0xbfd20b78) at main.c:119
client = optimized out
proxy = optimized out
local_ip = {family = 2, u = {ip6 = {__in6_u

[Dovecot] pop3 proxying error

2012-08-07 Thread to...@starbridge.org


Hi Timo,
I've got some errors with pop3 proxying and dovecot 2.1.9

I's occured on the proxy side:

Aug  7 13:16:47 dev1 dovecot: pop3-login: Fatal: master: 
service(pop3-login): child 23046 killed with signal 11 (core dumped)


Server side shows no error, and runs the same dovecot version.

Thanks for your help.
Best regards
Tonio Buonaguidi

Core dump:


GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as i486-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/lib/dovecot/pop3-login...done.
[New LWP 23046]

warning: Can't read pathname for load map: Erreur d'entrée/sortie.
[Thread debugging using libthread_db enabled]
Using host libthread_db library 
/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1.

Core was generated by `dovecot/pop3-login -D'.
Program terminated with signal 11, Segmentation fault.
#0  settings_parser_dup (old_ctx=0x8783480, new_pool=0x632e6465) at 
settings-parser.c:1742

1742pool_ref(new_pool);




 doveconf -n
# 2.1.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32.2--std-ipv6-32 i686 Debian wheezy/sid
auth_cache_size = 4 k
auth_mechanisms = plain login
director_mail_servers = bb.bb.bb.bb cc.cc.cc.cc
director_servers = dd.dd.dd.dd aa.aa.aa.aa
log_timestamp = %Y-%m-%d %H:%M:%S
mail_debug = yes
managesieve_notify_capability = mailto
managesieve_sieve_capability = comparator-i;octet 
comparator-i;ascii-casemap fileinto reject envelope encoded-character 
vacation subaddress comparator-i;ascii-numeric relational regex 
imap4flags copy include variables body enotify environment mailbox date 
spamtest spamtestplus virustest

passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocols = imap pop3 sieve
service auth {
  unix_listener /var/spool/postfix/private/auth {
group = mail
mode = 0660
user = postfix
  }
  unix_listener auth-master {
mode = 0660
user = vmail
  }
  unix_listener auth-userdb {
mode = 0660
user = vmail
  }
}
service director {
  fifo_listener login/proxy-notify {
mode = 0666
  }
  inet_listener {
address =aa.aa.aa.aa
port = 9090
  }
  unix_listener director-userdb {
mode = 0600
  }
  unix_listener login/director {
mode = 0666
  }
}
service imap-login {
  executable = imap-login director
  inet_listener imap {
address = aa.aa.aa.aa yy.yyy.yy.yy xx.xx.xx.xx
port = 143
  }
  inet_listener imaps {
address = aa.aa.aa.aa yy.yyy.yy.yy xx.xx.xx.xx
port = 993
  }
  process_limit = 256
  process_min_avail = 2
  service_count = 0
  vsz_limit = 256 M
}
service managesieve-login {
  inet_listener sieve {
address = aa.aa.aa.aa yy.yyy.yy.yy xx.xx.xx.xx
port = 4190
  }
  vsz_limit = 64 M
}
service pop3-login {
  executable = pop3-login -D
  inet_listener pop3 {
address = aa.aa.aa.aa yy.yyy.yy.yy xx.xx.xx.xx
port = 110
  }
  inet_listener pop3s {
address = aa.aa.aa.aa yy.yyy.yy.yy xx.xx.xx.xx
port = 995
  }
  service_count = 0
}
ssl_ca = /etc/dovecot/ca-bundle.crt
ssl_cert = /etc/dovecot/imap.xxx.certchained2.pem
ssl_client_cert = /etc/dovecot/imap.xxx.certchained2.pem
ssl_client_key = /etc/dovecot/imap.xxx.key.pem
ssl_key = /etc/dovecot/imap.xxx.key.pem
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol imap {
  imap_client_workarounds = delay-newmail
  imap_max_line_length = 64 k
  mail_max_userip_connections = 10
}
protocol pop3 {
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}
protocol sieve {
  passdb {
args = /etc/dovecot/sieve-sql.conf
driver = sql
  }
}
local xx.xx.xx.xx {
  disable_plaintext_auth = no
}
local yy.yyy.yy.yy {
  protocol imap {
ssl = required
ssl_cert = /etc/dovecot/mail.pem
ssl_key = /etc/dovecot/mail.key.pem
  }
}
local yy.yyy.yy.yy {
  protocol sieve {
ssl = required
ssl_cert = /etc/dovecot/mail.pem
ssl_key = /etc/dovecot/mail.pem
  }
}
local xx.xx.xx.xx {
  protocol imap {
ssl = yes
ssl_cert = /etc/dovecot/imap.certchained.pem
ssl_key = /etc/dovecot/imap.key.pem
  }
}
local xx.xx.xx.xx {
  protocol pop3 {
ssl = yes
ssl_cert = /etc/dovecot/pop.certchained.pem
ssl_key = /etc/dovecot/pop.key.pem
  }
}
local xx.xx.xx.xx {
  protocol sieve {
ssl = yes
ssl_cert = /etc/dovecot/mail.certchained.pem
ssl_key = /etc/dovecot/mail.key.pem
  }
}






Re: [Dovecot] pop3 proxying error

2012-08-07 Thread to...@starbridge.org

Le 07/08/2012 13:47, to...@starbridge.org a écrit :


Hi Timo,
I've got some errors with pop3 proxying and dovecot 2.1.9

I's occured on the proxy side:

Aug  7 13:16:47 dev1 dovecot: pop3-login: Fatal: master: 
service(pop3-login): child 23046 killed with signal 11 (core dumped)


Server side shows no error, and runs the same dovecot version.

Thanks for your help.
Best regards
Tonio Buonaguidi

Core dump:


GNU gdb (GDB) 7.4.1-debian
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show 
copying

and show warranty for details.
This GDB was configured as i486-linux-gnu.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /usr/lib/dovecot/pop3-login...done.
[New LWP 23046]

warning: Can't read pathname for load map: Erreur d'entrée/sortie.
[Thread debugging using libthread_db enabled]
Using host libthread_db library 
/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1.

Core was generated by `dovecot/pop3-login -D'.
Program terminated with signal 11, Segmentation fault.
#0  settings_parser_dup (old_ctx=0x8783480, new_pool=0x632e6465) at 
settings-parser.c:1742

1742pool_ref(new_pool);





sorry I've forgot bt full !

(gdb) bt full
#0  settings_parser_dup (old_ctx=0xa26920, new_pool=0x6d6f632e32) at 
settings-parser.c:1742

new_ctx = optimized out
iter = optimized out
new_link = optimized out
links = optimized out
key = optimized out
value = optimized out
i = optimized out
parser_pool = optimized out
__FUNCTION__ = settings_parser_dup
#1  0x7fc7a77c3ecc in cache_add (parser=0xa26920, 
output=0x7e4557f0, input=0x7e455790, cache=0x60ea50)

at master-service-settings-cache.c:221
entry = 0xe98b90
pool = 0xe98b70
pool_size = optimized out
entry_local_name = 0xe98b90 pop.te.com
#2  master_service_settings_cache_read (cache=0x60ea50, input=optimized 
out, dyn_parsers=optimized out,
parser_r=0x7e4558b8, error_r=optimized out) at 
master-service-settings-cache.c:297
output = {specific_services = 0x0, service_uses_local = 1, 
service_uses_remote = 0, used_local = 1, used_remote = 0}
new_input = {roots = 0x604500, config_path = 0x0, 
preserve_environment = false, preserve_user = false,
  preserve_home = false, never_exec = false, use_sysexits = 
false, parse_full_config = false,
  module = 0x403640 pop3-login, service = 0x40363b pop3, 
username = 0x0, local_ip = {family = 2, u = {ip6 = {
__in6_u = {__u6_addr8 = .iHb, '\000' repeats 11 
times, __u6_addr16 = {26926, 25160, 0, 0, 0, 0, 0, 0},
  __u6_addr32 = {1648912686, 0, 0, 0}}}, ip4 = {s_addr 
= 1648912686}}}, remote_ip = {family = 2, u = {
  ip6 = {__in6_u = {__u6_addr8 = ZT\220], '\000' repeats 
11 times, __u6_addr16 = {21594, 23952, 0, 0, 0, 0,
0, 0}, __u6_addr32 = {1569739866, 0, 0, 0}}}, ip4 = 
{s_addr = 1569739866}}},

  local_name = 0x9fa1d0 pop.te.com}
set = optimized out
__FUNCTION__ = master_service_settings_cache_read
#3  0x7fc7a7a25a1b in login_settings_read (pool=0xbc54e0, 
local_ip=optimized out, remote_ip=optimized out,
local_name=optimized out, other_settings_r=0x7e455908) at 
login-settings.c:226
input = {roots = 0x604500, config_path = 0x0, 
preserve_environment = false, preserve_user = false,
  preserve_home = false, never_exec = false, use_sysexits = 
false, parse_full_config = false,
  module = 0x403640 pop3-login, service = 0x40363b pop3, 
username = 0x0, local_ip = {family = 2, u = {ip6 = {

---Type return to continue, or q return to quit---
__in6_u = {__u6_addr8 = .iHb, '\000' repeats 11 
times, __u6_addr16 = {26926, 25160, 0, 0, 0, 0, 0, 0},
  __u6_addr32 = {1648912686, 0, 0, 0}}}, ip4 = {s_addr 
= 1648912686}}}, remote_ip = {family = 2, u = {
  ip6 = {__in6_u = {__u6_addr8 = ZT\220], '\000' repeats 
11 times, __u6_addr16 = {21594, 23952, 0, 0, 0, 0,
0, 0}, __u6_addr32 = {1569739866, 0, 0, 0}}}, ip4 = 
{s_addr = 1569739866}}},

  local_name = 0x9fa1d0 pop.te.com}
error = optimized out
parser = optimized out
cache_sets = optimized out
sets = optimized out
i = optimized out
count = optimized out
__FUNCTION__ = login_settings_read
#4  0x7fc7a7a28278 in ssl_servername_callback (ssl=0xa0d6e0, 
al=optimized out, context=optimized out)

at ssl-proxy-openssl.c:1144
ctx = optimized out
proxy = optimized out
client = 0xe95b98
host = optimized out
other_sets = 0x0
#5  0x7fc7a71c6162 in ?? () from 
/usr/lib/x86_64-linux-gnu/libssl.so

Re: [Dovecot] pop3 proxying error

2012-08-07 Thread to...@starbridge.org

Le 07/08/2012 16:57, Timo Sirainen a écrit :

On 7.8.2012, at 15.54, to...@starbridge.org wrote:


#0  settings_parser_dup (old_ctx=0xa26920, new_pool=0x6d6f632e32) at 
settings-parser.c:1742
new_ctx = optimized out
iter = optimized out
new_link = optimized out
links = optimized out
key = optimized out
value = optimized out
i = optimized out
parser_pool = optimized out
__FUNCTION__ = settings_parser_dup
#1  0x7fc7a77c3ecc in cache_add (parser=0xa26920, output=0x7e4557f0, 
input=0x7e455790, cache=0x60ea50)
at master-service-settings-cache.c:221
entry = 0xe98b90
pool = 0xe98b70
pool_size = optimized out
entry_local_name = 0xe98b90 pop.te.com

I guess nobody had tried to run Dovecot with many local / remote {} blocks 
previously. Fixed: http://hg.dovecot.org/dovecot-2.1/rev/2815175a0ffc


Thanks Timo
I will give it a try ASAP, but is it a bad thing to run dovecot with 
many local {} ?


Thanks again for your work !
Regards
Tonio



Re: [Dovecot] fts solr : out of memory

2012-07-31 Thread to...@starbridge.org
Le 31/07/2012 21:04, Timo Sirainen a écrit :
 On 29.7.2012, at 2.20, to...@starbridge.org wrote:

 it seems ok now with memory problem, but an other error shows up:

 doveadm -v index -u c...@spamguard.fr INBOX
 doveadm(c...@spamguard.fr): Info: INBOX: Caching mails seq=1..59363
 21500/59363doveadm(c...@spamguard.fr): Error: fts_solr: Invalid XML
 input at line 1: mismatched tag
 No idea. You can reproduce this? What does it log with this patch? 
 http://hg.dovecot.org/dovecot-2.1/rev/817b69b2b21f

It happens every time on the same mailboxes (very few) around the same
uid number (I think I can find the exact uid with strace and send the
email message to you if it helps)

catalina.out show this at this time:

INFO: {} 0 1
31 juil. 2012 21:19:56 org.apache.solr.common.SolrException log
GRAVE: org.apache.solr.common.SolrException: Illegal character
((CTRL-CHAR, code 4))
 at [row,col {unknown-source}]: [533,500]
at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:81)
at
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal
character ((CTRL-CHAR, code 4))
 at [row,col {unknown-source}]: [533,500]
at
com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:675)
at
com.ctc.wstx.sr.BasicStreamReader.readTextSecondary(BasicStreamReader.java:4668)
at
com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:4126)
at
com.ctc.wstx.sr.BasicStreamReader.finishToken(BasicStreamReader.java:3701)
at
com.ctc.wstx.sr.BasicStreamReader.safeFinishToken(BasicStreamReader.java:3649)
at
com.ctc.wstx.sr.BasicStreamReader.getText(BasicStreamReader.java:809)
at org.apache.solr.handler.XMLLoader.readDoc(XMLLoader.java:315)
at
org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:156)
at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:79)
... 17 more

31 juil. 2012 21:19:56 org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/update params={} status=400 QTime=1

After a quick google search , it seems related to invalid Control
Character sent to SOLR.



I've applied your last patch and the message is now:
Error: fts_solr: Invalid XML input at 4:113: mismatched tag (near:
htmlheadtitleApache Tomcat/6.0.35 - Rapport
d'erreur/titlestyle!--H1
{font-family:Tahoma,Arial,sans-serif;color:white)
doveadm(xx@xx): Panic: file solr-connection.c: line 547
(solr_connection_post_more): assertion failed: (maxfd = 0)
doveadm(xx@xx): Error: Raw backtrace:
/usr/lib/dovecot/libdovecot.so.0(+0x43d9a) [0x7fadd7e1dd9a] -
/usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x2a)
[0x7fadd7e1de5a] - /usr/lib/dovecot/libdovecot.so.0(i_fatal+0)
[0x7fadd7df562a] -
/usr/lib/dovecot/modules/lib21_fts_solr_plugin.so(solr_connection_post_more+0x249)
[0x7fadd5f84929] -
/usr/lib/dovecot/modules/lib21_fts_solr_plugin.so(+0x4af7)
[0x7fadd5f81af7] -
/usr/lib/dovecot/modules/lib20_fts_plugin.so(fts_build_mail+0x3bd)
[0x7fadd65a6e5d] -
/usr/lib/dovecot/modules/lib20_fts_plugin.so(+0xc570) [0x7fadd65ab570]
- doveadm() [0x412ce1] - doveadm() [0x40fbd2] - doveadm() [0x4105db]
- doveadm(doveadm_mail_try_run+0x161) [0x410a41] - doveadm(main+0x375)
[0x40f7e5] - /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd)
[0x7fadd7a71ead] - doveadm() [0x40f9d1]
Abandon


and catalina.out:

GRAVE: org.apache.solr.common.SolrException: Illegal character
((CTRL-CHAR, code 4))
 at [row,col {unknown-source}]: [533,500

[Dovecot] fts solr : out of memory

2012-07-28 Thread to...@starbridge.org
Hi Timo,
since I've upgraded to 2.1.8, solr indexer doesnt work correctly.
I see a lot of these errors in logs:

 Fatal: master: service(indexer-worker): child 9582 returned error 83
(Out of memory (service indexer-worker { vsz_limit=256 MB }, you may
need to increase it))

I've tried to set vsz_limit to a lot more, (around 4096 MB) but same
problem occurs.

thank for your help !
Regards
Tonio


Java(TM) SE Runtime Environment (build 1.6.0_31-b04)

doveconf -n
# 2.1.8: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.13--std-ipv6-64 x86_64 Debian wheezy/sid xfs
auth_cache_negative_ttl = 0
auth_cache_size = 10 M
auth_mechanisms = plain login
dict {
  quota = mysql:/etc/dovecot/dovecot-dict-quota-sql.conf
}
hostname = maildir2.spamguard.fr
log_timestamp = %Y-%m-%d %H:%M:%S
mail_gid = vmail
mail_location = sdbox:/home/virtual/%u
mail_plugins = quota fts fts_solr acl zlib
mail_privileged_group = vmail
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = comparator-i;octet
comparator-i;ascii-casemap fileinto reject envelope encoded-character
vacation subaddress comparator-i;ascii-numeric relational regex
imap4flags copy include variables body enotify environment mailbox date
spamtest spamtestplus virustest
namespace {
  inbox = yes
  location =
  prefix =
  separator = /
  type = private
}
namespace {
  alias_for =
  hidden = yes
  inbox = no
  list = no
  location =
  prefix = INBOX/
  separator = /
  type = private
}
namespace {
  list = children
  location = sdbox:/home/virtual/%%u:INDEX=/home/virtual/%u/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = file:/home/virtual/shared-%d-mailboxes.db
  autocreate = Spam
  autocreate2 = SpamFalse
  autocreate3 = SpamToLearn
  autocreate4 = Sent
  autosubscribe = Spam
  autosubscribe2 = SpamFalse
  autosubscribe3 = SpamToLearn
  autosubscribe4 = Sent
  fts = solr
  fts_solr = url=http://localhost:8081/solr/
  mail_log_events = delete undelete expunge copy mailbox_delete
mailbox_rename save mailbox_create
  mail_log_fields = uid box msgid size
  quota = dict:User quota::proxy::quota
  quota2 = dict:User quota::file:/home/virtual/%u/dovecot-quota
  quota_warning = storage=85%% quota-warning 85 %u
  sieve = ~/dovecot.sieve
  sieve_before = /home/virtual/sieve/
  sieve_dir = ~/sieve
  zlib_save = bz2
  zlib_save_level = 9
}
protocols = imap pop3 sieve lmtp
service auth {
  unix_listener /var/spool/postfix-in2/private/auth {
group = mail
mode = 0660
user = postfix
  }
  unix_listener /var/spool/postfix-maildir2/private/auth {
group = mail
mode = 0660
user = postfix
  }
  unix_listener /var/spool/postfix-msa/private/auth {
group = mail
mode = 0660
user = postfix
  }
  unix_listener /var/spool/postfix-smtp06/private/auth {
group = mail
mode = 0660
user = postfix
  }
  unix_listener /var/spool/postfix/private/auth {
group = mail
mode = 0660
user = postfix
  }
  unix_listener auth-in2-master {
mode = 0660
user = vmail
  }
  unix_listener auth-maildir2-master {
mode = 0660
user = vmail
  }
  unix_listener auth-master {
mode = 0660
user = vmail
  }
  unix_listener auth-msa-master {
mode = 0660
user = vmail
  }
  unix_listener auth-out-master {
mode = 0660
user = vmail
  }
  unix_listener auth-smtp06-master {
mode = 0660
user = vmail
  }
  unix_listener auth-userdb {
mode = 0660
user = vmail
  }
}
service dict {
  unix_listener dict {
mode = 0600
user = vmail
  }
}
service imap-login {
  inet_listener imap {
port = 143
  }
  inet_listener imaps {
port = 993
  }
  process_limit = 256
  process_min_avail = 4
  service_count = 0
  vsz_limit = 256 M
}
service lmtp {
  inet_listener lmtp {
address = 46.105.108.210
port = 24
  }
  user = vmail
  vsz_limit = 368 M
}
service managesieve-login {
  inet_listener sieve {
port = 4190
  }
  process_limit = 256
  vsz_limit = 64 M
}
service pop3-login {
  inet_listener pop3 {
port = 110
  }
  inet_listener pop3s {
port = 995
  }
  process_limit = 256
  process_min_avail = 4
  service_count = 0
  vsz_limit = 256 M
}
service quota-warning {
  executable = script /usr/bin/quota-warning.sh
  unix_listener quota-warning {
mode = 0600
user = vmail
  }
  user = vmail
}
ssl = required
ssl_ca = /etc/dovecot/ca-bundle.crt
ssl_cert = /etc/dovecot/mx2.eole-its.com.certchained.pem
ssl_key = /etc/postfix/tls/mx2.eole-its.com.key.pem
ssl_verify_client_cert = yes
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
protocol imap {
  imap_client_workarounds = delay-newmail
  imap_max_line_length = 64 k
  mail_max_userip_connections = 60
  mail_plugins = quota imap_quota acl imap_acl autocreate mail_log
notify fts fts_solr zlib
}
protocol pop3 {
  mail_plugins = quota
  pop3_client_workarounds = outlook-no-nuls 

Re: [Dovecot] fts solr : out of memory

2012-07-28 Thread to...@starbridge.org
Le 28/07/2012 18:09, Matthew Powell a écrit :
 On 2012-07-28, at 11.21, to...@starbridge.org wrote:

 Fatal: master: service(indexer-worker): child 9582 returned error 83
 (Out of memory (service indexer-worker { vsz_limit=256 MB }, you may
 need to increase it))
 This looks very much like an issue I've been having with fts-lucene. Indexing 
 works (or at least completes without errors) in 2.1.7, but runs out of memory 
 in 2.1.8.

 doveadm -v index -u username '*' crashes with:

 doveadm(username): Fatal: pool_system_realloc(536870912): Out of memory
 doveadm(username): Error: Raw backtrace: 
 /usr/lib/dovecot/libdovecot.so.0(+0x41d31) [0xb7699d31] - 
 /usr/lib/dovecot/libdovecot.so.0(default_fatal_handler+0x47) [0xb7699e47] - 
 /usr/lib/dovecot/libdovecot.so.0(i_fatal+0) [0xb766c958] - 
 /usr/lib/dovecot/libdovecot.so.0(+0x5420e) [0xb76ac20e] - 
 /usr/lib/dovecot/libdovecot.so.0(+0x3e358) [0xb7696358] - 
 /usr/lib/dovecot/libdovecot.so.0(buffer_get_space_unsafe+0x72) [0xb76967f2] 
 - /usr/lib/dovecot/libdovecot.so.0(buffer_append_space_unsafe+0x2b) 
 [0xb769691b] - /usr/lib/dovecot/libdovecot.so.0(charset_to_utf8+0xe8) 
 [0xb768c3f8] - 
 /usr/lib/dovecot/libdovecot.so.0(message_decoder_decode_next_block+0x3dd) 
 [0xb767fa4d] - 
 /usr/lib/dovecot/modules/lib20_fts_plugin.so(fts_build_mail+0x11c) 
 [0xb732881c] - /usr/lib/dovecot/modules/lib20_fts_plugin.so(+0xb256) 
 [0xb732e256] - /usr/lib/dovecot/libdovecot-storage.so.0(mail_precache+0xf) 
 [0xb774754f] - doveadm() [0x805736e] - doveadm() [0x805422d] - doveadm() 
 [0x8054aad] - doveadm(doveadm_mail_try_run+0x12e) [0x8054fae] - 
 doveadm(main+0x3e4) [0x805bf24] - 
 /lib/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb7527ca6] - doveadm() 
 [0x8053c11]

 The problem occurs repeatably with specific messages. It looks as though the 
 crash happens in lib-charset/charset-iconv.c and the problem was introduced 
 by this change: http://hg.dovecot.org/dovecot-2.1/rev/0fde692cb565. If I 
 remove that one change from 2.1.8, I can index the affected messages again.

 I've posted an example message that triggers the crash here: 
 https://www.atom.net/dovecot/testcase1.eml. That's a very contrived test 
 case, but I've encountered the same behaviour with a real message.

Hi Matthew,
thanks for your answer.
most of our email contains French accents, so may be it's related.

I've forgot to post the complete log message for this error earlier:

Jul 27 19:01:00 mx2 dovecot: indexer-worker(c...@crxx.fr): Fatal:
pool_system_realloc(268435456): Out of memory
Jul 27 19:01:00 mx2 dovecot: indexer-worker(c...@crxx.fr): Error: Raw
backtrace: /usr/lib/dovecot/libdovecot.so.0(+0x43e4a) [0x7fa49c7e4e4a]
- /usr/lib/dovecot/libdovecot.so.0(+0x43e8e) [0x7fa49c7e4e8e] -
/usr/lib/dovecot/libdovecot.so.0(i_error+0) [0x7fa49c7bc784] -
/usr/lib/dovecot/libdovecot.so.0(+0x542f0) [0x7fa49c7f52f0] -
/usr/lib/dovecot/libdovecot.so.0(+0x40fe5) [0x7fa49c7e1fe5] -
/usr/lib/dovecot/libdovecot.so.0(buffer_get_space_unsafe+0x6b)
[0x7fa49c7e297b] -
/usr/lib/dovecot/libdovecot.so.0(charset_to_utf8+0xe7) [0x7fa49c7d9867]
-
/usr/lib/dovecot/libdovecot.so.0(message_decoder_decode_next_block+0x3b8) 
[0x7fa49c7ce9d8]
- /usr/lib/dovecot/modules/lib20_fts_plugin.so(fts_build_mail+0x194)
[0x7fa49af6dc34] -
/usr/lib/dovecot/modules/lib20_fts_plugin.so(+0xc570) [0x7fa49af72570]
- dovecot/indexer-worker() [0x402544] -
/usr/lib/dovecot/libdovecot.so.0(io_loop_call_io+0x36) [0x7fa49c7f1b96]
- /usr/lib/dovecot/libdovecot.so.0(io_loop_handler_run+0xa7)
[0x7fa49c7f2827] - /usr/lib/dovecot/libdovecot.so.0(io_loop_run+0x28)
[0x7fa49c7f15a8] -
/usr/lib/dovecot/libdovecot.so.0(master_service_run+0x13)
[0x7fa49c7de2c3] - dovecot/indexer-worker(main+0xe2) [0x402002] -
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7fa49c438ead]
- dovecot/indexer-worker() [0x4020a1]
Jul 27 19:01:00 mx2 dovecot: indexer: Error: Indexer worker
disconnected, discarding 1 requests for c...@crxx.fr
Jul 27 19:01:00 mx2 dovecot: imap(c...@crxx.fr): Error: indexer failed to
index mailbox INBOX
Jul 27 19:01:00 mx2 dovecot: indexer-worker(cxx@crxx): Fatal: master:
service(indexer-worker): child 9582 returned error 83 (Out of memory
(service indexer-worker { vsz_limit=256 MB }, you may need to increase it))


Hope this helps !