Debian Bug report logs - #508432
Segmentation fault on i386

version graph

Package: libnet-pcap-perl; Maintainer for libnet-pcap-perl is Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>; Source for libnet-pcap-perl is src:libnet-pcap-perl.

Reported by: Vladimir Stavrinov <vs@inist.ru>

Date: Thu, 11 Dec 2008 10:42:01 UTC

Severity: grave

Found in version libnet-pcap-perl/0.16-1

Fixed in version libnet-pcap-perl/0.16-2

Done: Franck Joncourt <franck.mail@dthconnex.com>

Bug is archived. No further changes may be made.

Forwarded to http://rt.cpan.org/Public/Bug/Display.html?id=43308

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Franck Joncourt <franck.mail@dthconnex.com>:
Bug#508432; Package fwknop-server. (Thu, 11 Dec 2008 10:42:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vladimir Stavrinov <vs@inist.ru>:
New Bug report received and forwarded. Copy sent to Franck Joncourt <franck.mail@dthconnex.com>. (Thu, 11 Dec 2008 10:42:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Vladimir Stavrinov <vs@inist.ru>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: fwknop-server: no FWKNOP_INPUT chain
Date: Thu, 11 Dec 2008 13:38:44 +0300
Package: fwknop-server
Version: 1.9.9-1
Severity: normal


I have fresh install. I have answered "YES" on question about protecting port
22 during installation. I have sent valid SPA from client, but it has no
effect. I look into iptables, but there are no FWKNOP_INPUT chain. It make no
modification at all in the iptables. Look into syslog:

Dec 11 13:07:30 tusk fwknopd: received valid Rijndael encrypted packet from: 172.22.100.88, remote user: root, client version: 1.9.9 (SOURCE line num: 26)
Dec 11 13:07:30 tusk kernel: [ 3904.435357] fwknopd[4026] general protection ip:b7e0ab4b sp:bf92fbfc error:0 in libc-2.7.so[b7d6f000+155000]

You see it has received valid packet, but do nothing. This may be result of
libc error above. But there are no FWKNOP_INPUT chain at once daemon started.
Adding debug option to daemon command line cause segmentation fault when SPA
come in.

-- System Information:
Debian Release: 5.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=ru_RU.KOI8-R (charmap=KOI8-R)
Shell: /bin/sh linked to /bin/bash

Versions of packages fwknop-server depends on:
ii  debconf [debconf-2.0]         1.5.24     Debian configuration management sy
ii  exim4                         4.69-9     metapackage to ease Exim MTA (v4) 
ii  exim4-daemon-light [mail-tran 4.69-9     lightweight Exim MTA (v4) daemon
ii  iptables                      1.4.1.1-4  administration tools for packet fi
ii  libc6                         2.7-16     GNU C Library: Shared libraries
ii  libcrypt-cbc-perl             2.30-1     Implementation of cipher block cha
ii  libcrypt-rijndael-perl        1.07-1     Perl module implementing the Rijnd
ii  libgnupg-interface-perl       0.36-1     Perl interface to GnuPG
ii  libiptables-chainmgr-perl     0.8-1      Perl extension for manipulating ip
ii  libiptables-parse-perl        0.7-1      Perl extension for parsing iptable
ii  libnet-pcap-perl              0.16-1     Pcap interface for perl
ii  libnet-rawip-perl             0.25-1     Perl interface to lowlevel TCP/IP
ii  libnetwork-ipv4addr-perl      0.10.ds-1  Perl extension for manipulating IP
ii  libterm-readkey-perl          2.30-4     A perl module for simple terminal 
ii  libunix-syslog-perl           1.1-2      Perl interface to the UNIX syslog(
ii  perl [libdigest-sha-perl]     5.10.0-18  Larry Wall's Practical Extraction 

fwknop-server recommends no packages.

fwknop-server suggests no packages.

-- debconf information:
* fwknop-server/key: armageddon
* fwknop-server/pcap_iface: eth0
* fwknop-server/easy_setup: true




Severity set to `grave' from `normal' Request was from Franck Joncourt <franck.mail@dthconnex.com> to control@bugs.debian.org. (Thu, 11 Dec 2008 23:33:02 GMT) Full text and rfc822 format available.

Changed Bug title to `Segmentation-fault on i386 after valid authentication' from `fwknop-server: no FWKNOP_INPUT chain'. Request was from Franck Joncourt <franck.mail@dthconnex.com> to control@bugs.debian.org. (Thu, 11 Dec 2008 23:33:03 GMT) Full text and rfc822 format available.

Tags added: upstream Request was from Franck Joncourt <franck.mail@dthconnex.com> to control@bugs.debian.org. (Thu, 11 Dec 2008 23:33:04 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#508432; Package fwknop-server. (Thu, 11 Dec 2008 23:48:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. (Thu, 11 Dec 2008 23:48:08 GMT) Full text and rfc822 format available.

Message #16 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: 508432@bugs.debian.org, Vladimir Stavrinov <vs@inist.ru>
Subject: Segmentation-fault on i386 after valid authentication
Date: Fri, 12 Dec 2008 00:44:00 +0100
[Message part 1 (text/plain, inline)]
Hi Vladimir,

I am able to reproduce the problem on i386, so that is a good point :)
However, I have not been able to fix it so far, but I have forwarded it
upstream.

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/
Fingerprint : C10E D1D0 EF70 0A2A CACF 9A3C C490 534E 75C0 89FE

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#508432; Package fwknop-server. (Sat, 10 Jan 2009 00:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. (Sat, 10 Jan 2009 00:27:03 GMT) Full text and rfc822 format available.

Message #21 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: 508432@bugs.debian.org, Vladimir Stavrinov <vs@inist.ru>
Subject: Segmentation-fault on i386 after valid authentication
Date: Sat, 10 Jan 2009 01:25:03 +0100
[Message part 1 (text/plain, inline)]
Hi,

Here are some progress against this bug:

[quote="Micahel"]
> I was able to track the problem down to the Net::Pcap module. When I 
> install fwknop from sources with install.pl, it compiles Net::Pcap 
> against the currently installed pcap library (from libpcap-dev) and 
> places this version in /usr/lib/fwknop/. When I run the test suite 
> against this version, no segfaults or other issues are seen. Then, 
> when I 'apt-get install fwknop-server' to install the version of 
> Net::Pcap that is a dependency and remove the /usr/lib/fwknop/ 
> directory completely, the segfaults are 100% reproducible (along with
>  that libc error that you mentioned). Oh, I should mention that I had
>  a version of /usr/lib/fwknop/ installed that had only the Net::Pcap 
> module, so other modules are not implicated in this testing.
[/quote]

Regards,
-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[signature.asc (application/pgp-signature, attachment)]

Tags removed: upstream Request was from Franck Joncourt <franck.mail@dthconnex.com> to control@bugs.debian.org. (Sat, 10 Jan 2009 11:00:06 GMT) Full text and rfc822 format available.

Changed Bug title to `Segmentation fault on i386' from `Segmentation-fault on i386 after valid authentication'. Request was from Franck Joncourt <franck.mail@dthconnex.com> to control@bugs.debian.org. (Tue, 13 Jan 2009 20:55:57 GMT) Full text and rfc822 format available.

Bug reassigned from package `fwknop-server' to `libnet-pcap-perl'. Request was from Franck Joncourt <franck.mail@dthconnex.com> to control@bugs.debian.org. (Tue, 13 Jan 2009 20:56:01 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Wed, 14 Jan 2009 00:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Wed, 14 Jan 2009 00:30:02 GMT) Full text and rfc822 format available.

Message #32 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: 508432@bugs.debian.org, Vladimir Stavrinov <vs@inist.ru>
Subject: Segmentation fault on i386
Date: Wed, 14 Jan 2009 01:26:14 +0100
[Message part 1 (text/plain, inline)]
I have enclosed the typescript that shows how to reproduce it on Debian
Sid i386.

[quote="syslog"]
Jan 12 19:47:43 diamond kernel: [822901.361529] fwknopd[30660] general
protection ip:f7e626c9 sp:ff9988b0 error:0 in libc-2.7.so[f7df6000+138000]
[/quote]

Here is a short explanation about what is done:

  1/ Setup the chroot and install some required packages
  2/ Install fwknop with upstream tarball through the install.pl script.
     The Net::Pcap (0.05) perl module is bundled in the tarball as other
     perl modules.
  2/ Run the test suite ; it works fine.
  3/ Remove the Pcap.pm file (0.05)
  4/ Install libnet-pcap-perl (0.16-1)
  5/ Run the test suite ; it fails with a segmentation fault

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[typescript.gz (application/gzip, inline)]
[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Tue, 20 Jan 2009 18:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Tue, 20 Jan 2009 18:48:03 GMT) Full text and rfc822 format available.

Message #37 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
Cc: debian-perl@lists.debian.org, 508432@bugs.debian.org
Subject: Re: [libnet-pcap-perl] Fwknop fails with a segmentation fault on i386
Date: Tue, 20 Jan 2009 19:44:35 +0100
[Message part 1 (text/plain, inline)]
> I am the upstream maintainer of both the Net::Pcap and Net::RawIP modules.

Hi,

>> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508432
>>
>> I managed with upstream to track down the problem to the
>> libnet-pcap-perl module (0.16-1).
>>
>> I have saved a typescript file[1] that shows how to reproduce the
>> problem leading to:
>>
>> [quote="syslog"]
>> Jan 12 19:47:43 diamond kernel: [822901.361529] fwknopd[30660] general
>> protection ip:f7e626c9 sp:ff9988b0 error:0 in
>> libc-2.7.so[f7df6000+138000]
>> [/quote]
> 
> I don't see anything in the typescript you pointed that would indicate
> an error. Also, I note that in this case, you were using Net::Pcap 0.05

As a matter of fact, this is not really the segmentation fault message,
this is only what I can see in my syslog, but I have previously run
fwknop in debug mode and with strace and that is quite bad :)

I have reproduced the debug mode in :
http://www.dthconnex.com/data/debug.typescript

and the strace output follow here:
http://www.dthconnex.com/data/strace.typescript

>> Here is a short explanation about what is done:
>>
>>   1/ Setup the chroot (i386 only) and install some required packages
>>   2/ Install fwknop with upstream tarball through the install.pl script.
>>      The Net::Pcap (0.05) perl module is bundled in the tarball as other
>>      perl modules.
>>   2/ Run the test suite ; it works fine.
>>   3/ Remove the Pcap.pm file (0.05)
>>   4/ Install libnet-pcap-perl (0.16-1)
>>   5/ Run the test suite ; it fails with a segmentation fault.
> 
> Did you try with compiling your own version of Net::Pcap? (I doubt this
> would be the source of the problem, but you never know) Also, do you
> have a backtrace of the segfault?

Building fwknop and all its modules within a i386 chroot (Net::Pcap
0.05), I am able to run the test suite without any error.
I have not encountered any problem before when running 0.04 (Debian
package), as well.

I have rebuilt libnet-pcap-perl (0.16) in the chroot, and run the test
suite again, and then, I get the segmentation fault message you can see
in the debug.typescript file.

The only difference I can see is the libnet-pcap-perl module, but I
should say I really do not know what's wrong.

If I can provide more informations, let me know.

>> This bug makes fwknop unusable on i386 systems.
> 
> Does this problem only happen on Debian i386 systems or can it be
> reproduced on other systems/architecture? (I'm using OSX/PowerPC).

I do have amd64/i386 chroots, and it only fails on i386.
If you want, I can give you an access to my chroots Etch/Lenny/Sid on
amd64 and i386. Unfortunately, I do not have access to a powerpc
architecture.

Is there anyone that can check if the fwknop test suite runs fine on
that architecture - http://www.dthconnex.com/data/typescript ? (Or allow
me to to do it)

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Tue, 27 Jan 2009 01:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Aperghis-Tramoni <sebastien@aperghis.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Tue, 27 Jan 2009 01:48:03 GMT) Full text and rfc822 format available.

Message #42 received at 508432@bugs.debian.org (full text, mbox):

From: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
To: debian-perl@lists.debian.org, 508432@bugs.debian.org
Subject: Re: [libnet-pcap-perl] Fwknop fails with a segmentation fault on i386
Date: Tue, 27 Jan 2009 02:46:58 +0100
Franck Joncourt wrote:

> Building fwknop and all its modules within a i386 chroot (Net::Pcap
> 0.05), I am able to run the test suite without any error.
> I have not encountered any problem before when running 0.04 (Debian
> package), as well.
>
> I have rebuilt libnet-pcap-perl (0.16) in the chroot, and run the test
> suite again, and then, I get the segmentation fault message you can  
> see
> in the debug.typescript file.
>
> The only difference I can see is the libnet-pcap-perl module, but I
> should say I really do not know what's wrong.
>
> If I can provide more informations, let me know.

I haven't yet took a look on how fwknop's test suite work, but can  
the bug be isolated to a specific portion of the code?

> I do have amd64/i386 chroots, and it only fails on i386.
> If you want, I can give you an access to my chroots Etch/Lenny/Sid on
> amd64 and i386. Unfortunately, I do not have access to a powerpc
> architecture.

If things goes well, I hope to soon have a PPC-like Debian box by hand.


-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Tue, 27 Jan 2009 17:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Tue, 27 Jan 2009 17:45:02 GMT) Full text and rfc822 format available.

