Bug 183569 - archivers/libpar2 0.3 cause nzbget to segfault
Summary: archivers/libpar2 0.3 cause nzbget to segfault
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Mark Felder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-01 19:00 UTC by Nicolas Raspail
Modified: 2013-11-17 23:20 UTC (History)
0 users

See Also:


Attachments
libpar2.diff (1.64 KB, patch)
2013-11-02 07:48 UTC, Nicolas Raspail
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicolas Raspail 2013-11-01 19:00:01 UTC
Hi

I have seen several times nzbget segfaulting because of libpar2 (0.3).

Here is the backtrace fro gdb

[root@shadowland /usr/home/sabnzbd]# gdb nzbget nzbget.core 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...(no debugging symbols found)...
Core was generated by `nzbget'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libssl.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libssl.so.6
Reading symbols from /lib/libcrypto.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libcrypto.so.6
Reading symbols from /usr/local/lib/libpar2.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libpar2.so.0
Reading symbols from /lib/libncurses.so.8...(no debugging symbols found)...done.
Loaded symbols for /lib/libncurses.so.8
Reading symbols from /usr/local/lib/libxml2.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libxml2.so.5
Reading symbols from /usr/local/lib/libsigc-2.0.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libsigc-2.0.so.0
Reading symbols from /usr/lib/libstdc++.so.6...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.5
Reading symbols from /lib/libgcc_s.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
Loaded symbols for /lib/libthr.so.3
Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.7
Reading symbols from /lib/libz.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libz.so.6
Reading symbols from /usr/lib/liblzma.so.5...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/liblzma.so.5
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/local/lib/libiconv.so.3
Reading symbols from /usr/lib/libsupc++.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libsupc++.so.1
Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
Loaded symbols for /libexec/ld-elf.so.1
#0  0x0000000800eb3c35 in Par2Repairer::ScanDataFile () from /usr/local/lib/libpar2.so.0
[New Thread 803073c00 (LWP 385167/nzbget)]
[New Thread 803009800 (LWP 384651/nzbget)]
[New Thread 803073800 (LWP 385166/nzbget)]
[New Thread 804ddd000 (LWP 383615/nzbget)]
[New Thread 803074400 (LWP 385165/nzbget)]
[New Thread 804ddc800 (LWP 385164/nzbget)]
[New Thread 803008400 (LWP 384649/nzbget)]
[New Thread 8048bcc00 (LWP 384134/nzbget)]
[New Thread 803009000 (LWP 383813/nzbget)]
[New Thread 803075400 (LWP 340982/nzbget)]
[New Thread 803074800 (LWP 340981/nzbget)]
[New Thread 803074c00 (LWP 340473/nzbget)]
[New Thread 803075000 (LWP 340471/nzbget)]
[New Thread 803007400 (LWP 100850/nzbget)]
(gdb) bt
#0  0x0000000800eb3c35 in Par2Repairer::ScanDataFile () from /usr/local/lib/libpar2.so.0
#1  0x0000000800eb5b4e in Par2Repairer::VerifyDataFile () from /usr/local/lib/libpar2.so.0
#2  0x0000000800eb63c6 in Par2Repairer::VerifyExtraFiles () from /usr/local/lib/libpar2.so.0
#3  0x0000000800ebc591 in Par2Repairer::Process () from /usr/local/lib/libpar2.so.0
#4  0x00000000004277bd in ?? ()
#5  0x00000000004272c3 in ?? ()
#6  0x0000000000443386 in ?? ()
#7  0x00000008020110a4 in pthread_getprio () from /lib/libthr.so.3
#8  0x00007ffffedf8000 in ?? ()
Cannot access memory at address 0x7ffffeff8000

I see that two version of libpar2 have been release 0.3.1 and 0.4.0. The 0.3.1 version correct a bugs (https://bugs.launchpad.net/libpar2/+bug/1186307) that cause nzbget to segfault.

Maybe libpar2 needs to be upgraded
Comment 1 Mark Felder freebsd_committer 2013-11-01 19:41:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->feld

I'll take it.
Comment 2 Nicolas Raspail 2013-11-02 07:48:50 UTC
Hello

Here is a patch to update libpar2 to version 0.4

Nicolas
Comment 3 Edwin Groothuis freebsd_committer 2013-11-02 16:52:56 UTC
Maintainer of archivers/libpar2,

Please note that PR ports/183569 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/183569

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 4 Edwin Groothuis freebsd_committer 2013-11-02 16:52:57 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 5 Mark Linimon 2013-11-02 16:53:49 UTC
----- Forwarded message from Mark Felder <feld@FreeBSD.org> -----

Date: Fri, 01 Nov 2013 14:57:20 -0500
From: Mark Felder <feld@FreeBSD.org>
To: freebsd-ports-bugs@FreeBSD.org
Subject: Re: ports/183569: libpar2 0.3 cause nzbget to segfault
X-Mailer: MessagingEngine.com Webmail Interface - ajax-d4893488

Maintainer,

Attached is a patch that will bring libpar up to 0.4

Index: Makefile
===================================================================
--- Makefile	(revision 331645)
+++ Makefile	(working copy)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	libpar2
-PORTVERSION=	0.3
+PORTVERSION=	0.4
 CATEGORIES=	archivers
 MASTER_SITES=	http://launchpad.net/${PORTNAME}/trunk/${PORTVERSION}/+download/
 
@@ -11,11 +11,10 @@
 MAINTAINER=	toxic@doobie.com
 COMMENT=	Library for manipulating PAR2 files, extracted from par2cmdline
 
-LIB_DEPENDS=	sigc-2.0:${PORTSDIR}/devel/libsigc++20
+LIB_DEPENDS=	libsigc-2.0.so:${PORTSDIR}/devel/libsigc++20
 
 GNU_CONFIGURE=	yes
 
-NO_STAGE=	yes
 FETCH_ARGS=	-pRr
 LDFLAGS+=	-L${LOCALBASE}/lib
 CPPFLAGS+=	-I${LOCALBASE}/include
@@ -32,8 +31,8 @@
 
 post-install:
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
 .endif
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
--- distinfo	(revision 331645)
+++ distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (libpar2-0.3.tar.gz) = 0bcc680db9e8d9fa178b2fec38681ff865d38d283085be1898eac1e615b51b36
-SIZE (libpar2-0.3.tar.gz) = 516329
+SHA256 (libpar2-0.4.tar.gz) = 316d6f0eb31eb896f5546171c2e86801aeffe5ae5e2decffc17f0018346796d4
+SIZE (libpar2-0.4.tar.gz) = 516613
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 331645)
+++ pkg-plist	(working copy)
@@ -29,7 +29,7 @@
 lib/libpar2.a
 lib/libpar2.la
 lib/libpar2.so
-lib/libpar2.so.0
+lib/libpar2.so.1
 lib/libpar2/include/config.h
 %%PORTDOCS%%%%DOCSDIR%%/README
 %%PORTDOCS%%@dirrm %%DOCSDIR%%

----- End forwarded message -----
Comment 6 Toxic 2013-11-08 18:54:35 UTC
I approve this patch.


On 11/2/13 9:52 AM, Edwin Groothuis wrote:
> Maintainer of archivers/libpar2,
>
> Please note that PR ports/183569 has just been submitted.
>
> If it contains a patch for an upgrade, an enhancement or a bug fix
> you agree on, reply to this email stating that you approve the patch
> and a committer will take care of it.
>
> The full text of the PR can be found at:
>      http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/183569
>
Comment 7 dfilter service freebsd_committer 2013-11-17 23:12:11 UTC
Author: feld
Date: Sun Nov 17 23:12:03 2013
New Revision: 334132
URL: http://svnweb.freebsd.org/changeset/ports/334132

Log:
  Update to 0.4
  Support STAGE
  
  PR:		ports/183569
  Submitted by:	Nicolas Raspail
  Approved by:	swills (mentor)

Modified:
  head/archivers/libpar2/Makefile
  head/archivers/libpar2/distinfo
  head/archivers/libpar2/pkg-plist

Modified: head/archivers/libpar2/Makefile
==============================================================================
--- head/archivers/libpar2/Makefile	Sun Nov 17 23:07:02 2013	(r334131)
+++ head/archivers/libpar2/Makefile	Sun Nov 17 23:12:03 2013	(r334132)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	libpar2
-PORTVERSION=	0.3
+PORTVERSION=	0.4
 CATEGORIES=	archivers
 MASTER_SITES=	http://launchpad.net/${PORTNAME}/trunk/${PORTVERSION}/+download/
 
@@ -11,11 +11,10 @@ LICENSE=	GPLv2
 MAINTAINER=	toxic@doobie.com
 COMMENT=	Library for manipulating PAR2 files, extracted from par2cmdline
 
-LIB_DEPENDS=	sigc-2.0:${PORTSDIR}/devel/libsigc++20
+LIB_DEPENDS=	libsigc-2.0.so:${PORTSDIR}/devel/libsigc++20
 
 GNU_CONFIGURE=	yes
 
-NO_STAGE=	yes
 FETCH_ARGS=	-pRr
 LDFLAGS+=	-L${LOCALBASE}/lib
 CPPFLAGS+=	-I${LOCALBASE}/include
@@ -32,8 +31,8 @@ post-patch:
 
 post-install:
 .if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
 .endif
 
 .include <bsd.port.mk>

Modified: head/archivers/libpar2/distinfo
==============================================================================
--- head/archivers/libpar2/distinfo	Sun Nov 17 23:07:02 2013	(r334131)
+++ head/archivers/libpar2/distinfo	Sun Nov 17 23:12:03 2013	(r334132)
@@ -1,2 +1,2 @@
-SHA256 (libpar2-0.3.tar.gz) = 0bcc680db9e8d9fa178b2fec38681ff865d38d283085be1898eac1e615b51b36
-SIZE (libpar2-0.3.tar.gz) = 516329
+SHA256 (libpar2-0.4.tar.gz) = 316d6f0eb31eb896f5546171c2e86801aeffe5ae5e2decffc17f0018346796d4
+SIZE (libpar2-0.4.tar.gz) = 516613

Modified: head/archivers/libpar2/pkg-plist
==============================================================================
--- head/archivers/libpar2/pkg-plist	Sun Nov 17 23:07:02 2013	(r334131)
+++ head/archivers/libpar2/pkg-plist	Sun Nov 17 23:12:03 2013	(r334132)
@@ -29,10 +29,10 @@ include/libpar2/verificationpacket.h
 lib/libpar2.a
 lib/libpar2.la
 lib/libpar2.so
-lib/libpar2.so.0
+lib/libpar2.so.1
 lib/libpar2/include/config.h
 %%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
-@dirrm lib/libpar2/include
-@dirrm lib/libpar2
-@dirrm include/libpar2
+%%PORTDOCS%%@dirrmtry %%DOCSDIR%%
+@dirrmtry lib/libpar2/include
+@dirrmtry lib/libpar2
+@dirrmtry include/libpar2
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 8 Mark Felder freebsd_committer 2013-11-17 23:12:29 UTC
State Changed
From-To: feedback->closed

Committed, with minor changes. Thanks!