[ic] Status of server error generating bug in rpc mode?

interch interchange-users@interchange.redhat.com
Thu Nov 15 21:28:01 2001


On Thu, 15 Nov 2001, Mike Heins wrote:

> Quoting interch (interch@client.paymentonline.com):
> >
> > Found it....
> >
> > The problem is in dummy_database in Data.pm.  backup is defined as an
> > anonymous sub it looks like for some reason which I didn't bother to
> > follow, and I don't completely understand what is going on here it looks
> > like it is trying to get the structure here or something for it and of
> > course it doesn't exist, so $class is then undefined and it bombs.  I
> > changed the die to a logDebug and a next and that is working as a
> > temporary fix until someone that knows more than me can fix it correctly.
> > Here is the fix I put in that seems to work.
> >
> >
> >
> > sub dummy_database {
> >         my ($name, $data);
> >     while (($name,$data) = each %{$Vend::Cfg->{Database}}) {
> >                 if (defined $Vend::Cfg->{SaveDatabase}{$name}) {
> >                         $Vend::Database{$name} =
> > $Vend::Cfg->{SaveDatabase}{$name};
> >                         next;
> >                 }
> >                 my $class = $db_config{$data->{Class}}->{Class};
> >                 unless ($class) {
> >                         ::logDebug("no class found for database %s",
> > $name);
> >                         next;
> >                 }
> >                 $Vend::Database{$name} =
> >                                 new $class ($data);
> >         }
> >         update_productbase();
> > }
> >
>
> This is a good error log ot put in. Now we need to find out what
> database is failing, what DBI/internal type it is, and why it is
> failing. If you can get me that information (or someone else experiencing
> the problem can) then we can get somewhere.



A bit more info.  This is under Redhat 7.2, IC 4.8.2, with most catalogs
including the one I am debugging in using dbm format.  Some catalogs are
using mysql here and there.  It is failing on the  'backup' database each
and every
time.  It seems to always be triggered when using the page editor or the
template editor.  There is no 'backup' database defined anywhere nor does
it exist in the products directory.  Also, an interesting note is that
before I added this little fix the backup database showed up under
admin->info.  It showed the source  file as having a size of 4096, which
is the file size of the backup directory in the catalog.  I also took a
look at lib/UI/pages/admin/template_edit.html and saw this:

<!-- ----- BEGIN REAL STUFF ----- -->
[loop search="
        fi=backup
        co=yes
        sf=sku
        se=[cgi ui_template]
        st=db
        tf=mod_time
        to=nr
        rf=code,page_name,mod_time
        "]


My guess is that this and maybe other code snippets somehow tell IC
incorrectly that
backup is a valid database, and after that it gets cached somewhere and
from
then on IC thinks backup is a valid database, which would explain why once
I trigger this it then happens constantly no matter where I am in the
admin until I restart, since it seems there are a
couple of places at least where when doing an open or close on a database,
IC  opens or closes all known databases, and hits this invalid database
that causes the error?


Chris