NetBSD Problem Report #54698

From root@labma.ru  Fri Nov 15 21:43:14 2019
Return-Path: <root@labma.ru>
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 "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id AE8777A246
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 15 Nov 2019 21:43:14 +0000 (UTC)
Message-Id: <20191115194808.083597F3C7@freon.labma.ru>
Date: Fri, 15 Nov 2019 22:48:08 +0300 (MSK)
From: kab00m@labma.ru
Reply-To: kab00m@labma.ru
To: gnats-bugs@NetBSD.org
Subject: www/kannel broken
X-Send-Pr-Version: 3.95

>Number:         54698
>Category:       pkg
>Synopsis:       www/kannel crash with Segmentation fault
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 15 21:45:01 +0000 2019
>Last-Modified:  Sat Apr 17 07:40:01 +0000 2021
>Originator:     Dima Veselov
>Release:        NetBSD 8.1_STABLE
>Organization:
	ZAO LMA
>Environment:


System: NetBSD freon 8.1_STABLE NetBSD 8.1_STABLE (Blaze) #6: Mon Jun 10 10:45:28 MSK 2019 kab00m@almaz:/export/build/obj/amd64/sys/arch/amd64/compile/Blaze amd64
Architecture: x86_64
Machine: amd64
>Description:
	Current version 1.4.0 www/kannel is outdated and have va_list problem causing Segmentation fault in strlen libc function.
>How-To-Repeat:
	Install kannel via pkgsrc or pkgin. Run smsbox -v 1 /usr/pkg/etc/kannel.conf with any valid config file.

[root@freon kannel.new]$ smsbox -v 1 /usr/pkg/etc/kannel.conf 
2019-11-15 22:19:20 [25991] [0] ERROR: Error while gw_gethostbyname occurs.
2019-11-15 22:19:20 [25991] [0] ERROR: System error 32639: Unknown error: 32639
2019-11-15 22:19:20 [25991] [0] ERROR: Can't find out official hostname for this host, using `freon' instead.
2019-11-15 22:19:20 [25991] [0] INFO: Debug_lvl = 1, log_file = <none>, log_lvl = 0
Segmentation fault (core dumped)
[root@freon kannel.new]$ gdb /usr/pkg/sbin/smsbox smsbox.core 
GNU gdb (GDB) 7.12
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/pkg/sbin/smsbox...(no debugging symbols found)...done.
[New process 1]
Core was generated by `smsbox'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x000074d8a44f10a1 in strlen () from /usr/lib/libc.so.12
(gdb) bt
#0  0x000074d8a44f10a1 in strlen () from /usr/lib/libc.so.12
#1  0x000000000042601d in convert ()
#2  0x00000000004270a7 in octstr_format_valist_real ()
#3  0x000000000042725c in octstr_format ()
#4  0x000000000042c1ca in version_report_string ()
#5  0x000000000042c1f2 in report_versions ()
#6  0x0000000000444312 in main ()
(gdb) quit

>Fix:
	Updated pkgsrc package can be found here: http://kab00m.ru/links/kannel-1.4.5.tgz
	Important notes: 
		Makefile reviewed to 1.4.5
		patch aa to ac were rebuilt for 1.4.5
		patch-ad, ae and af are taken from here https://redmine.kannel.org/issues/699
		patch-ag is about NetBSD strlen issue
		kannel do not support parralel make

>Audit-Trail:
From: Dima Veselov <kab00m@labma.ru>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/54698
Date: Sun, 17 Nov 2019 21:58:07 +0300

 Package updated to avoid using non-existent gethostbyname_r function.
 Package updated to use rc.d scripts for NetBSD

 -- 
 DV

From: coypu@sdf.org
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/54698
Date: Sat, 17 Apr 2021 07:37:22 +0000

 the diff URL is down, but the problem is likely still relevant (it
 hasn't been updated since).

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.46 2020/01/03 16:35:01 leot Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2020 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.