Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Important: if this rebase instead contains *only bug fixes,* or *only enhancements*, select the correct option from the Doc Type drop-down list.
Rebase package(s) to version:
grep-2.20
Highlights, important fixes, or notable enhancements:
Fixed several problems that can lead to crash.
Speed-up for various operations, some operations can now be magnitude faster.
Recursive grep now uses fts for directory traversal, so it can handle much-larger directories without reporting things like "File name too long", and it can run much faster when dealing with large directory hierarchies.
Problem is triggered by line 448 in /etc/ssl/certs/ca-bundle.trust.crt which contains a strange character. Running less shows it as <ED> and vi as í. Offending line is
Explicit Text: Limitaciones de garantías de este certificado se pueden encontrar en la DPC.
Problem applies to any file searched by grep where there are «incompatible» characters with UTF-8, problem can be formalised with that basic command :
# printf 'before\222after\n' | LANG=en_US.utf8 grep -P '\222'
Abandon (core dumped)
# printf 'before\222after\n' | LANG=en_US.iso88591 grep -P '\222'
beforeÞafter
That example is inspired of a very similar bug of grep 2.6.2+ :
http://permalink.gmane.org/gmane.comp.gnu.grep.bugs/4779
Grep's logs is all about such errors :
http://git.savannah.gnu.org/cgit/grep.git/tree/NEWS
Maybe this one has only been fixed in 2.16 :
* Noteworthy changes in release 2.16 (2014-01-01) [stable]
** Bug fixes
...
The fix to make grep -P work better with UTF-8 made it possible for
grep to evoke a larger set of PCRE errors, some of which could trigger
an abort. E.g., this would abort:
printf '\x82'|LC_ALL=en_US.UTF-8 grep -P y
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHSA-2015-1447.html
Description of problem: «grep -r -P» displays «Abandon» error. On some systems it displays «Abandon (core dumped)». The bug appeared after the update from 6.5 to 6.6 where grep where update too. Doesn't hang on 7.1406 Doesn't hang when LANG environment variable ends with .iso88591 but always hangs when it ends with .utf8 . Version-Release number of selected component (if applicable): Centos 6.6 x64 How reproducible: Having recurse and Perl switches together set. Steps to Reproduce: 1.LANG=en_US.utf8 grep -r -P 'blabla' /etc Actual results: «Abandon» displayed immediately then stopping with exit code 134 Expected results: Searching mentioned directory and subdirs and print out eventual matching files Additional info: # strace grep -r -P 'blabla' /etc (last lines) : stat("/etc/ssl/certs/ca-bundle.trust.crt", {st_mode=S_IFREG|0644, st_size=1005005, ...}) = 0 open("/etc/ssl/certs/ca-bundle.trust.crt", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0x7fff158548d0) = -1 ENOTTY (Inappropriate ioctl for device) read(3, "# This is a bundle of X.509 cert"..., 32768) = 32768 rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0 gettid() = 30287 tgkill(30287, 30287, SIGABRT) = 0 --- SIGABRT (Aborted) @ 0 (0) --- +++ killed by SIGABRT (core dumped) +++ Abandon (core dumped) 134 NOTE : pcre library package is 1.5 year older than grep one. # rpm -qi grep : Name : grep Relocations: (not relocatable) Version : 2.6.3 Vendor: CentOS Release : 6.el6 Build Date: mer. 04 juin 2014 11:07:59 CEST Install Date: jeu. 30 oct. 2014 11:00:59 CET Build Host: c6b10.bsys.dev.centos.org Group : Applications/Text Source RPM: grep-2.6.3-6.el6.src.rpm Size : 803838 License: GPLv3+ Signature : RSA/SHA1, mer. 04 juin 2014 12:07:31 CEST, Key ID 0946fca2c105b9de Packager : CentOS BuildSystem <http://bugs.centos.org> # rpm -qi pcre : Name : pcre Relocations: (not relocatable) Version : 7.8 Vendor: CentOS Release : 6.el6 Build Date: ven. 07 sept. 2012 13:03:41 CEST Install Date: mer. 13 mars 2013 23:12:11 CET Build Host: c6b8.bsys.dev.centos.org Group : System Environment/Libraries Source RPM: pcre-7.8-6.el6.src.rpm Size : 526268 License: BSD Signature : RSA/SHA1, ven. 07 sept. 2012 15:12:35 CEST, Key ID 0946fca2c105b9de Packager : CentOS BuildSystem <http://bugs.centos.org>