You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by bu...@spamassassin.apache.org on 2025/10/13 13:26:55 UTC

[Bug 8353] New: dns: bad dns reply: *** FATAL PROGRAM ERROR!!\tUnknown instance method "cname"

https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8353

            Bug ID: 8353
           Summary: dns: bad dns reply: ***  FATAL PROGRAM
                    ERROR!!\tUnknown instance method "cname"
           Product: Spamassassin
           Version: 4.0.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Libraries
          Assignee: dev@spamassassin.apache.org
          Reporter: frodo@morgul.net
  Target Milestone: Undefined

Forwarded from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1117982

Multiple people have reported logs similar to the following generated by
spamassassin 4.0.2. It may be that the code isn't handling DNAME record
correctly.

dns: bad dns reply: ***  FATAL PROGRAM ERROR!!\tUnknown instance method "cname"
dns: [...] ***  which the program has attempted to call for the object:
dns: [...] ***
dns: [...] ing.unimore.it.\t86400\tIN\tDNAME\ting.unimo.it.
dns: [...] ***
dns: [...] ***  THIS IS A BUG IN THE CALLING SOFTWARE, which incorrectly
assumes
dns: [...] ***  that the object would be of a particular type.  The type of an
dns: [...] ***  object should be checked before calling any of its methods.
dns: [...] ***
dns: [...] Net::DNS::RR::DNAME 2003
dns: [...]
dns: [...]  at /usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 2926,
<GEN1843> line 303.
dns: [...] \teval {...} called at
/usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 2937
dns: [...]
\tMail::SpamAssassin::PerMsgStatus::add_uri_detail_list(Mail::SpamAssassin::PerMsgStatus=HASH(0x556a8b37d130),
"https://ailb-web.ing.unimore.it/~lorenzo/", HASH(0x556a85fbfbe0), "parsed", 1)
called at /usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 2795
dns: [...]
\tMail::SpamAssassin::PerMsgStatus::_process_text_uri_list(Mail::SpamAssassin::PerMsgStatus=HASH(0x556a8b37d130))
called at /usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 2687
dns: [...]
\tMail::SpamAssassin::PerMsgStatus::get_uri_detail_list(Mail::SpamAssassin::PerMsgStatus=HASH(0x556a8b37d130))
called at /usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 2610
dns: [...]
\tMail::SpamAssassin::PerMsgStatus::get_uri_list(Mail::SpamAssassin::PerMsgStatus=HASH(0x556a8b37d130))
called at /usr/share/perl5/Mail/SpamAssassin/Plugin/Check.pm line 166
dns: [...]
\tMail::SpamAssassin::Plugin::Check::check_main(Mail::SpamAssassin::Plugin::Check=HASH(0x556a84807960),
HASH(0x556a85d3dbf8)) called at
/usr/share/perl5/Mail/SpamAssassin/PluginHandler.pm line 220
dns: [...] \teval {...} called at
/usr/share/perl5/Mail/SpamAssassin/PluginHandler.pm line 222
dns: [...]
\tMail::SpamAssassin::PluginHandler::callback(Mail::SpamAssassin::PluginHandler=HASH(0x556a847bae60),
"check_main", HASH(0x556a85d3dbf8)) called at
/usr/share/perl5/Mail/SpamAssassin.pm line 2370
dns: [...]
\tMail::SpamAssassin::call_plugins(Mail::SpamAssassin=HASH(0x556a847110c8),
"check_main", HASH(0x556a85d3dbf8)) called at
/usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 428
dns: [...]
\tMail::SpamAssassin::PerMsgStatus::check_timed(Mail::SpamAssassin::PerMsgStatus=HASH(0x556a8b37d130),
Mail::SpamAssassin::Timeout=HASH(0x556a8a5fc558), CODE(0x556a8be949d0), 0)
called at /usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 377
dns: [...] \tMail::SpamAssassin::PerMsgStatus::__ANON__ called at
/usr/share/perl5/Mail/SpamAssassin/Timeout.pm line 219
dns: [...] \teval {...} called at /usr/share/perl5/Mail/SpamAssassin/Timeout.pm
line 235
dns: [...]
\tMail::SpamAssassin::Timeout::_run(Mail::SpamAssassin::Timeout=HASH(0x556a8a5fc558),
CODE(0x556a8be949d0), 0) called at
/usr/share/perl5/Mail/SpamAssassin/Timeout.pm line 138
dns: [...]
\tMail::SpamAssassin::Timeout::run(Mail::SpamAssassin::Timeout=HASH(0x556a8a5fc558),
CODE(0x556a8be949d0)) called at
/usr/share/perl5/Mail/SpamAssassin/PerMsgStatus.pm line 377
dns: [...]
\tMail::SpamAssassin::PerMsgStatus::check(Mail::SpamAssassin::PerMsgStatus=HASH(0x556a8b37d130))
called at /usr/sbin/spamd line 2023
dns: [...] \tmain::check("PROCESS", 1.5, 1760262401.79473, "localhost",
"127.0.0.1") called at /usr/sbin/spamd line 1767
dns: [...] \teval {...} called at /usr/sbin/spamd line 1762
dns: [...] \tmain::accept_a_conn(0.5) called at /usr/sbin/spamd line 1492
dns: [...] \teval {...} called at /usr/sbin/spamd line 1492
dns: [...] \tmain::spawn() called at /usr/sbin/spamd line 1331

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8353] dns: bad dns reply: *** FATAL PROGRAM ERROR!!\tUnknown instance method "cname"

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8353

