[Dovecot] dovecot-lda segfaults with some sieve scripts
Hello,
One account couldn't get emails all the sudden. dovecot-lda was crashing with "signal 11 (segmentation fault)". There was absolutely nothing in the dovecot logs, even with mail_debug=yes.
I found out that it was because of the following lines in a sieve script that were generated by a script generator (Ingo).
if true { keep; stop; }
I'm using the latest revision of pigeonhole with Dovecot 2.0.4.
Cheers,
Olivier
Op 29-9-2010 14:42, interfaSys sàrl schreef:
Hello,
One account couldn't get emails all the sudden. dovecot-lda was crashing with "signal 11 (segmentation fault)". There was absolutely nothing in the dovecot logs, even with mail_debug=yes.
I found out that it was because of the following lines in a sieve script that were generated by a script generator (Ingo).
if true { keep; stop; }
I'm using the latest revision of pigeonhole with Dovecot 2.0.4.
Hmm. I cannot reproduce this.
You should:
send your dovecot -n output.
If you can easily reproduce it: produce a backtrace of the problem using gdb:
You can for instance run dovecot-lda manually as follows: gdb --args /usr/lib/dovecot-lda -p example-message.eml
And then:
- issue 'r' command
- (hopefully) see it crash with sigsegfault
- issue 'bt full' command and report the output back here
- also include a copy of the full Sieve script that you are using and the example message.
You can also use core dumps if the problem is more transient: http://www.dovecot.org/bugreport.html
Regards,
Stephan.
OK, I'll give the trace a try. Thanks for the instructions.
In the meantime, here is more info. The sieve script does a redirect and a local save. It works fine if only the redirect is in place.
if true { redirect "some.email@domain.com"; }
if true { keep; stop; }
I'm using mdbox as storage.
Cheers,
Olivier
On 29/09/2010 15:01, Stephan Bosch wrote:
Op 29-9-2010 14:42, interfaSys sàrl schreef:
Hello,
One account couldn't get emails all the sudden. dovecot-lda was crashing with "signal 11 (segmentation fault)". There was absolutely nothing in the dovecot logs, even with mail_debug=yes.
I found out that it was because of the following lines in a sieve script that were generated by a script generator (Ingo).
if true { keep; stop; }
I'm using the latest revision of pigeonhole with Dovecot 2.0.4.
Hmm. I cannot reproduce this.
You should:
send your dovecot -n output.
If you can easily reproduce it: produce a backtrace of the problem using gdb:
You can for instance run dovecot-lda manually as follows: gdb --args /usr/lib/dovecot-lda -p example-message.eml
And then:
- issue 'r' command
- (hopefully) see it crash with sigsegfault
- issue 'bt full' command and report the output back here
- also include a copy of the full Sieve script that you are using and the example message.
You can also use core dumps if the problem is more transient: http://www.dovecot.org/bugreport.html
Regards,
Stephan.
Hello,
I tried to do a trace but it didn't seem to work.
(gdb) r Starting program: /usr/libexec/dovecot/dovecot-lda -p example-message.eml (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols founn
Program exited with code 0100.
Nothing gets delivered.
Cheers,
Olivier
On 29/09/2010 15:01, Stephan Bosch wrote:
Op 29-9-2010 14:42, interfaSys sàrl schreef:
Hello,
One account couldn't get emails all the sudden. dovecot-lda was crashing with "signal 11 (segmentation fault)". There was absolutely nothing in the dovecot logs, even with mail_debug=yes.
I found out that it was because of the following lines in a sieve script that were generated by a script generator (Ingo).
if true { keep; stop; }
I'm using the latest revision of pigeonhole with Dovecot 2.0.4.
Hmm. I cannot reproduce this.
You should:
send your dovecot -n output.
If you can easily reproduce it: produce a backtrace of the problem using gdb:
You can for instance run dovecot-lda manually as follows: gdb --args /usr/lib/dovecot-lda -p example-message.eml
And then:
- issue 'r' command
- (hopefully) see it crash with sigsegfault
- issue 'bt full' command and report the output back here
- also include a copy of the full Sieve script that you are using and the example message.
You can also use core dumps if the problem is more transient: http://www.dovecot.org/bugreport.html
Regards,
Stephan.
Hello again,
I've added the -d and -f flags to the command line and this time I got a trace.
(gdb) r Starting program: /usr/libexec/dovecot/dovecot-lda -p example-message.eml -f user@domain.com -d user@domain.com (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols foun. Program received signal SIGSEGV, Segmentation fault. 0x0000000800e70140 in seff_flags_merge () from /usr/lib/dovecot/libdovecot-sieve.so.0 (gdb) bt full #0 0x0000000800e70140 in seff_flags_merge () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #1 0x0000000800e58d61 in sieve_result_side_effects_merge.clone.0 () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #2 0x0000000800abf0b0 in ?? () No symbol table info available. #3 0x0000000800abc040 in ?? () No symbol table info available. #4 0x0000000800abf0f8 in ?? () No symbol table info available. #5 0x0000000800ea08e0 in sieve_side_effect_operand_class () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #6 0x0000000800abc388 in ?? () No symbol table info available. #7 0x0000000800abc040 in ?? () No symbol table info available. #8 0x0000000800abc388 in ?? () No symbol table info available. #9 0x00007fffffffe180 in ?? () No symbol table info available. #10 0x0000000800abf078 in ?? () No symbol table info available. #11 0x0000000800e58f71 in _sieve_result_add_action () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #12 0x0000000800e59415 in sieve_result_add_keep () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #13 0x0000000800e670f3 in cmd_keep_operation_execute () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #14 0x0000000800000005 in ?? () No symbol table info available. #15 0x0000000000000000 in ?? () No symbol table info available. #16 0x0000000800000001 in ?? () No symbol table info available. #17 0x0000000800abf0b0 in ?? () No symbol table info available. #18 0x0000000800abf040 in ?? () No symbol table info available. #19 0x0000000800e5542b in sieve_interpreter_continue () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #20 0x0000000800e555bb in sieve_interpreter_run () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #21 0x0000000800e6a8f5 in sieve_multiscript_run () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available. #22 0x0000000000000000 in ?? () No symbol table info available. #23 0x0000000800abf040 in ?? () No symbol table info available. #24 0x0000000000000001 in ?? () No symbol table info available. #25 0x0000000000000001 in ?? () No symbol table info available. #26 0x0000000000000001 in ?? () No symbol table info available. #27 0x0000000800a06248 in ?? () No symbol table info available. #28 0x0000000000000008 in ?? () No symbol table info available. #29 0x0000000800a23e40 in ?? () No symbol table info available. #30 0x0000000000000001 in ?? () No symbol table info available. #31 0x0000000800515bfb in lda_sieve_deliver_mail () from /usr/lib/dovecot/lib90_sieve_plugin.so
Cheers,
Olivier
On 29/09/2010 15:01, Stephan Bosch wrote:
Op 29-9-2010 14:42, interfaSys sàrl schreef:
Hello,
One account couldn't get emails all the sudden. dovecot-lda was crashing with "signal 11 (segmentation fault)". There was absolutely nothing in the dovecot logs, even with mail_debug=yes.
I found out that it was because of the following lines in a sieve script that were generated by a script generator (Ingo).
if true { keep; stop; }
I'm using the latest revision of pigeonhole with Dovecot 2.0.4.
Hmm. I cannot reproduce this.
You should:
send your dovecot -n output.
If you can easily reproduce it: produce a backtrace of the problem using gdb:
You can for instance run dovecot-lda manually as follows: gdb --args /usr/lib/dovecot-lda -p example-message.eml
And then:
- issue 'r' command
- (hopefully) see it crash with sigsegfault
- issue 'bt full' command and report the output back here
- also include a copy of the full Sieve script that you are using and the example message.
You can also use core dumps if the problem is more transient: http://www.dovecot.org/bugreport.html
Regards,
Stephan.
Op 29-9-2010 17:33, interfaSys sàrl schreef:
Hello again,
I've added the -d and -f flags to the command line and this time I got a trace.
(gdb) r Starting program: /usr/libexec/dovecot/dovecot-lda -p example-message.eml -f user@domain.com -d user@domain.com (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols foun. Program received signal SIGSEGV, Segmentation fault. 0x0000000800e70140 in seff_flags_merge () from /usr/lib/dovecot/libdovecot-sieve.so.0 (gdb) bt full #0 0x0000000800e70140 in seff_flags_merge () from
According to this, you have a require "imap4flags"; somewhere on top of your Sieve script right?
Regards,
Stephan.
Op 29-9-2010 17:35, Stephan Bosch schreef:
Op 29-9-2010 17:33, interfaSys sàrl schreef:
(gdb) bt full #0 0x0000000800e70140 in seff_flags_merge () from
According to this, you have a require "imap4flags"; somewhere on top of your Sieve script right?
Also, it's apparently running in multiscript context:
#21 0x0000000800e6a8f5 in sieve_multiscript_run () from /usr/lib/dovecot/libdovecot-sieve.so.0
Could you send me (not the list necessarily) full versions of all involved scripts (including those executed from sieve_before/sieve_after) and the output of dovecot -n?
Regards,
Stephan.
On 29/09/2010 16:40, Stephan Bosch wrote:
Op 29-9-2010 17:35, Stephan Bosch schreef:
Op 29-9-2010 17:33, interfaSys sàrl schreef:
(gdb) bt full #0 0x0000000800e70140 in seff_flags_merge () from
According to this, you have a require "imap4flags"; somewhere on top of your Sieve script right?
Nope, only fileinto, but the sieve_before script does.
require "fileinto";
if true { redirect "ofutur@gmail.com"; }
if true { keep; stop; }
Also, it's apparently running in multiscript context:
#21 0x0000000800e6a8f5 in sieve_multiscript_run () from /usr/lib/dovecot/libdovecot-sieve.so.0
Indeed
Could you send me (not the list necessarily) full versions of all involved scripts (including those executed from sieve_before/sieve_after) and the output of dovecot -n?
There is just one.
require ["fileinto","imap4flags"];
if allof(header :contains "X-DSPAM-Result" "Spam", not header :contains "X-DSPAM-Reclassified" "Innocent") {
setflag "\\Seen"; fileinto "INBOX/spam"; stop; }
keep;
I'll send doveconf -n separately
Regards,
Stephan.
Cheers,
Olivier
Hello again,
I've added the -d and -f flags to the command line and this time I got a trace.
(gdb) r Starting program: /usr/libexec/dovecot/dovecot-lda -p example-message.eml -f user@domain.com -d user@domain.com (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols foun. Program received signal SIGSEGV, Segmentation fault. 0x0000000800e70140 in seff_flags_merge () from /usr/lib/dovecot/libdovecot-sieve.so.0 (gdb) bt full #0 0x0000000800e70140 in seff_flags_merge () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available.
Does the attached patch fix it perhaps?
Regards,
Stepha.
Hello Stephan,
This fix works. Thank you for that.
Cheers,
Olivier
On 29/09/2010 18:11, Stephan Bosch wrote:
Hello again,
I've added the -d and -f flags to the command line and this time I got a trace.
(gdb) r Starting program: /usr/libexec/dovecot/dovecot-lda -p example-message.eml -f user@domain.com -d user@domain.com (no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols foun. Program received signal SIGSEGV, Segmentation fault. 0x0000000800e70140 in seff_flags_merge () from /usr/lib/dovecot/libdovecot-sieve.so.0 (gdb) bt full #0 0x0000000800e70140 in seff_flags_merge () from /usr/lib/dovecot/libdovecot-sieve.so.0 No symbol table info available.
Does the attached patch fix it perhaps?
Regards,
Stepha.
participants (2)
-
interfaSys sàrl
-
Stephan Bosch