[Dovecot] managesieve segfault with gold linker
dovecot-2.1.8 sieve-0.3.1 binutils-2.22
When dovecot and sieve is linked with ld.gold I get a segfault in checkscript command:
$ telnet localhost 4190
[some output]
authenticate "PLAIN" "
Logs: 2012-07-12T19:30:23.624158+00:00 bob dovecot: master: Dovecot v2.1.8 starting up 2012-07-12T19:31:22.548913+00:00 bob dovecot: managesieve-login: Login: user=<username>, method=PLAIN, rip=192.168.122.1, lip=192.168.122.64, mpid=12169, session=<YGo2AqfEcwDAqHoB> 2012-07-12T19:31:34.636747+00:00 bob dovecot: managesieve(username): Fatal: master: service(managesieve): child 12169 killed with signal 11 (core dumped)
make check also fails (thank you for that): [...] Test case: ./tests/execute/errors.svtest:
1: Test 'Action conflicts: reject <-> fileinto' SUCCEEDED 2: Test 'Action conflicts: reject <-> keep' SUCCEEDED 3: Test 'Action conflicts: reject <-> redirect' SUCCEEDED 4: Test 'Action limit' SUCCEEDED 5: Test 'Redirect limit' SUCCEEDED /tmp/work/dovecot-2.1-pigeonhole-0.3.1/src/testsuite/.libs/lt-testsuite: symbol lookup error: /tmp/work/dovecot-2.1-pigeonhole-0.3.1/src/lib-sieve/.libs/libdovecot-sieve.so.0: undefined symbol: mail_deliver_get_log_var_expand_table make: *** [tests/execute/errors.svtest] Error 127
Backtrace is attached.
-- Eray Aslan eras@gentoo.org
On 7/12/2012 10:27 PM, Eray Aslan wrote:
dovecot-2.1.8 sieve-0.3.1 binutils-2.22
When dovecot and sieve is linked with ld.gold I get a segfault in checkscript command:
$ telnet localhost 4190 [some output] authenticate "PLAIN" "
" [some more output] checkscript "foobarscript" connection closed Logs: 2012-07-12T19:30:23.624158+00:00 bob dovecot: master: Dovecot v2.1.8 starting up 2012-07-12T19:31:22.548913+00:00 bob dovecot: managesieve-login: Login: user=<username>, method=PLAIN, rip=192.168.122.1, lip=192.168.122.64, mpid=12169, session=<YGo2AqfEcwDAqHoB> 2012-07-12T19:31:34.636747+00:00 bob dovecot: managesieve(username): Fatal: master: service(managesieve): child 12169 killed with signal 11 (core dumped)
Based on your excellent bug report, I fixed this one yesterday:
http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/6ceeb6421231
make check also fails (thank you for that): [...] Test case: ./tests/execute/errors.svtest:
1: Test 'Action conflicts: reject <-> fileinto' SUCCEEDED 2: Test 'Action conflicts: reject <-> keep' SUCCEEDED 3: Test 'Action conflicts: reject <-> redirect' SUCCEEDED 4: Test 'Action limit' SUCCEEDED 5: Test 'Redirect limit' SUCCEEDED /tmp/work/dovecot-2.1-pigeonhole-0.3.1/src/testsuite/.libs/lt-testsuite: symbol lookup error: /tmp/work/dovecot-2.1-pigeonhole-0.3.1/src/lib-sieve/.libs/libdovecot-sieve.so.0: undefined symbol: mail_deliver_get_log_var_expand_table make: *** [tests/execute/errors.svtest] Error 127
I can't reproduce this (on Debian stable). How exactly did you configure dovecot sources to use ld.gold? I just installed the binutils-gold package, but I get the impression that ld.gold may not actually be used. Also, perhaps this is caused by a version difference (mine is GNU gold (GNU Binutils for Debian 2.20.1-system.20100303) 1.9).
I get the impression that this is an LD bug, but I do like to be sure.
Regards,
Stephan.
On 07/13/2012 12:53 PM, Stephan Bosch wrote:
http://hg.rename-it.nl/dovecot-2.1-pigeonhole/rev/6ceeb6421231
Still no go with binutils-2.22. make check fails with the same error message. Telnetting and issuing checkscript gives not a segfault but some parser error.
I can't reproduce this (on Debian stable). How exactly did you configure dovecot sources to use ld.gold? I just installed the binutils-gold package, but I get the impression that ld.gold may not actually be used.
Make sure /usr/bin/ld is a symlink to /usr/bin/ld.gold and not to ld.bfd
- which it should if you installed binutils-gold.
Also, perhaps this is caused by a version difference (mine is GNU gold (GNU Binutils for Debian 2.20.1-system.20100303) 1.9).
I can't check binutils-2.20 easily. I did check linking with gold with binutils-2.21, binutils-2.22 and binutils-2.22.52.0.4. All fail.
I get the impression that this is an LD bug, but I do like to be sure.
Aye, that's my impression as well. I'll try to find out more but I will be on vacation for a few days so it might not be quick. In the meantime, if you make any headway, please let me know. Thank you.
-- Eray Aslan eras@gentoo.org
On 07/13/2012 04:38 PM, Eray Aslan wrote:
I'll try to find out more but I will be on vacation for a few days so it might not be quick.
Recap:
When linked with gold, pigeonhole-0.3.1 make check fails with:
dovecot-2.1-pigeonhole-0.3.1/src/testsuite/.libs/lt-testsuite:
symbol lookup error:
dovecot-2.1-pigeonhole-0.3.1/src/lib-sieve/.libs/libdovecot-sieve.so.0:
undefined symbol: mail_deliver_get_log_var_expand_table
Well, /usr/lib64/dovecot/libdovecot-lda.so provides the
mail_deliver_get_log_var_expand_table symbol, but
/usr/lib64/dovecot/libdovecot-sieve.so doesn't link against it. The
following patch works for me:
--- src/lib-sieve/Makefile.am 2012-05-11 03:38:47.000000000 +0300
+++ src/lib-sieve/Makefile.am 2012-07-30 17:38:15.878643313 +0300
@@ -70,8 +70,8 @@
$(extdir)/vnd.dovecot/duplicate/libsieve_ext_duplicate.la \
$(unfinished_plugins)
-libdovecot_sieve_la_DEPENDENCIES = $(plugins)
-libdovecot_sieve_la_LIBADD = $(plugins)
+libdovecot_sieve_la_DEPENDENCIES = $(plugins) $(LIBDOVECOT_LDA_DEPS)
+libdovecot_sieve_la_LIBADD = $(plugins) $(LIBDOVECOT_LDA)
libdovecot_sieve_la_SOURCES = \
rfc2822.c \
--
Eray Aslan
On 7/30/2012 4:56 PM, Eray Aslan wrote:
On 07/13/2012 04:38 PM, Eray Aslan wrote:
I'll try to find out more but I will be on vacation for a few days so it might not be quick. Recap: When linked with gold, pigeonhole-0.3.1 make check fails with: dovecot-2.1-pigeonhole-0.3.1/src/testsuite/.libs/lt-testsuite: symbol lookup error: dovecot-2.1-pigeonhole-0.3.1/src/lib-sieve/.libs/libdovecot-sieve.so.0: undefined symbol: mail_deliver_get_log_var_expand_table
Well, /usr/lib64/dovecot/libdovecot-lda.so provides the mail_deliver_get_log_var_expand_table symbol, but /usr/lib64/dovecot/libdovecot-sieve.so doesn't link against it. The following patch works for me:
I applied this patch a while back, but I forgot to mail about it after I tested it. It works also for the normal linker, so I guess it is ok.
I cannot produce a URL for the commit right now, because the hg server is down for some unexpected maintenance.
Regards,
Stephan.
participants (2)
-
Eray Aslan
-
Stephan Bosch