https://bugzilla.redhat.com/show_bug.cgi?id=1473368
Bug ID: 1473368 Summary: [abrt] perl-XML-XPath: XML_ParserFree(): perl killed by signal 6 Product: Fedora Version: 26 Component: perl-XML-XPath Assignee: jplesnik@redhat.com Reporter: bugzilla.redhat.com@peterjanes.ca QA Contact: extras-qa@fedoraproject.org CC: jplesnik@redhat.com, perl-devel@lists.fedoraproject.org
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
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
Petr Pisar ppisar@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ppisar@redhat.com
--- Comment #12 from Petr Pisar ppisar@redhat.com --- 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).
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
--- Comment #13 from Peter Janes bugzilla.redhat.com@peterjanes.ca --- Created attachment 1302467 --> https://bugzilla.redhat.com/attachment.cgi?id=1302467&action=edit 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).
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
--- Comment #14 from Petr Pisar ppisar@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
--- Comment #15 from Petr Pisar ppisar@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
--- Comment #16 from Fedora End Of Life jkurik@fedoraproject.org --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
Jitka Plesnikova jplesnik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|26 |27
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
Petr Pisar ppisar@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |anthony@dedominic.pw
--- Comment #17 from Petr Pisar ppisar@redhat.com --- *** Bug 1610977 has been marked as a duplicate of this bug. ***
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
--- Comment #18 from Ben Cotton bcotton@redhat.com --- 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.
https://bugzilla.redhat.com/show_bug.cgi?id=1473368
Jitka Plesnikova jplesnik@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|27 |28
perl-devel@lists.fedoraproject.org