Message #47 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>, 508432@bugs.debian.org
Subject: Re: Bug#508432: [libnet-pcap-perl] Fwknop fails with a segmentation fault on i386
Date: Tue, 27 Jan 2009 18:43:41 +0100
[Message part 1 (text/plain, inline)]
Hi Sébastien,

[...]
>> The only difference I can see is the libnet-pcap-perl module, but I
>> should say I really do not know what's wrong.
>>
>> If I can provide more informations, let me know.
> 
> I haven't yet took a look on how fwknop's test suite work, but can  
> the bug be isolated to a specific portion of the code?

Let me two days to finish what I am working on, and I will try to
isolate the bug.

>> I do have amd64/i386 chroots, and it only fails on i386.
>> If you want, I can give you an access to my chroots Etch/Lenny/Sid on
>> amd64 and i386. Unfortunately, I do not have access to a powerpc
>> architecture.
> 
> If things goes well, I hope to soon have a PPC-like Debian box by hand.

Ok.

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Tue, 10 Feb 2009 17:21:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gunnar Wolf <gwolf@iiec.unam.mx>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Tue, 10 Feb 2009 17:21:02 GMT) Full text and rfc822 format available.

Message #52 received at 508432@bugs.debian.org (full text, mbox):

From: Gunnar Wolf <gwolf@iiec.unam.mx>
To: Franck Joncourt <franck.mail@dthconnex.com>, Sébastien Aperghis-Tramoni <sebastien@aperghis.net>, 508432@bugs.debian.org
Subject: Re: Bug#508432: [libnet-pcap-perl] Fwknop fails with a segmentation fault on i386
Date: Tue, 10 Feb 2009 11:16:54 -0600
Hi,

