Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Weird error with SQL lookups in amavisd
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mark Martinec  
View profile  
 More options Apr 12 2012, 8:49 pm
Newsgroups: mailing.unix.amavis-user
From: Mark.Martinec+ama...@ijs.si (Mark Martinec)
Date: Fri, 13 Apr 2012 02:49:21 +0200
Local: Thurs, Apr 12 2012 8:49 pm
Subject: Re: Weird error with SQL lookups in amavisd
Guus,

Lines 257 and 282 are relative to a package Amavis::Lookup::SQLfield,
counting from a __DATA__ line.

Search forward for:
  sub lookup_sql(
then search backwards for:
  __DATA__
then go down 257 lines, arriving at or near:
      $match = {}; @$match{@names} = @$a_ref;

The 282 then corresponds to a
    die $err;
a bit further down, which caught the eval failure and
propagated it further.

This is the area in question:

    $conn_h->execute($sel,@pos_args);  # do the query
    # fetch query results
    while ( defined($a_ref=$conn_h->fetchrow_arrayref($sel)) ) {
      my(@names) = @{$conn_h->sth($sel)->{NAME_lc}};
      $match = {}; @$match{@names} = @$a_ref;
      if ($self->{clause_name} eq 'sel_policy' &&
          !exists $match->{'local'} && $match->{'email'} eq '@.') {
[...]
  } or do {
    my($err) = $@ ne '' ? $@ : "errno=$!";  chomp $err;
    do_log(-1, "lookup_sql: %s, %s, %s", $err, $DBI::err, $DBI::errstr);
    die $err  if $err =~ /^timed out\b/;  # resignal timeout
    die $err;
  };

> lookup_sql: Can't use an undefined value as an ARRAY reference
> at (eval 78) line 257

Puzzling. The   "while (defined($a_ref..."   should ensure that
we only enter the loop when $a_ref is defined, yet the @$a_ref
appparently thinks it is undefined. I could be wrong by a line or two,
but this is the area that needs to be investigated. I don't see
what could be wrong there, nor do I remember seeing a similar report.

Perhaps adding a couple of calls to do_log in that area would
shed some light on the problem.

Btw, which version of perl is running now, and which version
of amavisd was running before the upgrade.

  Mark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"Guus Leeuw jr"  
View profile  
 More options Apr 14 2012, 2:25 am
Newsgroups: mailing.unix.amavis-user
From: guus.le...@itpassion.com ("Guus Leeuw jr")
Date: Sat, 14 Apr 2012 07:25:15 +0100
Local: Sat, Apr 14 2012 2:25 am
Subject: RE: Weird error with SQL lookups in amavisd
Mark,

counting from a __DATA__ line.

thinks it is undefined. I could be wrong by a line or two, but this is the
area that needs to be investigated. I don't see what could be wrong there,
nor do I remember seeing a
> similar report.

> Perhaps adding a couple of calls to do_log in that area would shed some

light on the problem.

I'll certainly do that when testing during next week...

> Btw, which version of perl is running now, and which version of amavisd

was running before the upgrade.

Perl is now at 5.14, amavisd-maia was running before, which was branched off
of 2.2.1. I've tried standard amavisd with postvis: Same problem... Tried
standard amavisd with the old amavis-maia database, all to no avail.

As I said: I'll be using the above tips to run some more testing next week,
so I'll provide more answers then.

Thanks so far,
Regards,
Guus


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »