NetBSD Problem Report #51236

From www@NetBSD.org  Mon Jun 13 10:11:42 2016
Return-Path: <www@NetBSD.org>
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 5D8277A217
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 13 Jun 2016 10:11:42 +0000 (UTC)
Message-Id: <20160613101140.7F36D7A490@mollari.NetBSD.org>
Date: Mon, 13 Jun 2016 10:11:40 +0000 (UTC)
From: triaxx@triaxx.org
Reply-To: triaxx@triaxx.org
To: gnats-bugs@NetBSD.org
Subject: sysutils/duplicity crashes due to net/librsync
X-Send-Pr-Version: www-1.0

>Number:         51236
>Category:       pkg
>Synopsis:       sysutils/duplicity crashes due to net/librsync
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 13 10:15:00 +0000 2016
>Closed-Date:    Mon Oct 31 08:01:45 +0000 2016
>Last-Modified:  Mon Oct 31 08:01:45 +0000 2016
>Originator:     Frédéric Fauberteau
>Release:        Tpkgsrc-2016Q1
>Organization:
>Environment:
NetBSD trashware 7.0_STABLE NetBSD 7.0_STABLE (TRASHWARE) #1: Sat Dec  5 19:26:52 CET 2015  triaxx@hydralisk:/home/triaxx/dev/nbsd/netbsd-7/usr/objs/sys/arch/amd64/compile/TRASHWARE amd64
>Description:
duplicity crashes during incremental backup due to a segfault in librsync.so.2.
>How-To-Repeat:
Run duplicity after a full backup.
>Fix:
The problem seems to be fixed with the last github tag of librsync. The following patch updates librync:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/net/librsync/Makefile,v
retrieving revision 1.1
diff -u -u -r1.1 Makefile
--- Makefile	12 Sep 2015 22:54:01 -0000	1.1
+++ Makefile	13 Jun 2016 09:55:21 -0000
@@ -8,17 +8,14 @@
 HOMEPAGE=	http://librsync.sourcefrog.net/
 COMMENT=	rsync-like rolling checksum library

-GITHUB_TAG=	f32ed26d02b4d59aa0db215fb58c7a2536d19cb9
+GITHUB_TAG=	84c510fe1150d05240253db19fed9b1fe3a15f0d

 LICENSE=	gnu-lgpl-v2.1

 USE_LIBTOOL=	yes
-USE_TOOLS+=	autoconf automake libtoolize perl
-
-GNU_CONFIGURE=	yes
-
-pre-configure:
-	cd ${WRKSRC} && ./autogen.sh
+USE_TOOLS+=	perl
+USE_CMAKE=	yes
+USE_LANGUAGES=	c c++

 .include "../../devel/popt/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/net/librsync/PLIST,v
retrieving revision 1.1
diff -u -u -r1.1 PLIST
--- PLIST	12 Sep 2015 22:54:01 -0000	1.1
+++ PLIST	13 Jun 2016 09:55:21 -0000
@@ -1,7 +1,7 @@
-@comment $NetBSD: PLIST,v 1.1 2015/09/12 22:54:01 joerg Exp $
+@comment $NetBSD$
 bin/rdiff
 include/librsync-config.h
 include/librsync.h
-lib/librsync.la
-man/man1/rdiff.1
-man/man3/librsync.3
+lib/librsync.so
+lib/librsync.so.2
+lib/librsync.so.2.0.1
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/librsync/distinfo,v
retrieving revision 1.3
diff -u -u -r1.3 distinfo
--- distinfo	4 Nov 2015 00:35:09 -0000	1.3
+++ distinfo	13 Jun 2016 09:55:21 -0000
@@ -1,8 +1,6 @@
 $NetBSD: distinfo,v 1.3 2015/11/04 00:35:09 agc Exp $

-SHA1 (librsync-1.0.1-f32ed26d02b4d59aa0db215fb58c7a2536d19cb9.tar.gz) = 72ba18f73df99ca77335d0952bad3e0ca8f53e34
-RMD160 (librsync-1.0.1-f32ed26d02b4d59aa0db215fb58c7a2536d19cb9.tar.gz) = d027e202518252fd64ec11a0a21122ded262718a
-SHA512 (librsync-1.0.1-f32ed26d02b4d59aa0db215fb58c7a2536d19cb9.tar.gz) = ff07d4472f7aadbfa59161c946c36bffc51a2fd605c4b1e06ccc895e35d3ecd283bdd1044eb9340e3a0d3035fae3bdada1ba0c6c56b56c983ee55a950dc5de79
-Size (librsync-1.0.1-f32ed26d02b4d59aa0db215fb58c7a2536d19cb9.tar.gz) = 140956 bytes
-SHA1 (patch-Makefile.am) = 196443871ed3795e62267e0a5399010d1031a584
-SHA1 (patch-delta.c) = e0025f414fe4b5b32dea17be033f7e2c1978f3f1
+SHA1 (librsync-1.0.1-84c510fe1150d05240253db19fed9b1fe3a15f0d.tar.gz) = 578b5d4272b3ebc81d35df7e7083545cbfe0835e
+RMD160 (librsync-1.0.1-84c510fe1150d05240253db19fed9b1fe3a15f0d.tar.gz) = 0e4d68233f8816436ce7a9f839a185a53bfe169c
+SHA512 (librsync-1.0.1-84c510fe1150d05240253db19fed9b1fe3a15f0d.tar.gz) = 094b6a0f4c52c02f51b0dcac8c0b3dd2ab95c4695c409622e1c3b0aefd3348d3fc805a50a382eede06ce78e5279ee6a57f66493629d31a36cdc4895c89b495fc
+Size (librsync-1.0.1-84c510fe1150d05240253db19fed9b1fe3a15f0d.tar.gz) = 161666 bytes
Index: patches/patch-Makefile.am
===================================================================
RCS file: patches/patch-Makefile.am
diff -N patches/patch-Makefile.am
--- patches/patch-Makefile.am	12 Sep 2015 22:54:01 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,13 +0,0 @@
-$NetBSD: patch-Makefile.am,v 1.1 2015/09/12 22:54:01 joerg Exp $
-
---- Makefile.am.orig	2015-09-12 21:32:07.226531526 +0000
-+++ Makefile.am
-@@ -66,6 +66,7 @@ rdiff_DEPENDENCIES = librsync.la
- # this script is used to build prototab.[ch]
- noinst_SCRIPTS = mkprototab.pl
- 
-+prototab.c emit.c patch.c: prototab.h
- # Autogenerated by a script.
--prototab.c prototab.h: $(srcdir)/mkprototab.pl
-+prototab.h: $(srcdir)/mkprototab.pl
- 	perl $(srcdir)/mkprototab.pl prototab.c prototab.h
Index: patches/patch-delta.c
===================================================================
RCS file: patches/patch-delta.c
diff -N patches/patch-delta.c
--- patches/patch-delta.c	14 Sep 2015 13:33:21 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,77 +0,0 @@
-$NetBSD: patch-delta.c,v 1.1 2015/09/14 13:33:21 joerg Exp $
-
---- delta.c.orig	2015-09-14 08:28:47.000000000 +0000
-+++ delta.c
-@@ -126,12 +126,12 @@ static rs_result rs_delta_s_scan(rs_job_
- static rs_result rs_delta_s_flush(rs_job_t *job);
- static rs_result rs_delta_s_end(rs_job_t *job);
- void rs_getinput(rs_job_t *job);
--inline int rs_findmatch(rs_job_t *job, rs_long_t *match_pos, size_t *match_len);
--inline rs_result rs_appendmatch(rs_job_t *job, rs_long_t match_pos, size_t match_len);
--inline rs_result rs_appendmiss(rs_job_t *job, size_t miss_len);
--inline rs_result rs_appendflush(rs_job_t *job);
--inline rs_result rs_processmatch(rs_job_t *job);
--inline rs_result rs_processmiss(rs_job_t *job);
-+static inline int rs_findmatch(rs_job_t *job, rs_long_t *match_pos, size_t *match_len);
-+static inline rs_result rs_appendmatch(rs_job_t *job, rs_long_t match_pos, size_t match_len);
-+static inline rs_result rs_appendmiss(rs_job_t *job, size_t miss_len);
-+static inline rs_result rs_appendflush(rs_job_t *job);
-+static inline rs_result rs_processmatch(rs_job_t *job);
-+static inline rs_result rs_processmiss(rs_job_t *job);
- 
- /**
-  * \brief Get a block of data if possible, and see if it matches.
-@@ -255,7 +255,7 @@ void rs_getinput(rs_job_t *job) {
-  * forwards beyond the block boundaries. Extending backwards would require
-  * decrementing scoop_pos as appropriate.
-  */
--inline int rs_findmatch(rs_job_t *job, rs_long_t *match_pos, size_t *match_len) {
-+static inline int rs_findmatch(rs_job_t *job, rs_long_t *match_pos, size_t *match_len) {
-     /* calculate the weak_sum if we don't have one */
-     if (job->weak_sum.count == 0) {
-         /* set match_len to min(block_len, scan_avail) */
-@@ -282,7 +282,7 @@ inline int rs_findmatch(rs_job_t *job, r
- /**
-  * Append a match at match_pos of length match_len to the delta, extending
-  * a previous match if possible, or flushing any previous miss/match. */
--inline rs_result rs_appendmatch(rs_job_t *job, rs_long_t match_pos, size_t match_len)
-+static inline rs_result rs_appendmatch(rs_job_t *job, rs_long_t match_pos, size_t match_len)
- {
-     rs_result result=RS_DONE;
-     
-@@ -313,7 +313,7 @@ inline rs_result rs_appendmatch(rs_job_t
-  * 
-  * This also breaks misses up into block_len segments to avoid accumulating
-  * too much in memory. */
--inline rs_result rs_appendmiss(rs_job_t *job, size_t miss_len)
-+static inline rs_result rs_appendmiss(rs_job_t *job, size_t miss_len)
- {
-     rs_result result=RS_DONE;
-     
-@@ -330,7 +330,7 @@ inline rs_result rs_appendmiss(rs_job_t 
- /**
-  * Flush any accumulating hit or miss, appending it to the delta.
-  */
--inline rs_result rs_appendflush(rs_job_t *job)
-+static inline rs_result rs_appendflush(rs_job_t *job)
- {
-     /* if last is a match, emit it and reset last by resetting basis_len */
-     if (job->basis_len) {
-@@ -361,7 +361,7 @@ inline rs_result rs_appendflush(rs_job_t
-  * scoop_pos appropriately. In the future this could be used for something
-  * like context compressing of miss data. Note that it also calls
-  * rs_tube_catchup to output any pending output. */
--inline rs_result rs_processmatch(rs_job_t *job)
-+static inline rs_result rs_processmatch(rs_job_t *job)
- {
-     job->scoop_avail-=job->scoop_pos;
-     job->scoop_next+=job->scoop_pos;
-@@ -383,7 +383,7 @@ inline rs_result rs_processmatch(rs_job_
-  * 
-  * In the future this could do compression of miss data before outputing
-  * it. */
--inline rs_result rs_processmiss(rs_job_t *job)
-+static inline rs_result rs_processmiss(rs_job_t *job)
- {
-     rs_tube_copy(job, job->scoop_pos);
-     job->scoop_pos=0;

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: maya@NetBSD.org
State-Changed-When: Sun, 30 Oct 2016 12:49:28 +0000
State-Changed-Why:
this package has been updated past this commit, and also a patch was
backported to fix a crash - is your problem resolved too?


From: =?UTF-8?Q?Fr=C3=A9d=C3=A9ric_Fauberteau?= <triaxx@triaxx.org>
To: gnats-bugs@netbsd.org
Cc: pkg-manager@netbsd.org, pkgsrc-bugs@netbsd.org, gnats-admin@netbsd.org,
 maya@netbsd.org
Subject: Re: pkg/51236 (sysutils/duplicity crashes due to net/librsync)
Date: Mon, 31 Oct 2016 08:24:33 +0100

 My problem is resolved too.
 Thank you!

State-Changed-From-To: feedback->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Mon, 31 Oct 2016 08:01:45 +0000
State-Changed-Why:
Confirmed fixed, thanks!


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