Bug 1610977

Summary: [abrt] perl-XML-XPath: __libc_sigaction(): perl killed by SIGABRT
Product: [Fedora] Fedora Reporter: Anthony DeDominic <anthony>
Component: perl-XML-XPathAssignee: Jitka Plesnikova <jplesnik>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 28CC: jplesnik, kasal, perl-devel, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/719f5fcc620332c635747c8a9a3d932e709ee864
Whiteboard: abrt_hash:24a4ebcc5470362efb72ba29a50d747df9f75886;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-03 10:50:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: core_backtrace
none
File: cpuinfo
none
File: dso_list
none
File: environ
none
File: limits
none
File: maps
none
File: mountinfo
none
File: open_fds
none
File: proc_pid_status none

Description Anthony DeDominic 2018-08-01 19:22:33 UTC
Description of problem:
how to reproduce:

#!/bin/sh
curl --silent --fail "https://en.wiktionary.org/w/index.php?title=test&printable=yes" \
| xpath -q -e \
    '//div[@class = "mw-parser-output"]/*/span[@id = "Verb" or @id = "Noun" or @id = "Adjective"]/ancestor::*/following-sibling::ol[1]/li'

Trying to parse wiktionary. messing with xpath just to experiment.
above seems to cause a problem. probably with how xpath buffers stdin?
when using a process substitution as an argument instead of stdin, it seems to work correctly.

Version-Release number of selected component:
perl-XML-XPath-1.42-2.fc28

Additional info:
reporter:       libreport-2.9.5
backtrace_rating: 4
cmdline:        /usr/bin/perl /usr/bin/xpath -q -e //div[@class = "mw-parser-output"]/*/span[@id = "Verb" or @id = "Noun" or @id = "Adjective"]/ancestor::*/following-sibling::ol[1]/li
crash_function: __libc_sigaction
executable:     /usr/bin/perl
journald_cursor: s=eed7f97804554ea880a518462e7c4cbb;i=8afd8;b=eba64ca943464449a349f01ba4ccb9e2;m=5335fb2d5;t=5726432a1d733;x=2ffc37276436acb9
kernel:         4.17.9-200.fc28.x86_64
rootdir:        /
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (1 frames)
 #0 __libc_sigaction at ../sysdeps/unix/sysv/linux/x86_64/sigaction.c:53

Comment 1 Anthony DeDominic 2018-08-01 19:22:36 UTC
Created attachment 1472183 [details]
File: backtrace

Comment 2 Anthony DeDominic 2018-08-01 19:22:38 UTC
Created attachment 1472184 [details]
File: cgroup

Comment 3 Anthony DeDominic 2018-08-01 19:22:39 UTC
Created attachment 1472185 [details]
File: core_backtrace

Comment 4 Anthony DeDominic 2018-08-01 19:22:41 UTC
Created attachment 1472186 [details]
File: cpuinfo

Comment 5 Anthony DeDominic 2018-08-01 19:22:42 UTC
Created attachment 1472187 [details]
File: dso_list

Comment 6 Anthony DeDominic 2018-08-01 19:22:43 UTC
Created attachment 1472188 [details]
File: environ

Comment 7 Anthony DeDominic 2018-08-01 19:22:44 UTC
Created attachment 1472189 [details]
File: limits

Comment 8 Anthony DeDominic 2018-08-01 19:22:45 UTC
Created attachment 1472190 [details]
File: maps

Comment 9 Anthony DeDominic 2018-08-01 19:22:46 UTC
Created attachment 1472191 [details]
File: mountinfo

Comment 10 Anthony DeDominic 2018-08-01 19:22:48 UTC
Created attachment 1472192 [details]
File: open_fds

Comment 11 Anthony DeDominic 2018-08-01 19:22:48 UTC
Created attachment 1472193 [details]
File: proc_pid_status

Comment 12 Petr Pisar 2018-08-03 10:50:04 UTC
$ xpath -q -e '//div[@class = "mw-parser-output"]/*/span[@id = "Verb" or @id = "Noun" or @id = "Adjective"]/ancestor::*/following-sibling::ol[1]/li' <input
Ran out of memory for input buffer at /usr/lib64/perl5/vendor_perl/XML/Parser/Expat.pm line 474.
double free or corruption (!prev)
Aborted (core dumped)

*** This bug has been marked as a duplicate of bug 1473368 ***