NetBSD Problem Report #50121

From he@smistad.uninett.no  Mon Aug  3 15:25:17 2015
Return-Path: <he@smistad.uninett.no>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 95DD1A654F
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  3 Aug 2015 15:25:17 +0000 (UTC)
Message-Id: <20150803152512.B9F0D3D0B5@smistad.uninett.no>
Date: Mon,  3 Aug 2015 17:25:12 +0200 (CEST)
From: he@NetBSD.org
Reply-To: he@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: makemandb / man crashes on certain manual pages in netbsd-6
X-Send-Pr-Version: 3.95

>Number:         50121
>Category:       bin
>Synopsis:       makemandb / man crashes on certain manual pages in netbsd-6
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 03 15:30:00 +0000 2015
>Closed-Date:    Fri Aug 07 13:33:49 +0000 2015
>Last-Modified:  Fri Aug 07 13:33:49 +0000 2015
>Originator:     Havard Eidnes
>Release:        NetBSD 6.1_STABLE
>Organization:
	None
>Environment:
System: NetBSD smistad.uninett.no 6.1_STABLE NetBSD 6.1_STABLE (MAANEN) #1: Wed Oct 29 11:27:25 CET 2014 he@smistad.uninett.no:/usr/obj/sys/arch/i386/compile/MAANEN i386
Architecture: i386
Machine: i386
>Description:
	The makemandb program crashes on certain man pages.  In my
	case, the zabbix_agentd page from the pkgsrc-wip zabbix-agent
	package makes this happen (under the -v option):

Parsing: /usr/pkg/man/man8/zabbix_agentd.8
assertion "MAN_BLOCK == p->parent->type" failed: file "/usr/src/external/bsd/mdocml/lib/libmandoc/../../dist/man.c", line 212, function "man_node_append"
Abort (core dumped)

	The same happens if you do "man" on that manual page.
	However, if you do "nroff -man" on the manpage, it formats
	~ok.  The manpage doesn't use the new man page macros.

	This has the slightly nasty side effect that "man -k" on this
	machine is useless, as any lookup results in:

apropos: Unable to query schema version: disk I/O error

	(I thought that error code / message was reserved for actual
	hard IO failures, which this isn't an instance of.)


>How-To-Repeat:
	Install the pkgsrc-wip zabbix-agent package, watch either "man
	zabbix_agentd" or "makemandb -v" crash.

>Fix:
	There's quite a few updates to man/mkmandb in newer NetBSD
	code, but it appears to drag along also an update of mdocml
	and sqlite...

	However, with a wholesale upgrade to HEAD of all those 4
	components, makemandb no longer crashes, and "man
	zabbix_agentd" works as expected.
	Is this too invasive to contemplate pulling up to netbsd-6?
	Or does there exist a "point fix" for this problem?

>Release-Note:

>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: bin/50121: makemandb / man crashes on certain manual pages in
 netbsd-6
Date: Thu, 6 Aug 2015 16:04:57 +0000

 On Mon, Aug 03, 2015 at 03:30:00PM +0000, he@NetBSD.org wrote:
  > 	The makemandb program crashes on certain man pages.  In my
  > 	case, the zabbix_agentd page from the pkgsrc-wip zabbix-agent
  > 	package makes this happen (under the -v option):
  > 
  > Parsing: /usr/pkg/man/man8/zabbix_agentd.8
  > assertion "MAN_BLOCK == p->parent->type" failed: file "/usr/src/external/bsd/mdocml/lib/libmandoc/../../dist/man.c", line 212, function "man_node_append"
  > Abort (core dumped)
  > 
  > 	The same happens if you do "man" on that manual page.
  > 	However, if you do "nroff -man" on the manpage, it formats
  > 	~ok.  The manpage doesn't use the new man page macros.
  > 
  > 	This has the slightly nasty side effect that "man -k" on this
  > 	machine is useless, as any lookup results in:
  > 
  > apropos: Unable to query schema version: disk I/O error
  > 
  > 	(I thought that error code / message was reserved for actual
  > 	hard IO failures, which this isn't an instance of.)

 That's a sqlite error message, which is probably a sqlite bug; it
 should probably be producing SQLITE_CORRUPT instead of
 SQLITE_IOERROR.

 But that's a side issue; crashing shouldn't corrupt the database.
 That's part of the point of using database software. This suggests
 that makemandb and/or apropos isn't using sqlite correctly.

  > 	There's quite a few updates to man/mkmandb in newer NetBSD
  > 	code, but it appears to drag along also an update of mdocml
  > 	and sqlite...
  > 
  > 	However, with a wholesale upgrade to HEAD of all those 4
  > 	components, makemandb no longer crashes, and "man
  > 	zabbix_agentd" works as expected.
  > 	Is this too invasive to contemplate pulling up to netbsd-6?
  > 	Or does there exist a "point fix" for this problem?

 Dunno. Updating sqlite is probably a fine idea, but by itself it's
 unlikely to fix the problem.

 -- 
 David A. Holland
 dholland@netbsd.org

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: bin/50121: makemandb / man crashes on certain manual pages in netbsd-6
Date: Thu, 6 Aug 2015 22:59:09 -0400

 This is effectively a duplicate of PR bin/46178.

 Dave

From: Havard Eidnes <he@NetBSD.org>
To: dhgutteridge@sympatico.ca
Cc: gnats-bugs@NetBSD.org
Subject: Re: bin/50121: makemandb / man crashes on certain manual pages in
 netbsd-6
Date: Fri, 07 Aug 2015 15:22:47 +0200 (CEST)

 >  This is effectively a duplicate of PR bin/46178.

 Yes, I agree, it is.

 Regards,

 - H=E5vard

State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Fri, 07 Aug 2015 13:33:49 +0000
State-Changed-Why:
Duplicate of 46178.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.