Bug 1473368 - [abrt] perl-XML-XPath: XML_ParserFree(): perl killed by signal 6
Summary: [abrt] perl-XML-XPath: XML_ParserFree(): perl killed by signal 6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-XML-Parser
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Pisar
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:311aad172213195d0c4fe3541bc...
: 1610977 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-20 15:46 UTC by Peter Janes
Modified: 2019-01-01 01:39 UTC (History)
10 users (show)

Fixed In Version: perl-XML-Parser-2.44-14.fc30 perl-XML-Parser-2.44-14.fc29 perl-XML-Parser-2.44-12.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-18 03:05:42 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (13.54 KB, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: cgroup (355 bytes, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: core_backtrace (6.99 KB, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: cpuinfo (1.21 KB, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: dso_list (2.09 KB, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: environ (5.01 KB, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: limits (1.29 KB, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: maps (9.92 KB, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: open_fds (324 bytes, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: proc_pid_status (1.27 KB, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
File: var_log_messages (28 bytes, text/plain)
2017-07-20 15:46 UTC, Peter Janes
no flags Details
A file that causes the error (32.01 KB, application/xml)
2017-07-21 14:38 UTC, Peter Janes
no flags Details


Links
System ID Priority Status Summary Last Updated
CPAN 128006 None None None 2018-12-13 13:07:02 UTC

Internal Links: 1658512

Description Peter Janes 2017-07-20 15:46:05 UTC
Description of problem:
attempting to run an xpath query on a 3MB XML file

Version-Release number of selected component:
perl-XML-XPath-1.40-2.fc26

Additional info:
reporter:       libreport-2.9.1
backtrace_rating: 4
cmdline:        /usr/bin/perl /usr/bin/xpath -q -e //attribute[name="mcd_productcode"][text()="437"]
crash_function: XML_ParserFree
executable:     /usr/bin/perl
journald_cursor: s=52b9622599c149f3b2bcedca8f7b4442;i=11e0871;b=40ee98e7a11b4e288e018b288f5c9c34;m=aff301cda5;t=554c195af067a;x=6e1ff771cada272b
kernel:         4.11.8-300.fc26.x86_64
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (10 frames)
 #6 XML_ParserFree at lib/xmlparse.c:1374
 #7 XS_XML__Parser__Expat_ParserFree at Expat.xs:1432
 #8 Perl_pp_entersub at pp_hot.c:3988
 #9 Perl_runops_standard at run.c:41
 #10 Perl_call_sv at perl.c:2807
 #11 S_curse at sv.c:6869
 #12 Perl_sv_clear at sv.c:6473
 #13 Perl_sv_free2 at sv.c:6970
 #14 Perl_leave_scope at scope.c:1096
 #15 Perl_dounwind at pp_ctl.c:1548

Comment 1 Peter Janes 2017-07-20 15:46:11 UTC
Created attachment 1301842 [details]
File: backtrace

Comment 2 Peter Janes 2017-07-20 15:46:12 UTC
Created attachment 1301843 [details]
File: cgroup

Comment 3 Peter Janes 2017-07-20 15:46:13 UTC
Created attachment 1301844 [details]
File: core_backtrace

Comment 4 Peter Janes 2017-07-20 15:46:14 UTC
Created attachment 1301845 [details]
File: cpuinfo

Comment 5 Peter Janes 2017-07-20 15:46:15 UTC
Created attachment 1301846 [details]
File: dso_list

Comment 6 Peter Janes 2017-07-20 15:46:16 UTC
Created attachment 1301847 [details]
File: environ

Comment 7 Peter Janes 2017-07-20 15:46:17 UTC
Created attachment 1301848 [details]
File: limits

Comment 8 Peter Janes 2017-07-20 15:46:18 UTC
Created attachment 1301849 [details]
File: maps

Comment 9 Peter Janes 2017-07-20 15:46:19 UTC
Created attachment 1301850 [details]
File: open_fds

Comment 10 Peter Janes 2017-07-20 15:46:20 UTC
Created attachment 1301851 [details]
File: proc_pid_status

Comment 11 Peter Janes 2017-07-20 15:46:21 UTC
Created attachment 1301852 [details]
File: var_log_messages

Comment 12 Petr Pisar 2017-07-21 05:44:49 UTC
Could you provide us the XML file? We need a complete reproducer to find the root cause.

Looking at the back trace, I think perl raised an exception (Perl_pp_die() call) and then glibc discovered a mistake in memory management when deallocating memory in the XML::Parer::Expat module (XS_XML__Parser__Expat_ParserFree() call).

Comment 13 Peter Janes 2017-07-21 14:38:05 UTC
Created attachment 1302467 [details]
A file that causes the error

This is as minimal as I can get the test file; if I remove any elements or change any element content the stack trace disappears (although it often still reports that it ran out of memory, depending on what was removed).

Comment 14 Petr Pisar 2017-09-20 14:07:00 UTC
Thank you for the test file. I can reproduce it now.

It happens only if the file is redirected to the standard input. If I pass it positional argument, it finishes successfully without abortion or complains about insufficiency of memory.

Maybe if the file is read from standard input, an IO reference is used and as documented in the On Garbage Collection section of XML::XPath documentation, that can lead to memory leaks.

Comment 15 Petr Pisar 2017-09-20 14:43:04 UTC
Minimal reproduced is feeding the test file to stdin of this script:

#!/usr/bin/perl
use XML::XPath;
use open ':std', ':encoding(UTF-8)';
my $xpath = XML::XPath->new(ioref => \*STDIN);
$xpath->find('/');

The "use open ':std', ':encoding(UTF-8)';" pragma is important. It looks like there is some issue if PerlIO layer is employed together with IO reference in Expat parser.

Comment 16 Fedora End Of Life 2018-05-03 08:42:06 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 17 Petr Pisar 2018-08-03 10:50:04 UTC
*** Bug 1610977 has been marked as a duplicate of this bug. ***

Comment 18 Ben Cotton 2018-11-27 14:50:57 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 19 Fedora Update System 2018-12-13 13:54:12 UTC
perl-XML-Parser-2.44-14.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e14a4bcc87

Comment 20 Fedora Update System 2018-12-13 14:00:43 UTC
perl-XML-Parser-2.44-12.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-0d0dd93395

Comment 21 Fedora Update System 2018-12-15 03:19:30 UTC
perl-XML-Parser-2.44-12.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-0d0dd93395

Comment 22 Fedora Update System 2018-12-18 03:05:42 UTC
perl-XML-Parser-2.44-14.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2019-01-01 01:39:41 UTC
perl-XML-Parser-2.44-12.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.