Bug 1049302

Summary: [abrt] grep: Pexecute(): grep killed by SIGABRT
Product: [Fedora] Fedora Reporter: Francesco Frassinelli (frafra) <fraph24>
Component: grepAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: germano.massullo, jskarvad, lkundrak
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/fea77fcd0f2d18c2c1670e7b6fc0ca42e3ddac30
Whiteboard: abrt_hash:313f290524a5cf06e6e494f8f9307a3d64ddae04
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-07 12:36:29 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: dso_list
none
File: environ
none
File: limits
none
File: maps
none
File: open_fds
none
File: proc_pid_status
none
File: var_log_messages none

Description Francesco Frassinelli (frafra) 2014-01-07 11:39:40 UTC
Description of problem:
grep doesn't seems to like special charachers when using Perl regex if the enviroment uses UTF-8.

$ echo $LANG
it_IT.UTF-8
$ if [ -z $LC_ALL ]; then echo Variable \$LC_ALL not set; fi
Variable $LC_ALL not set
$ echo à | grep -P "[0-9]*"
Annullato (core dumped)
$ export LC_ALL=$LANG; echo à | grep -P "[0-9]*"; unset LC_ALL
Annullato (core dumped)
$ export LC_ALL=it_IT.UTF-8; echo à | grep -P "[0-9]*"; unset LC_ALL
Annullato (core dumped)
$ export LC_ALL=it_IT; echo à | grep -P "[0-9]*"; unset LC_ALL
à
$ export LC_ALL=en_US.UTF-8; echo à | grep -P "[0-9]*"; unset LC_ALL
Aborted (core dumped)
$ export LC_ALL=en_US; echo à | grep -P "[0-9]*"; unset LC_ALL
à
$ export LC_ALL=C; echo à | grep -P "[0-9]*"; unset LC_ALL
à

Version-Release number of selected component:
grep-2.15-1.fc20

Additional info:
reporter:       libreport-2.1.10
backtrace_rating: 4
cmdline:        grep --color=auto -P [0-9]*
crash_function: Pexecute
executable:     /usr/bin/grep
kernel:         3.12.5-302.fc20.x86_64
runlevel:       N 5
type:           CCpp
uid:            1000

Truncated backtrace:
Thread no. 1 (7 frames)
 #2 Pexecute at pcresearch.c:189
 #3 print_line_middle at main.c:835
 #4 prline at main.c:937
 #5 prtext at main.c:1043
 #6 grepbuf at main.c:1113
 #7 grep at main.c:1214
 #8 grepdesc at main.c:1467

Comment 1 Francesco Frassinelli (frafra) 2014-01-07 11:39:45 UTC
Created attachment 846605 [details]
File: backtrace

Comment 2 Francesco Frassinelli (frafra) 2014-01-07 11:39:47 UTC
Created attachment 846606 [details]
File: cgroup

Comment 3 Francesco Frassinelli (frafra) 2014-01-07 11:39:49 UTC
Created attachment 846607 [details]
File: core_backtrace

Comment 4 Francesco Frassinelli (frafra) 2014-01-07 11:39:51 UTC
Created attachment 846608 [details]
File: dso_list

Comment 5 Francesco Frassinelli (frafra) 2014-01-07 11:39:53 UTC
Created attachment 846609 [details]
File: environ

Comment 6 Francesco Frassinelli (frafra) 2014-01-07 11:39:56 UTC
Created attachment 846610 [details]
File: limits

Comment 7 Francesco Frassinelli (frafra) 2014-01-07 11:39:58 UTC
Created attachment 846611 [details]
File: maps

Comment 8 Francesco Frassinelli (frafra) 2014-01-07 11:40:00 UTC
Created attachment 846612 [details]
File: open_fds

Comment 9 Francesco Frassinelli (frafra) 2014-01-07 11:40:02 UTC
Created attachment 846613 [details]
File: proc_pid_status

Comment 10 Francesco Frassinelli (frafra) 2014-01-07 11:40:04 UTC
Created attachment 846614 [details]
File: var_log_messages

Comment 11 Francesco Frassinelli (frafra) 2014-01-07 11:48:49 UTC
More information about this strange behavior: it seems to happen only when "*" or "?" operators are involved.

$ echo à | grep -P "[0-9]*"
Annullato (core dumped)
$ echo à | grep -P "[0-9]?"
Annullato (core dumped)
$ echo à | grep -P "[0-9]"
$ echo à | grep -P "[0-9]{1}"
$ echo à | grep -P "[0-9]{2}"
$ echo à | grep -P "[0-9]{1,}"

Comment 12 Jaroslav Škarvada 2014-01-07 12:36:29 UTC
I guess this is dupe of bug 1044654. I am unable to reproduce with grep-2.16. If the problem persists, feel free to reopen.

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