Any news on this bug? Last action says you needed two days... two
weeks ago. 

Thanks,

-- 
Gunnar Wolf - gwolf@iiec.unam.mx - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Tue, 10 Feb 2009 17:51:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Tue, 10 Feb 2009 17:51:05 GMT) Full text and rfc822 format available.

Message #57 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: Gunnar Wolf <gwolf@iiec.unam.mx>
Cc: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>, 508432@bugs.debian.org
Subject: Re: Bug#508432: [libnet-pcap-perl] Fwknop fails with a segmentation fault on i386
Date: Tue, 10 Feb 2009 18:48:16 +0100
[Message part 1 (text/plain, inline)]
Gunnar Wolf wrote:
> Hi,

Hi,

> Any news on this bug? Last action says you needed two days... two
> weeks ago. 

Here is what I sent to Sébastien one week ago.

> I am trying to find out where the problem comes from.
> So far without success :(
> 
> When your module is built, I can see the following warnings:
> 
> [quote=build]
> Pcap.xs: In function 'callback_wrapper':
> Pcap.xs:62: warning: value computed is not used
> Pcap.xs:63: warning: value computed is not used
> Pcap.xs:64: warning: value computed is not used
> Pcap.xs:65: warning: value computed is not used
> Pcap.xs: In function 'XS_Net__Pcap_findalldevs_xs':
> Pcap.xs:196: warning: value computed is not used
> Pcap.xs:199: warning: value computed is not used
> Pcap.xs:202: warning: value computed is not used
> Pcap.xs:220: warning: value computed is not used
> Pcap.xs:222: warning: value computed is not used
> Pcap.xs: In function 'XS_Net__Pcap_next':
> Pcap.xs:447: warning: value computed is not used
> Pcap.xs:448: warning: value computed is not used
> Pcap.xs:449: warning: value computed is not used
> Pcap.xs:450: warning: value computed is not used
> Pcap.xs: In function 'XS_Net__Pcap_next_ex':
> Pcap.xs:489: warning: value computed is not used
> Pcap.xs:490: warning: value computed is not used
> Pcap.xs:491: warning: value computed is not used
> Pcap.xs:492: warning: value computed is not used
> Pcap.xs: In function 'XS_Net__Pcap_stats':
> Pcap.xs:742: warning: value computed is not used
> Pcap.xs:744: warning: value computed is not used
> Pcap.xs:746: warning: value computed is not used
> Pcap.xs: In function 'XS_Net__Pcap_sendpacket':
> Pcap.xs:963: warning: pointer targets in passing argument 2 of
> 'pcap_sendpacket' differ in signedness
> Pcap.c: In function 'boot_Net__Pcap':
> Pcap.c:2335: warning: initialization discards qualifiers from pointer
> target type
> Running Mkbootstrap for Net::Pcap ()
> [/quote]
> 
> I have fixed some of them, and thus you do not see them above,
> but I think all of them should be fixed. I do not know how to work on
> the latest one, and I am not sure about why there are all these unused
> values.
> 
> When I run the perl debugger on fwknop and set a breakpoint before
> pcap_loop, it gets stucked. This is due to the implementation of the C
> code, I think. Any idea how I can debug fwknop?

I have put this bug aside waiting for a reply. I do have another idea to
try but I have not taken the time yet.

Any help is welcome.

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Thu, 12 Feb 2009 01:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Aperghis-Tramoni <sebastien@aperghis.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Thu, 12 Feb 2009 01:15:02 GMT) Full text and rfc822 format available.

Message #62 received at 508432@bugs.debian.org (full text, mbox):

From: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
To: Gunnar Wolf <gwolf@iiec.unam.mx>
Cc: Franck Joncourt <franck.mail@dthconnex.com>, 508432@bugs.debian.org
Subject: Re: Bug#508432: [libnet-pcap-perl] Fwknop fails with a segmentation fault on i386
Date: Thu, 12 Feb 2009 02:12:45 +0100
Gunnar Wolf a écrit :

> Hi,

Hello,

> Any news on this bug? Last action says you needed two days... two
> weeks ago.

My fault as well. I haven't answered Franck yet.

Franck, I never saw warnings such as the ones you sent me, even with - 
Wall. I'll check again the different CPAN Testers FAIL reports, but  
last time I did, I saw no such warnings. Which version of gcc, Perl,  
libpcap and Net::Pcap are you using? I'll try tomorrow to compile  
Fwknop on my Linux station at work and see if I can reproduce this.


-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Thu, 12 Feb 2009 21:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Thu, 12 Feb 2009 21:45:02 GMT) Full text and rfc822 format available.

Message #67 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
Cc: Gunnar Wolf <gwolf@iiec.unam.mx>, 508432@bugs.debian.org
Subject: Re: Bug#508432: [libnet-pcap-perl] Fwknop fails with a segmentation fault on i386
Date: Thu, 12 Feb 2009 22:42:12 +0100
[Message part 1 (text/plain, inline)]
Hi Sébastien,

> Franck, I never saw warnings such as the ones you sent me, even with
> -Wall. I'll check again the different CPAN Testers FAIL reports, but
> last time I did, I saw no such warnings. Which version of gcc, Perl,
> libpcap and Net::Pcap are you using? I'll try tomorrow to compile Fwknop
> on my Linux station at work and see if I can reproduce this.

Here is the log of the build:

http://buildd.debian.org/fetch.cgi?pkg=libnet-pcap-perl;ver=0.16-1;arch=amd64;stamp=1226616642
http://buildd.debian.org/build.cgi?pkg=libnet-pcap-perl

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Sat, 14 Feb 2009 22:48:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martín Ferrari <tincho@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sat, 14 Feb 2009 22:48:05 GMT) Full text and rfc822 format available.

Message #72 received at 508432@bugs.debian.org (full text, mbox):

From: Martín Ferrari <tincho@debian.org>
To: 508432@bugs.debian.org
Cc: debian-perl <debian-perl@lists.debian.org>
Subject: minimum testcase
Date: Sat, 14 Feb 2009 20:47:01 -0200
[Message part 1 (text/plain, inline)]
Hi, after working on this bug for a while, I was able to distill a
minimum code that triggers the segfault. The callback routine invoked
from pcap_loop needs to set a signal handler that it's used during the
callback.

In the fwknopd code, this happens when calling iptables, which triggers
a SIGCHLD on exit, but can happen with any signal.

The following backtrace makes me doubt if this is a Net::Pcap or a perl
problem. Maybe somebody in the list can shed some light? (Hello Niko :))

#0  0xb7e726c9 in free () from /lib/libc.so.6
#1  0x080c5b70 in Perl_sv_clear ()
#2  0x080c5d2a in Perl_sv_free2 ()
#3  0x080e0a10 in Perl_leave_scope ()
#4  0x080e137c in Perl_pop_scope ()
#5  0x080b463d in Perl_pp_leavesub ()
#6  0x080b1879 in Perl_runops_standard ()
#7  0x080aba15 in Perl_call_sv ()
#8  0xb7daf538 in callback_wrapper ()
from /usr/lib/perl5/auto/Net/Pcap/Pcap.so
#9  0xb7d75d45 in ?? () from /usr/lib/libpcap.so.0.8
#10 0x08ae4558 in ?? ()
#11 0xbf8a9e28 in ?? ()
#12 0x08afb54a in ?? ()
#13 0x00000020 in ?? ()
#14 0xbf8a9e14 in ?? ()
#15 0xbf8a9e38 in ?? ()
#16 0xbf8a9e48 in ?? ()
#17 0x080c4067 in Perl_sv_setsv_flags ()
#18 0xb7d76bab in pcap_loop () from /usr/lib/libpcap.so.0.8
#19 0xb7da9cf3 in XS_Net__Pcap_loop ()
   from /usr/lib/perl5/auto/Net/Pcap/Pcap.so
#20 0x080b32d2 in Perl_pp_entersub ()
#21 0x080b1879 in Perl_runops_standard ()
#22 0x080ac6a0 in perl_run ()
#23 0x08063ddd in main ()

[testpcap (application/x-perl, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Sat, 14 Feb 2009 23:09:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martín Ferrari <tincho@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sat, 14 Feb 2009 23:09:05 GMT) Full text and rfc822 format available.

Message #77 received at 508432@bugs.debian.org (full text, mbox):

From: Martín Ferrari <tincho@debian.org>
To: 508432@bugs.debian.org
Cc: debian-perl <debian-perl@lists.debian.org>
Subject: Re: Bug#508432: minimum testcase
Date: Sat, 14 Feb 2009 21:08:27 -0200
[Message part 1 (text/plain, inline)]
Meanwhile this is solved, see the attached patch that's useful as a
workaround for fwknopd

On Sat, Feb 14, 2009 at 20:47, Martín Ferrari <tincho@debian.org> wrote:
> Hi, after working on this bug for a while, I was able to distill a
> minimum code that triggers the segfault. The callback routine invoked
> from pcap_loop needs to set a signal handler that it's used during the
> callback.
>
> In the fwknopd code, this happens when calling iptables, which triggers
> a SIGCHLD on exit, but can happen with any signal.
>
> The following backtrace makes me doubt if this is a Net::Pcap or a perl
> problem. Maybe somebody in the list can shed some light? (Hello Niko :))
>
> #0  0xb7e726c9 in free () from /lib/libc.so.6
> #1  0x080c5b70 in Perl_sv_clear ()
> #2  0x080c5d2a in Perl_sv_free2 ()
> #3  0x080e0a10 in Perl_leave_scope ()
> #4  0x080e137c in Perl_pop_scope ()
> #5  0x080b463d in Perl_pp_leavesub ()
> #6  0x080b1879 in Perl_runops_standard ()
> #7  0x080aba15 in Perl_call_sv ()
> #8  0xb7daf538 in callback_wrapper ()
> from /usr/lib/perl5/auto/Net/Pcap/Pcap.so
> #9  0xb7d75d45 in ?? () from /usr/lib/libpcap.so.0.8
> #10 0x08ae4558 in ?? ()
> #11 0xbf8a9e28 in ?? ()
> #12 0x08afb54a in ?? ()
> #13 0x00000020 in ?? ()
> #14 0xbf8a9e14 in ?? ()
> #15 0xbf8a9e38 in ?? ()
> #16 0xbf8a9e48 in ?? ()
> #17 0x080c4067 in Perl_sv_setsv_flags ()
> #18 0xb7d76bab in pcap_loop () from /usr/lib/libpcap.so.0.8
> #19 0xb7da9cf3 in XS_Net__Pcap_loop ()
>   from /usr/lib/perl5/auto/Net/Pcap/Pcap.so
> #20 0x080b32d2 in Perl_pp_entersub ()
> #21 0x080b1879 in Perl_runops_standard ()
> #22 0x080ac6a0 in perl_run ()
> #23 0x08063ddd in main ()
>
>
> _______________________________________________
> pkg-perl-maintainers mailing list
> pkg-perl-maintainers@lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-perl-maintainers
>



-- 
Martín Ferrari
[fwknopd.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Sat, 14 Feb 2009 23:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martín Ferrari <tincho@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sat, 14 Feb 2009 23:36:02 GMT) Full text and rfc822 format available.

Message #82 received at 508432@bugs.debian.org (full text, mbox):

From: Martín Ferrari <tincho@debian.org>
To: 508432@bugs.debian.org
Subject: Re: Bug#508432: minimum testcase
Date: Sat, 14 Feb 2009 21:32:56 -0200
[Message part 1 (text/plain, inline)]
On Sat, Feb 14, 2009 at 21:08, Martín Ferrari <tincho@debian.org> wrote:
> Meanwhile this is solved, see the attached patch that's useful as a
> workaround for fwknopd

My bad, that patch didn't work. It goes again, this time correctly tested :)


-- 
Martín Ferrari
[fwknopd.patch (text/x-diff, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Sat, 14 Feb 2009 23:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martín Ferrari <tincho@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Sat, 14 Feb 2009 23:42:03 GMT) Full text and rfc822 format available.

Message #87 received at 508432@bugs.debian.org (full text, mbox):

From: Martín Ferrari <tincho@debian.org>
To: 508432@bugs.debian.org
Subject: Re: Bug#508432: minimum testcase
Date: Sat, 14 Feb 2009 21:39:30 -0200
[Message part 1 (text/plain, inline)]
Faster than what I've expected, I've found what caused the segfault:
Pcap.xs is allowing unsafe signals during the callback. I don't know
why upstream did this, but this has to be discussed with them and
filled as a bug in CPAN.

With the attached patch, my original testcase no longer segfaults.

On Sat, Feb 14, 2009 at 21:32, Martín Ferrari <tincho@debian.org> wrote:
> On Sat, Feb 14, 2009 at 21:08, Martín Ferrari <tincho@debian.org> wrote:
>> Meanwhile this is solved, see the attached patch that's useful as a
>> workaround for fwknopd
>
> My bad, that patch didn't work. It goes again, this time correctly tested :)
>
>
> --
> Martín Ferrari
>



-- 
Martín Ferrari
[safe_signals.patch (text/x-diff, attachment)]

Noted your statement that Bug has been forwarded to http://rt.cpan.org/Public/Bug/Display.html?id=43308. Request was from Franck Joncourt <franck.mail@dthconnex.com> to control@bugs.debian.org. (Sun, 15 Feb 2009 15:03:14 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Mon, 16 Feb 2009 00:39:14 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Aperghis-Tramoni <sebastien@aperghis.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Mon, 16 Feb 2009 00:39:14 GMT) Full text and rfc822 format available.

Message #94 received at 508432@bugs.debian.org (full text, mbox):

From: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
To: 508432@bugs.debian.org
Subject: Re: Bug#508432: [libnet-pcap-perl] Fwknop fails with a segmentation fault on i386
Date: Mon, 16 Feb 2009 01:38:35 +0100
Franck Joncourt a écrit :

> Hi Sébastien,
>
>> Franck, I never saw warnings such as the ones you sent me, even with
>> -Wall. I'll check again the different CPAN Testers FAIL reports, but
>> last time I did, I saw no such warnings. Which version of gcc, Perl,
>> libpcap and Net::Pcap are you using? I'll try tomorrow to compile  
>> Fwknop
>> on my Linux station at work and see if I can reproduce this.
>
> Here is the log of the build:
>
> http://buildd.debian.org/fetch.cgi?pkg=libnet-pcap- 
> perl;ver=0.16-1;arch=amd64;stamp=1226616642
> http://buildd.debian.org/build.cgi?pkg=libnet-pcap-perl


Ok, you're using a much more recent version of GCC than I do. Nice,  
but "fixing" the "value computed is not used" warnings means checking  
each and every call to hv_store(), also making the code much less  
readable.

The "pointer [...] differ in signedness" warnings are here since a  
long time, but don't seem to be a problem. For a few, it seems to be  
a case of throwing some (u_char *) casts at the appropriate places,  
but I'd prefer to double check that it doesn't change anything at the  
binary level before applying these.


-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Mon, 16 Feb 2009 00:42:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Aperghis-Tramoni <sebastien@aperghis.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Mon, 16 Feb 2009 00:42:04 GMT) Full text and rfc822 format available.

