Re: 64-bit alignment problems.

From: Andy Fiddaman (no email)
Date: Sun Sep 09 2007 - 14:46:18 EDT

  • Next message: George Cooke: "Re: Moving a mailbox out of the spool, and resetting it?"

    On Fri, 7 Sep 2007, Ken Murchison wrote:

    ; We have been running 2.3.x code on 64-bit sparcv9 kernels (Solaris 8 on Sun
    ; Fire V240) without any problem. What is your hardware and OS?

    The test server is a Sun V210 running
    SunOS xxx 5.10 Generic_125100-10 sun4u sparc SUNW,Sun-Fire-V210

    (Solaris 10u2 fully patched as of ~4 weeks ago)

    I've compiled Cyrus as a 64-bit application:

    # file /opt/cyrus/bin/imapd
    /opt/cyrus/bin/imapd: ELF 64-bit MSB executable SPARCV9 Version 1, dynamically linked, not stripped

    CFLAGS="-g -fPIC" ./configure \
            --prefix=/opt/cyrus \
            --with-cyrus-prefix=/opt/cyrus \
            --sysconfdir=/opt/cyrus/etc \
            --with-openssl=/opt/openssl \
            --with-sasl=/opt/CYRsasl2 \
            --with-bdb=/opt/bdb \
            --with-bdb-incdir=/opt/bdb/include \
            --with-bdb-libdir=/opt/bdb/lib \
            --enable-replication \
            --enable-murder \
            --with-perl=/opt/perl/bin/perl

    Without the patches I get a lot of Bus errors in various processes,
    examples below - as you can see they're all related to an unaligned 64-bit
    dereference.

    Program terminated with signal 10, Bus error.
    #0 0x0000000100060138 in mailbox_index_record_to_buf (
    record=0xffffffff7fffdb20, buf=0xffffffff7fffd9ec "") at mailbox.c:1372
    1372 *((bit64 *)(buf+OFFSET_MODSEQ_64)) = htonll(record->modseq);

    Program terminated with signal 10, Bus error.
    #0 0x0000000100062b78 in mailbox_expunge (mailbox=0x100270558, decideproc=0,
    deciderock=0x0, flags=0) at mailbox.c:2194
    2194 *((bit64 *)(buf+OFFSET_QUOTA_MAILBOX_USED64)) = htonll(0);

    Program terminated with signal 10, Bus error.
    #0 0x0000000100009e38 in restore_expunged (mailbox=0xffffffff7fffe618,
    msgs=0x100202900, eexists=1, expunge_index_base=0xffffffff7a100000 "",
    numrestored=0xffffffff7fffd584, unsetdeleted=0) at unexpunge.c:307
    307 newquotaused =

    Program terminated with signal 10, Bus error.
    #0 0x000000010002af64 in split_attribs (data=0xffffffff7c017014 "",
    datalen=30, attrib=0xffffffff7fffeed0) at annotate.c:313
    313 attrib->size = (size_t) ntohl(*(unsigned long *) data);

    etc. etc.

    ----
    Cyrus Home Page: http://cyrusimap.web.cmu.edu/
    Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
    List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
    

  • Next message: George Cooke: "Re: Moving a mailbox out of the spool, and resetting it?"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD