Problems (and some solutions) with cyradm

Carson Gaspar carson at taltos.org
Tue Oct 3 12:15:51 EDT 2006


[ cyrus-imapd 2.3.7, cyrus-sasl 2.1.22, db 4.4.20, Solaris 10 x86, 
perl-5.8.8, Studio 11 ]

Out-of-the-box, perl/imap is just plain broken. The main problem is that it 
links in lib/libcyrus.a and lib/libcyrus_min.a. Sadly, the objects in those 
archives were _not_ compiled as relocatable objects. This causes run-time 
errors when perl tries to load IMAP.so. Under Solaris amd64, it looks like:

Can't load 
'/export/data/home/carson/build/cyrus-imapd-2.3.7/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so' 
for module Cyrus::IMAP: ld.so.1: perl: fatal: relocation error: 
R_AMD64_PC32: file 
/export/data/home/carson/build/cyrus-imapd-2.3.7/perl/imap/blib/arch/auto/Cyrus/IMAP/IMAP.so: 
symbol sprintf: value 0x280013cfe3d does not fit at 
/Tools/SunOS_5.10_i86pc_amd64/perl-5.8.8/lib/5.8.8/amd64-solaris-64-ld/DynaLoader.pm 
line 230

I've worked around it for now by adding -KPIC to my CFLAGS. This yields a 
functional cyradm, but I'm not sure if we really want all the objects 
everywhere built in PIC mode...

The next bug I haven't tracked down yet. When I disconnect from a server 
(via disconnect or quit) cyradm perl dumps core. Here's a backtrace, but 
everything is compiled with optimization, so I don't trust it much... I'll 
gladly compile a full debugging perl/cyrus-imapd if folks think it would 
help.

carson:gandalf 0 PERL$ /tools/cyrus-imapd/bin/cyradm localhost
Password:
localhost> quit
Segmentation Fault (core dumped)

Tue Oct 03 08:58:51 ~/build/cyrus-imapd-2.3.7
carson:gandalf 139 PERL$ dbx /tools/perl/bin/perl core
Reading perl
core file header read successfully
Reading ld.so.1
Reading libsocket.so.1
Reading libnsl.so.1
Reading libdl.so.1
Reading libm.so.2
Reading libc.so.1
Reading IO.so
Reading Fcntl.so
Reading IMAP.so
Reading libdb-4.4.so
Reading libsasl2.so.2.0.22
Reading librt.so.1
Reading libssl.so.0.9.8
Reading libcrypto.so.0.9.8
Reading libresolv.so.2
Reading libaio.so.1
Reading libmd5.so.1
Reading POSIX.so
Reading libsasldb.so.2.0.22
Reading libscf.so.1
Reading libdoor.so.1
Reading libuutil.so.1
Reading libmp.so.2
Reading libcrammd5.so.2.0.22
Reading libdigestmd5.so.2.0.22
Reading libotp.so.2.0.22
Reading libsrp.so.2.0.22
Reading libgssapiv2.so.2.0.22
Reading libgss.so.1
Reading libcmd.so.1
Reading libplain.so.2.0.22
Reading libanonymous.so.2.0.22
Reading liblogin.so.2.0.22
Reading libntlm.so.2.0.22
program terminated by signal SEGV (no mapping at the fault address)
0xfffffd7fff16cf14: realfree+0x00f4:    cmpq     %rdx,(%rbx)
(dbx) where
=>[1] realfree(0x86c6a000, 0x0, 0x100, 0x101010101010101, 0x5686c0, 0x0), 
at 0xfffffd7fff16cf14
  [2] cleanfree(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff16d60f
  [3] _malloc_unlocked(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff16c8a9
  [4] malloc(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7fff16c80d
  [5] Perl_savepvn(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x493382
  [6] Perl_sv_magicext(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5e16f0, 0x5e18d0, 
0x556d28, 0xfffffd7fffdfef38, 0x42, 0x563d10, 0xfffffd7fffdfef70, 0x43b234, 
0x0, 0x564970, 0x64b618, 0x41, 0x564970), at 0x4ba206
  [7] Perl_sv_magic(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x4ba50a
  [8] Perl_Gv_AMupdate(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x43b234
  [9] Perl_gv_handler(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x43b2bb
  [10] Perl_sv_clear(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x4bb73e
  [11] Perl_sv_free(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x4bc562
  [12] Perl_gp_free(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x43ab25
  [13] Perl_sv_clear(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x4bbe91
  [14] do_clean_named_objs(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x4b143a
  [15] Perl_sv_clean_objs(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x4b1549
  [16] perl_destruct(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x42f430
  [17] main(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0x42e279
(dbx) 


More information about the Cyrus-devel mailing list