Message #99 received at 508432@bugs.debian.org (full text, mbox):

From: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
To: 508432@bugs.debian.org
Cc: debian-perl <debian-perl@lists.debian.org>
Subject: Re: minimum testcase
Date: Mon, 16 Feb 2009 01:39:54 +0100
Martín Ferrari a écrit :

> Hi, after working on this bug for a while, I was able to distill a
> minimum code that triggers the segfault. The callback routine invoked
> from pcap_loop needs to set a signal handler that it's used during the
> callback.
>
> In the fwknopd code, this happens when calling iptables, which  
> triggers
> a SIGCHLD on exit, but can happen with any signal.

I can't reproduce the problem using your test case, either with  
Net::Pcap 0.16 on OSX, Net::Pcap 0.04 or 0.16 on Debian etch x86.


> Meanwhile this is solved, see the attached patch that's useful as a
> workaround for fwknopd

Is this patch reversed? The destination already looks like the  
version of fwknopd I downloaded (1.9.10).
If that's the case, I'm not sure to understand how this fixes the  
problem.


-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Mon, 16 Feb 2009 13:48:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Martín Ferrari <martin.ferrari@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Mon, 16 Feb 2009 13:48:03 GMT) Full text and rfc822 format available.

Message #104 received at 508432@bugs.debian.org (full text, mbox):

From: Martín Ferrari <martin.ferrari@gmail.com>
To: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>, 508432@bugs.debian.org
Cc: debian-perl <debian-perl@lists.debian.org>
Subject: Re: Bug#508432: minimum testcase
Date: Mon, 16 Feb 2009 11:45:20 -0200
Hi,

On Sun, Feb 15, 2009 at 22:39, Sébastien Aperghis-Tramoni
<sebastien@aperghis.net> wrote:

>> In the fwknopd code, this happens when calling iptables, which
>> triggers
>> a SIGCHLD on exit, but can happen with any signal.
>
> I can't reproduce the problem using your test case, either with
> Net::Pcap 0.16 on OSX, Net::Pcap 0.04 or 0.16 on Debian etch x86.

I've been working with Net::Pcap 0.16 on Debian sid, which means:
libpcap0.8                               0.9.8-5
perl           5.10.0-19

I wouldn't surprise me if changes in the versions of any of these
would produce different results.

>> Meanwhile this is solved, see the attached patch that's useful as a
>> workaround for fwknopd
>
> Is this patch reversed? The destination already looks like the
> version of fwknopd I downloaded (1.9.10).
> If that's the case, I'm not sure to understand how this fixes the
> problem.

Yes, sorry, see my other patch I've sent to the bug report.This was
reversed and incorrect. The workaround was just to use a minimum
callback that saves the values and then call the other routines (which
trigger a SIGCHLD) outside of the callback..

-- 
Martín Ferrari




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Mon, 16 Feb 2009 20:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Niko Tyni <ntyni@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Mon, 16 Feb 2009 20:45:03 GMT) Full text and rfc822 format available.

Message #109 received at 508432@bugs.debian.org (full text, mbox):

From: Niko Tyni <ntyni@debian.org>
To: 508432@bugs.debian.org
Cc: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
Subject: Re: Bug#508432: minimum testcase
Date: Mon, 16 Feb 2009 22:42:01 +0200
On Mon, Feb 16, 2009 at 11:45:20AM -0200, Martín Ferrari wrote:
 
> On Sun, Feb 15, 2009 at 22:39, Sébastien Aperghis-Tramoni
> <sebastien@aperghis.net> wrote:

> > I can't reproduce the problem using your test case, either with
> > Net::Pcap 0.16 on OSX, Net::Pcap 0.04 or 0.16 on Debian etch x86.
> 
> I've been working with Net::Pcap 0.16 on Debian sid, which means:
> libpcap0.8                               0.9.8-5
> perl           5.10.0-19

As a data point, I can reproduce this on Lenny/i386 (Perl 5.10.0,
Net::Pcap 0.04) if I set PERL_SIGNALS=unsafe in the environment.
No crash here on amd64 + 5.10.0 or i386 + 5.8.8.
-- 
Niko Tyni   ntyni@debian.org




Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Mon, 16 Feb 2009 22:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Aperghis-Tramoni <sebastien@aperghis.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Mon, 16 Feb 2009 22:33:03 GMT) Full text and rfc822 format available.

Message #114 received at 508432@bugs.debian.org (full text, mbox):

From: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
To: debian-perl <debian-perl@lists.debian.org>
Cc: 508432@bugs.debian.org
Subject: Re: Bug#508432: minimum testcase
Date: Mon, 16 Feb 2009 23:32:15 +0100
Niko Tyni wrote:

> On Mon, Feb 16, 2009 at 11:45:20AM -0200, Martín Ferrari wrote:
>
>> On Sun, Feb 15, 2009 at 22:39, Sébastien Aperghis-Tramoni wrote:
>>
>>> I can't reproduce the problem using your test case, either with
>>> Net::Pcap 0.16 on OSX, Net::Pcap 0.04 or 0.16 on Debian etch x86.
>>
>> I've been working with Net::Pcap 0.16 on Debian sid, which means:
>> libpcap0.8                               0.9.8-5
>> perl           5.10.0-19
>
> As a data point, I can reproduce this on Lenny/i386 (Perl 5.10.0,
> Net::Pcap 0.04) if I set PERL_SIGNALS=unsafe in the environment.
> No crash here on amd64 + 5.10.0 or i386 + 5.8.8.