Philippe Chaintreuil <sp...@parallaxshift.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spamassassinbugs_peep@paral
                   |                            |laxshift.com

--- Comment #2 from Philippe Chaintreuil <sp...@parallaxshift.com> ---
I've just started getting a similar error about "Unknown instance 'udpsize'" --
would this fix also cover that error?



 dns: bad dns reply: ***  FATAL PROGRAM ERROR!!\tUnknown instance method
"udpsize"
 dns: [...] ***  which the program has attempted to call for the object:
 dns: [...] ***
 dns: [...] .\tOPT\t \t; no data
 dns: [...] ***
 dns: [...] ***  THIS IS A BUG IN THE CALLING SOFTWARE, which incorrectly
assumes
 dns: [...] ***  that the object would be of a particular type.  The type of an
 dns: [...] ***  object should be checked before calling any of its methods.
 dns: [...] ***
 dns: [...] Net::DNS::RR 2037
 dns: [...] Attempt to reload Net/DNS/RR/OPT.pm aborted.
 dns: [...] 
 dns: [...] \teval {...} called at /usr/sbin/spamd line 1484
 dns: [...] \tmain::spawn() called at /usr/sbin/spamd line 1323
 dns: bad dns reply: ***  FATAL PROGRAM ERROR!!\tUnknown instance method
"_specified"
 dns: [...] ***  which the program has attempted to call for the object:
 dns: [...] ***
 dns: [...] .\tOPT\t \t; no data
 dns: [...] ***
 dns: [...] ***  THIS IS A BUG IN THE CALLING SOFTWARE, which incorrectly
assumes
 dns: [...] ***  that the object would be of a particular type.  The type of an
 dns: [...] ***  object should be checked before calling any of its methods.
 dns: [...] ***
 dns: [...] Net::DNS::RR 2037
 dns: [...] Attempt to reload Net/DNS/RR/OPT.pm aborted.
 dns: [...] 
 dns: [...] \teval {...} called at /usr/sbin/spamd line 1484
 dns: [...] \tmain::spawn() called at /usr/sbin/spamd line 1323

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8353] dns: bad dns reply: *** FATAL PROGRAM ERROR!!\tUnknown instance method "cname"

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8353

--- Comment #4 from Philippe Chaintreuil <sp...@parallaxshift.com> ---
Unfortunately I don't.  The user had follow on sieve rules that deleted the
message.  But I'll keep my eyes open in the future.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8353] dns: bad dns reply: *** FATAL PROGRAM ERROR!!\tUnknown instance method "cname"

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8353

Bill Cole <bi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |billcole@apache.org

--- Comment #5 from Bill Cole <bi...@apache.org> ---
(In reply to Philippe Chaintreuil from comment #4)
> Unfortunately I don't.  The user had follow on sieve rules that deleted the
> message.  But I'll keep my eyes open in the future.

The udpsize error indicates an outdated version of Net::DNS. It also implies
that our references to the minimum version in Makefile.PL is outdated.
Makefile.PL says we need 1.10 or later but I think that may be wrong at this
point. The only call to udpsize is in DnsResolver.pm, and it is protected with
a "can" call that should prevent the complaint:

    # my $udp_payload_size = $self->{res}->udppacketsize;
    my $udp_payload_size = $self->{conf}->{dns_options}->{edns};
    if ($udp_payload_size && $udp_payload_size > 512) {
      # dbg("dns: adding EDNS ext, UDP payload size %d", $udp_payload_size);
      if ($packet->edns->can('udpsize')) { # since Net::DNS 1.38
        $packet->edns->udpsize($udp_payload_size);
      } else {
        $packet->edns->size($udp_payload_size);
      }
    }

So the immediate workaround would be to update Net::DNS

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8353] dns: bad dns reply: *** FATAL PROGRAM ERROR!!\tUnknown instance method "cname"

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8353

Giovanni Bechis <gi...@paclan.it> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
                 CC|                            |giovanni@paclan.it
             Status|NEW                         |RESOLVED

--- Comment #1 from Giovanni Bechis <gi...@paclan.it> ---
Sending        lib/Mail/SpamAssassin/PerMsgStatus.pm
Transmitting file data .done
Committing transaction...
Committed revision 1929117.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8353] dns: bad dns reply: *** FATAL PROGRAM ERROR!!\tUnknown instance method "cname"

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8353

--- Comment #6 from Philippe Chaintreuil <sp...@parallaxshift.com> ---
(In reply to Bill Cole from comment #5)
> The udpsize error indicates an outdated version of Net::DNS. [...]
> Makefile.PL says we need 1.10 or later [...]
>
> So the immediate workaround would be to update Net::DNS

I have (& had) Net::DNS version 1.53 installed.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 8353] dns: bad dns reply: *** FATAL PROGRAM ERROR!!\tUnknown instance method "cname"

Posted by bu...@spamassassin.apache.org.
https://bz.apache.org/SpamAssassin/show_bug.cgi?id=8353

--- Comment #3 from Giovanni Bechis <gi...@paclan.it> ---
The patch might fix the  "Unknown instance 'udpsize'" error you are seeing, do
you have an email that triggers the issue to share (in private as well) to
confirm the fix ?

-- 
You are receiving this mail because:
You are the assignee for the bug.