Support Center > Search Results > SecureKnowledge Details
MDQ daemon crashes when working with SMTP traffic in case DNS MX record answer contains IPv6 address Technical Level
Symptoms
  • When attempting to send an e-mail, the spool directory continuously gets larger and no mail is sent.
    Once the problematic entry in the spool directory is removed, the rest of the mail continues to be sent correctly.

  • The MDQ daemon starts crashing immediately once one of the problematic entries enters the spool directory.

  • MDQ core dump files show the following stack:
    Core was generated by `mdq 0'.
    Program terminated with signal 11, Segmentation fault.
    #0 0x... in __libc_realloc (oldmem=0x0, bytes=0) at malloc.c
    ... _int_free(ar_ptr, oldp, 0);
    (gdb) bt
    #0 0x... in __libc_realloc (oldmem=0x0, bytes=0) at malloc.c
    #1 0x... in CpEnt::compare (this=0x..., e=...) at Ent.cpp
    #2 0x... in CpHostent::compare (this=0x..., h=...) at Results.cpp
    #3 0x... in CpHostent::operator== (this=0x0, h=...) at Results.cpp
    #4 0x... in CpMxHost::operator== (this=0x..., h=...) at Results.cpp
    #5 0x... in CheckMxResult (mxh=0x...) at MxResolver.cpp
    #6 0x... in CpMxCB (results=0x..., opaque=0x...) at MxResolver.cpp
    #7 0x... in activate_cb (o=0x...) at CpNR_Servant.cpp
    #8 0x... in CpNR_Servant::finish (this=0x..., gd=0x..., reactor=0x0, return_if_cached=0, return_if_waiting=0)
    at CpNR_Servant.cpp
    #9 0x... in CpNR_Servant::result_handler (this=0x..., status=TM_WAIT_FAILED, apc=0x...) at CpNR_Servant.cpp
    #10 0x... in ApcObject::signal_handler (this=0x..., e=0x0) at ApcObject.cpp
    #11 0x... in Reactor::poll (this=0x..., timeout=0) at Reactor.cpp
    #12 0x... in Reactor::mainloop (this=0x..., terminate=2) at Reactor.cpp
    #13 0x... in Reactor_mainloop (r=0x0, terminate=0) at Reactor.cpp
    #14 0x... in mdqReactorThread (arg=0x0) at mdequeue_mx.cc
    #15 0x... in _IO_wdefault_pbackfail (fp=<value optimized out>, c=<value optimized out>) at wgenops.c
    .........
    
Cause

MDQ daemon crashes when DNS MX record answer contains IPv6 address, because the MX resolver does not support IPv6.

In addition, a DNS MX record answer without addresses might also cause a crash.


Solution
Note: To view this solution you need to Sign In .