Just tried on Debian sid PowerPC Cell (that's my PS3). Same versions  
of everything but still no luck: the test program runs happily. I  
guess I'll have to build a Debian sid x86 Qemu to test this.


-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Mon, 23 Feb 2009 23:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Mon, 23 Feb 2009 23:15:02 GMT) Full text and rfc822 format available.

Message #119 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: 508432@bugs.debian.org, Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
Subject: Re: Bug#508432: fwknop patched
Date: Tue, 24 Feb 2009 00:11:19 +0100
[Message part 1 (text/plain, inline)]
Hi Sébastien,

I have patched Fwknop with Martin's patch with the approval of Fwknop
upstream.

Have you been able to reproduce the problem?

I think maybe that could be nice to have a way to enable/disable the
current behavior of the pcap_loop function against interrupts.
Having a note about the possible problem would also be good as Martin
pointed out.

However, I also think this should only be a workaround until someone is
able to find out what is wrong.

What do others think about this?

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Tue, 03 Mar 2009 19:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Tue, 03 Mar 2009 19:45:02 GMT) Full text and rfc822 format available.

Message #124 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: 508432@bugs.debian.org, Sébastien Aperghis-Tramoni <sebastien@aperghis.net>, debian-perl@lists.debian.org
Subject: Any news ?
Date: Tue, 03 Mar 2009 20:43:32 +0100
[Message part 1 (text/plain, inline)]
Hi Sébastien,

We have been without news since about 2 weeks.

What about this bug?
Have you been able to reproduce the problem?
Do you intend to update libnet-pcap-perl?

Should we patch libnet-pcap-perl in order to remove the ability to be
interrupted by a signal for this release?

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Thu, 05 Mar 2009 00:33:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sébastien Aperghis-Tramoni <sebastien@aperghis.net>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Thu, 05 Mar 2009 00:33:05 GMT) Full text and rfc822 format available.

Message #129 received at 508432@bugs.debian.org (full text, mbox):

From: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>
To: 508432@bugs.debian.org
Cc: debian-perl <debian-perl@lists.debian.org>
Subject: Re: Bug#508432: fwknop patched
Date: Thu, 5 Mar 2009 01:29:36 +0100
Hello,


Franck Joncourt wrote:

> Hi Sébastien,
>
> We have been without news since about 2 weeks.

Sorry for being slow to answer. From time to time, even I can be  
catch back by real life things.

> What about this bug?

I didn't forget about this bug, your mails are the last ones in my  
inbox (I'm using an inbox-zero process).

> Have you been able to reproduce the problem?

I also tried without success on my machine at work, an x86-64 running  
an old Mandriva system, with Net::Pcap 0.16, libpcap 0.9.1. This bug  
seems to be either very tied to the x86 or to a recent version  
version of the libpcap.

I've also tried and failed to link Net::Pcap with libpcap 1.0.0,  
which is problematic.

> Do you intend to update libnet-pcap-perl?

I intend to update Net::Pcap.

> Should we patch libnet-pcap-perl in order to remove the ability to be
> interrupted by a signal for this release?

I've answered Martín's concerns in the CPAN-RT ticket:

> I'd say many Perl users don't know how signals are actually  
> handled. In fact, more than a few are surprised that signals are  
> not immediately delivered. IIRC, I added this code to Net::Pcap  
> because I had a couple of requests (by private mail, not on CPAN- 
> RT) to modify Net::Pcap so it behaves this way.
>
> I also remember explaining this to a couple of colleagues, and how  
> to enable "unsafe" signals.

So, as you already suggested..

> I think maybe that could be nice to have a way to enable/disable the
> current behavior of the pcap_loop function against interrupts.

.. I'll add a new function, pcap_perl_settings() to address this  
particular issue.

> Having a note about the possible problem would also be good as Martin
> pointed out.


I'll add a note about signals, pointing to the pcap_perl_settings()  
function.
I'll also have to fix the problems with libpcap 1.0.0


-- 
Sébastien Aperghis-Tramoni

Close the world, txEn eht nepO.





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Thu, 05 Mar 2009 21:36:08 GMT) Full text and rfc822 format available.

Acknowledgement sent to Franck Joncourt <franck.mail@dthconnex.com>:
Extra info received and forwarded to list. Copy sent to Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>. (Thu, 05 Mar 2009 21:36:08 GMT) Full text and rfc822 format available.

Message #134 received at 508432@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: Sébastien Aperghis-Tramoni <sebastien@aperghis.net>, 508432@bugs.debian.org
Cc: debian-perl <debian-perl@lists.debian.org>
Subject: Re: Bug#508432: fwknop patched
Date: Thu, 05 Mar 2009 22:34:31 +0100
[Message part 1 (text/plain, inline)]
Hi Sébastien,

