[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Porting man-db to the Hurd



Colin Watson <cjwatson@debian.org> wrote:
> On Tue, May 07, 2002 at 10:39:40PM +0200, Wolfgang Jährling wrote:
> > (gdb) bt full
> > #0  0x010c6851 in memset (dstpp=0x1000, c=0, len=68) at
> > ../sysdeps/i386/memset.c:65
> >         len = 68
> >         d0 = 17
> >         dstp = 4096
> >         x = 0
> > #1  0x011a108b in __bam_read_root (dbp=0x8062250) at
> > ../btree/bt_open.c:251
> >         meta = (BTMETA *) 0x1000
> 
> That's not a valid-looking pointer, for a start. Could you look at
> dbp->mpf in frame #1 and check that that is a valid pointer? If not,
> then memp_fget() is apparently failing to retrieve/create the metadata
> page.

dbp->mpf is valid:

(gdb) p dbp->mpf
$1 = (DB_MPOOLFILE *) 0x8061e28
(gdb) p *(dbp->mpf)
$2 = {mutexp = 0x0, fd = 3, ref = 1, pinref = 1,
  q = {tqe_next = 0x0, tqe_prev = 0x8062388},
  dbmp = 0x8062380, mfp = 0x807c1dc, addr = 0x1000, len = 0, flags = 1}

And, even more interesting, meta is valid as well:

(gdb) p meta
$3 = 0x1000
(gdb) p *meta
$4 = {lsn = {file = 1179403647, offset = 65793}, pgno = 0, magic = 0,
  version = 196611, pagesize = 1, maxkey = 5760, minkey = 52,
  free = 136620, flags = 0, re_len = 2097204, re_pad = 2621443,
  uid = "\025\0\022\0\001", '\0' <repeats 14 times>}
(gdb) p sizeof(*meta)
$5 = 68

So there seems to be nothing wrong with the way libdb2 is calling
memset(). Oh well...

Cheers,
GNU/Wolfgang

-- 
Wolfgang Jährling  <wolfgang@pro-linux.de>  \\  http://stdio.cjb.net/
Debian GNU/Hurd user && Debian GNU/Linux user \\  http://www.gnu.org/
The Hurd Hacking Guide: http://www.gnu.org/software/hurd/hacking-guide/
["We're way ahead of you here. The Hurd has always been on the    ]
[ cutting edge of not being good for anything." -- Roland McGrath ]


--
To UNSUBSCRIBE, email to debian-hurd-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: