Re: [htdig] serious htdig 3.1.5 problems


Subject: Re: [htdig] serious htdig 3.1.5 problems
From: Geoff Hutchison (ghutchis@wso.williams.edu)
Date: Tue Feb 29 2000 - 21:28:20 PST


At 12:39 PM -0700 2/29/00, Tim Rightnour wrote:
>Well.. send me whatever patches you want me to try out.. and I'll rebuild.. in
>the meantime.. I guess I'm search-engine-less.

OK, I hope you'll forgive me that this diagnostic patch only has
limited testing. I started running htdig, hit Control-Z and corrupted
the database by hand. (This was suprisingly difficult to do!) The
patch seemed to work as planned. Under normal circumstances, the
patch won't change anything, so I'm committing this as soon as I get
a PPP connection.

This patch won't make any problems go away, but it will let us debug
the problem. Apply the patch, recompile with -g (and preferably no
optimization).

Now we'll run our new htdig under gdb (your path may vary):

gdb htdig/htdig
[...]
break DB2_db.cc:395
run [usual command-line options]
[...]

It will now start up indexing as usual, but when it hits a DB2 error,
gdb will hit the breakpoint we set and stop! Now we can get some
debugging information while we're stopped. I'd be happy just to get a
backtrace (type bt at the gdb prompt), but any additional info would
really help.

Let me know if the patch gets messed up in the e-mail.

-Geoff Hutchison
Williams Students Online
http://wso.williams.edu/

*** htdig-3.1/htlib/DB2_db.cc Tue Feb 29 22:32:21 2000
--- htdig-3.1.patch/htlib/DB2_db.cc Tue Feb 29 23:09:41 2000
*************** DB2_db::getDatabaseInstance()
*** 385,390 ****
--- 385,399 ----
       return new DB2_db();
   }

+
//********************************************************************
*********
+ // void Error(const char *error_prefix, char *message);
+ //
+ void Error(const char *error_prefix, char *message)
+ {
+ // We don't do anything here, it's mostly a stub so we can set a breakpoint
+ // for debugging purposes
+ fprintf(stderr, "%s: %s\n", error_prefix, message);
+ }

 
//********************************************************************
**********

*************** DB2_db::db_init(char *home)
*** 406,413 ****
           fprintf(stderr, "%s: %s\n", progname, strerror(ENOMEM));
           exit (1);
       }
! dbenv->db_errfile = stderr;
       dbenv->db_errpfx = progname;

       if ((errno = db_appinit(home, NULL, dbenv, DB_CREATE)) != 0)
       {
--- 415,423 ----
           fprintf(stderr, "%s: %s\n", progname, strerror(ENOMEM));
           exit (1);
       }
! // dbenv->db_errfile = stderr;
       dbenv->db_errpfx = progname;
+ dbenv->db_errcall = &Error;

       if ((errno = db_appinit(home, NULL, dbenv, DB_CREATE)) != 0)
       {

------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-unsubscribe@htdig.org
You will receive a message to confirm this.



This archive was generated by hypermail 2b28 : Tue Feb 29 2000 - 21:42:18 PST