[...]
>> What about this bug?
> 
> I didn't forget about this bug, your mails are the last ones in my  
> inbox (I'm using an inbox-zero process).
> 
>> Have you been able to reproduce the problem?
> 
> I also tried without success on my machine at work, an x86-64 running  
> an old Mandriva system, with Net::Pcap 0.16, libpcap 0.9.1. This bug  
> seems to be either very tied to the x86 or to a recent version  
> version of the libpcap.

I am using fwknop on amd64 and have never encountered this bug so far.
However on i386, this is 100 % reproductible with your current release.

[...]
> I've answered Martín's concerns in the CPAN-RT ticket:
> 
>> I'd say many Perl users don't know how signals are actually  
>> handled. In fact, more than a few are surprised that signals are  
>> not immediately delivered. IIRC, I added this code to Net::Pcap  
>> because I had a couple of requests (by private mail, not on CPAN- 
>> RT) to modify Net::Pcap so it behaves this way.

Yes, I remember you said that before, and you pointed to a CPAN-RT ticket.

[...]
>> I think maybe that could be nice to have a way to enable/disable the
>> current behavior of the pcap_loop function against interrupts.
> 
> .. I'll add a new function, pcap_perl_settings() to address this  
> particular issue.
> 
>> Having a note about the possible problem would also be good as Martin
>> pointed out.
> 
> I'll add a note about signals, pointing to the pcap_perl_settings()  
> function.
> I'll also have to fix the problems with libpcap 1.0.0

It sounds great to me.

What do other think about it?

Regards,

-- 
Franck Joncourt
http://debian.org - http://smhteam.info/wiki/

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>:
Bug#508432; Package libnet-pcap-perl. (Wed, 29 Apr 2009 18:00:04 GMT) Full text and rfc822 format available.

Message #137 received at 508432@bugs.debian.org (full text, mbox):

From: pkg-perl-maintainers@lists.alioth.debian.org
To: 508432@bugs.debian.org, 508432-submitter@bugs.debian.org
Subject: Bug in libnet-pcap-perl fixed in revision 34327
Date: Wed, 29 Apr 2009 17:58:16 +0000
tag 508432 + pending
thanks

Some bugs are closed in revision 34327
by Franck Joncourt (thialme-guest)

Commit message:

Patched Pcap.xs to avoid segfaults.
* Do not allow the pcap loop function to be interrupted by signals.
  It happens this causes segfault. (Closes: #508432)
    - Documented the usage of quilt through README.source.
    - Added Build-dependency on quilt in d.control
    - Updated d.rules
    - Added safe_signal.patch.
  This patch makes Net::Pcap behave the same way as its previous release.
* Add /me to Uploaders.






Tags added: pending Request was from pkg-perl-maintainers@lists.alioth.debian.org to control@bugs.debian.org. (Wed, 29 Apr 2009 18:00:09 GMT) Full text and rfc822 format available.

Message sent on to Vladimir Stavrinov <vs@inist.ru>:
Bug#508432. (Wed, 29 Apr 2009 18:00:12 GMT) Full text and rfc822 format available.

Reply sent to Franck Joncourt <franck.mail@dthconnex.com>:
You have taken responsibility. (Wed, 29 Apr 2009 19:45:05 GMT) Full text and rfc822 format available.

Notification sent to Vladimir Stavrinov <vs@inist.ru>:
Bug acknowledged by developer. (Wed, 29 Apr 2009 19:45:05 GMT) Full text and rfc822 format available.

Message #147 received at 508432-close@bugs.debian.org (full text, mbox):

From: Franck Joncourt <franck.mail@dthconnex.com>
To: 508432-close@bugs.debian.org
Subject: Bug#508432: fixed in libnet-pcap-perl 0.16-2
Date: Wed, 29 Apr 2009 19:32:05 +0000
Source: libnet-pcap-perl
Source-Version: 0.16-2

We believe that the bug you reported is fixed in the latest version of
libnet-pcap-perl, which is due to be installed in the Debian FTP archive:

libnet-pcap-perl_0.16-2.diff.gz
  to pool/main/libn/libnet-pcap-perl/libnet-pcap-perl_0.16-2.diff.gz
libnet-pcap-perl_0.16-2.dsc
  to pool/main/libn/libnet-pcap-perl/libnet-pcap-perl_0.16-2.dsc
libnet-pcap-perl_0.16-2_i386.deb
  to pool/main/libn/libnet-pcap-perl/libnet-pcap-perl_0.16-2_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 508432@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Franck Joncourt <franck.mail@dthconnex.com> (supplier of updated libnet-pcap-perl package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Wed, 29 Apr 2009 19:46:22 +0200
Source: libnet-pcap-perl
Binary: libnet-pcap-perl
Architecture: source i386
Version: 0.16-2
Distribution: unstable
Urgency: low
Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
Changed-By: Franck Joncourt <franck.mail@dthconnex.com>
Description: 
 libnet-pcap-perl - Perl binding to the LBL pcap packet capture library
Closes: 508432
Changes: 
 libnet-pcap-perl (0.16-2) unstable; urgency=low
 .
   [ gregor herrmann ]
   * debian/control: Added: ${misc:Depends} to Depends: field.
 .
   [ Franck Joncourt ]
   * Do not allow the pcap loop function to be interrupted by signals.
     It happens this causes segfault. (Closes: #508432)
       - Documented the usage of quilt through README.source.
       - Added Build-dependency on quilt in d.control
       - Updated d.rules
       - Added safe_signal.patch.
     This patch makes Net::Pcap behave the same way as its previous release.
   * Set Standards-Version to 3.8.1 (no changes).
   * Removed the created const-xs.inc and const-c.inc during clean.
   * d.copyright: add © symbol for Debian copyright holders.
   * d.control:
     - Add /me to Uploaders.
     - Refresh both short and long descriptions
Checksums-Sha1: 
 8dddf1913b1cbb4bad796cc7369c25fd3e15fe0d 1402 libnet-pcap-perl_0.16-2.dsc
 4332c75b1d951123ddd4830c638771d532f82147 3478 libnet-pcap-perl_0.16-2.diff.gz
 bb72da350e075c34d513205410f52ec8844b68c5 72596 libnet-pcap-perl_0.16-2_i386.deb
Checksums-Sha256: 
 57173433c099281dcfdbc5b0a78540d81ff33006095674f5304506714611b7de 1402 libnet-pcap-perl_0.16-2.dsc
 a3639b60dd5bb292a05645e9d899704fc019c95ed288659bbace359f12e09e6e 3478 libnet-pcap-perl_0.16-2.diff.gz
 1e9af24c10d2be049130caef71394c8030fba84ab8e0f9663468bf87fed641ee 72596 libnet-pcap-perl_0.16-2_i386.deb
Files: 
 03ddf0de5bad1fd41c2718ebabfec245 1402 perl optional libnet-pcap-perl_0.16-2.dsc
 3a567c29ba657b66853255cbc3addae7 3478 perl optional libnet-pcap-perl_0.16-2.diff.gz
 a53f5699966bbc2ec6878204b7e184dd 72596 perl optional libnet-pcap-perl_0.16-2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkn4qPEACgkQOzKYnQDzz+RAhgCgoCCJflFOOD+gPjNAYHKDna2Z
jQoAn26GlEDudQ2LprGpkJ3vITDgD7fD
=mH1J
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 28 May 2009 07:29:55 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 18 16:26:30 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.