NetBSD Problem Report #51391

From mlelstv@hoppa.1st.de  Sat Aug  6 12:17:56 2016
Return-Path: <mlelstv@hoppa.1st.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(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 E15437A10E
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  6 Aug 2016 12:17:56 +0000 (UTC)
Message-Id: <20160806121731.F12147E@hoppa.1st.de>
Date: Sat,  6 Aug 2016 14:17:31 +0200 (CEST)
From: mlelstv@serpens.de
Reply-To: mlelstv@serpens.de
To: gnats-bugs@NetBSD.org
Subject: pkgin silently aborts
X-Send-Pr-Version: 3.95

>Number:         51391
>Category:       pkg
>Synopsis:       pkgin silently times out
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Aug 06 12:20:00 +0000 2016
>Originator:     Michael van Elst
>Release:        NetBSD 7.99.35
>Organization:
-- 
                                Michael van Elst
Internet: mlelstv@serpens.de
                                "A potential Snark may lurk in every tree."
>Environment:


System: NetBSD hoppa 7.99.35 NetBSD 7.99.35 (HOPPA) #5: Sat Aug 6 09:51:41 CEST 2016 mlelstv@gossam:/home/netbsd-current/obj.evbarm/home/netbsd-current/src/sys/arch/evbarm/compile/HOPPA evbarm
Architecture: earmv6hf
Machine: evbarm
>Description:
The pkgin 'avail' command (and others) can silently fail due to a bug
in the progress meter.

hoppa% sudo pkgin avail
reading local summary...
processing local summary...

/!\ Warning /!\ earmhf doesn't match your current architecture (earmv6hf)
You probably want to modify /usr/pkg/etc/pkgin/repositories.conf.
Still want to proceed ? [y/N] y

A ktrace reveals that the main process is killed by an alarm signal.

The bug is that the parse_entry() function (in summary.c) assumes that
the progress meter is running. It stops an alarm timeout before prompting
the user about the architecture mismatch and restarts the alarm timeout
afterwards.

This also happens when the progress meter hasn't been started and there
is no signal handler for the timeout.

>How-To-Repeat:
Run pkgin avail for a repository that doesn't match your current architecture.
>Fix:
This had been fixed before.

>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.