From unknown Sat Jun 14 05:12:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16499: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file Resent-From: Shlomi Fish Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Sun, 19 Jan 2014 18:47:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16499 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: 16499@debbugs.gnu.org X-Debbugs-Original-To: bug-grep@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139015722112401 (code B ref -1); Sun, 19 Jan 2014 18:47:03 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jan 2014 18:47:01 +0000 Received: from localhost ([127.0.0.1]:57302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W4xOd-0003Du-Uw for submit@debbugs.gnu.org; Sun, 19 Jan 2014 13:47:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56979) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W4u1F-0005R2-56 for submit@debbugs.gnu.org; Sun, 19 Jan 2014 10:10:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4u17-0008Qf-9l for submit@debbugs.gnu.org; Sun, 19 Jan 2014 10:10:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4u17-0008QZ-4s for submit@debbugs.gnu.org; Sun, 19 Jan 2014 10:10:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4u10-0000HS-Hp for bug-grep@gnu.org; Sun, 19 Jan 2014 10:10:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4u0u-0008PX-0d for bug-grep@gnu.org; Sun, 19 Jan 2014 10:10:22 -0500 Received: from gateway07.websitewelcome.com ([69.93.66.94]:36259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4u0t-0008PR-R0 for bug-grep@gnu.org; Sun, 19 Jan 2014 10:10:15 -0500 Received: by gateway07.websitewelcome.com (Postfix, from userid 5007) id 65156705CAA62; Sun, 19 Jan 2014 09:10:13 -0600 (CST) Received: from gator4065.hostgator.com (gator4065.hostgator.com [192.185.4.76]) by gateway07.websitewelcome.com (Postfix) with ESMTP id 57A67705CAA0E for ; Sun, 19 Jan 2014 09:10:13 -0600 (CST) Received: from [109.65.32.171] (port=57075 helo=telaviv1.shlomifish.org) by gator4065.hostgator.com with esmtpa (Exim 4.80) (envelope-from ) id 1W4u0q-00074j-P1 for bug-grep@gnu.org; Sun, 19 Jan 2014 09:10:13 -0600 Received: from telaviv1.shlomifish.org (telaviv1.shlomifish.org [127.0.0.1]) by telaviv1.shlomifish.org (Postfix) with ESMTP id C36C526005F for ; Sun, 19 Jan 2014 17:10:11 +0200 (IST) Date: Sun, 19 Jan 2014 17:10:11 +0200 From: Shlomi Fish Message-ID: <20140119171011.1cfebc88@telaviv1.shlomifish.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-mageia-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/Je+03KfbBLjRT_9qovx_acs" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4065.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - shlomifish.org X-BWhitelist: no X-Source-IP: 109.65.32.171 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (telaviv1.shlomifish.org) [109.65.32.171]:57075 X-Source-Auth: shlomif@shlomifish.org X-Email-Count: 1 X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yNDA2NS5ob3N0Z2F0b3IuY29t X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Mailman-Approved-At: Sun, 19 Jan 2014 13:46:58 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) --MP_/Je+03KfbBLjRT_9qovx_acs Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all, after I save the attached file as 1.dat , I see that grep -iP on '^Subject:' or on '^S' gets stuck in the en_US.UTF-8 locale. It is fine in pcregrep and= in ack. [SHELL] shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -iP '^Subject:' < 1.dat ^C real 0m4.199s user 0m4.195s sys 0m0.003s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -iP '^S' < 1.dat ^C real 0m3.486s user 0m3.485s sys 0m0.001s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -iE '^S' < 1.dat real 0m0.002s user 0m0.002s sys 0m0.000s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -P '^S' < 1.dat ^C real 0m1.887s user 0m1.885s sys 0m0.000s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -P '^Subject:' < 1.dat real 0m0.003s user 0m0.000s sys 0m0.002s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -P '^Subject:' < 1.dat time LC_AL= L=3DC ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -iP '^Subject:' < 1.dat real 0m0.003s user 0m0.001s sys 0m0.001s shlomif@telaviv1:~$ time LC_ALL=3DC pcregrep -i '^Subject:' < 1.dat real 0m0.002s user 0m0.001s sys 0m0.000s shlomif@telaviv1:~$ time LC_ALL=3DC ack -i '^Subject:' 1.dat real 0m0.066s user 0m0.059s sys 0m0.007s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ack -i '^Subject:' 1.dat real 0m0.070s user 0m0.063s sys 0m0.006s [/SHELL] The same thing happens with grep-2.16 built from the sources. I'm on Mageia Linux x86-64 Cauldron (what will be Mageia 4).=20 shlomif@telaviv1:~$ ldd ~/apps/TEST-grep-from-git-TO-DEL/bin/grep=20 linux-vdso.so.1 (0x00007fff2a7fe000) libpcre.so.1 =3D> /lib64/libpcre.so.1 (0x00007f19ed302000) libc.so.6 =3D> /lib64/libc.so.6 (0x00007f19ecf4d000) libpthread.so.0 =3D> /lib64/libpthread.so.0 (0x00007f19ecd30000) /lib64/ld-linux-x86-64.so.2 (0x00007f19ed568000) shlomif@telaviv1:~$ rpm -qf /lib64/libpcre.so.1 lib64pcre1-8.33-2.mga4 Regards, Shlomi Fish --=20 ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Humanity - Parody of Modern Life - http://shlom.in/humanity Linux =E2=80=94 Because Software Problems Should not Cost Money. Please reply to list if it's a mailing list post - http://shlom.in/reply . --MP_/Je+03KfbBLjRT_9qovx_acs Content-Type: application/octet-stream; name=1.dat Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=1.dat v1Ai8L5QAAAAoAsAAABycnJyIHJycnJych4AAABXZWQsIDUgRGVjIDIwMTIgMDg6NTY6MzQgKzAy MDAfAAAAcnJpciBycnJycnIgPHJycnJycnJAZ21haWwuY29tPiQAAABTaGxvbWkgRmlzaCA8c2hs b21pZkBzaGxvbWlmaXNoLm9yZz4AAAAAAAAAACYAAABSZTogRWR1Y2F0aW9uIHBsYXRmb3JtIGJh c2VkIG9uIERqYW5nb0IAAABDQUV2bTVtZG5UPUdHTUd4cng4ZHI5NC0rWDVIN05QNHVqa2h1QnY5 OUNGQjBPd3NMMXdAbWFpbC5nbWFpbC5jb20qAAAAMjAxMjEyMDMyMTQ1MTcuMGM2NDQ4M2NAbGFw LnNobG9taWZpc2gub3JnAAAAAAAAAAAAAAAAEQAAACoAAAAyMDEyMTIwMzIxNDUxNy4wYzY0NDgz Y0BsYXAuc2hsb21pZmlzaC5vcmdCAAAAQ0FFdm01bWRic1NGY0NxMUJjRV80WkRiUl9SRD0xeHRG WG0tNWY5MWlGVUZmeHhmVzZ3QG1haWwuZ21haWwuY29tKgAAADIwMTIxMTI3MTQzMzE0Ljc2MjNj ZWQzQGxhcC5zaGxvbWlmaXNoLm9yZ0IAAABDQUV2bTVtY09rTV9fRFdtTGMzdnU2MXdBUnNtWHNf WjV4UWV5Sm1IdDVETWZPU2ZMZEFAbWFpbC5nbWFpbC5jb21CAAAAQ0FFdm01bWU4eDJlakxldW1l NTMtRy03X2pabWFTMXFVRi01VVpyUDgzT0cyYzZxNE5RQG1haWwuZ21haWwuY29tKgAAADIwMTIx MTIwMTE0NzM3LjE2MmY3NzMyQGxhcC5zaGxvbWlmaXNoLm9yZ0IAAABDQUV2bTVtY2labS1ZaC13 VW5INlJHNm1oY19Cb2lUK3JWSD1BUExWclhHQnBhSloxYlFAbWFpbC5nbWFpbC5jb20qAAAAMjAx MjExMjAxMTA1MjIuNDg2ZjQwYTlAbGFwLnNobG9taWZpc2gub3JnQgAAAENBRXZtNW1ka0dyZE9r dUhQWi1UWFc2Ygo= --MP_/Je+03KfbBLjRT_9qovx_acs-- From unknown Sat Jun 14 05:12:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16499: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 20 Jan 2014 01:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16499 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Shlomi Fish , 16499@debbugs.gnu.org Cc: shlomif , Paolo Bonzini , Tony Abou-Assaleh Received: via spool by 16499-submit@debbugs.gnu.org id=B16499.139018294526053 (code B ref 16499); Mon, 20 Jan 2014 01:56:02 +0000 Received: (at 16499) by debbugs.gnu.org; 20 Jan 2014 01:55:45 +0000 Received: from localhost ([127.0.0.1]:57421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W545Z-0006m8-0B for submit@debbugs.gnu.org; Sun, 19 Jan 2014 20:55:45 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:39084) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W545U-0006lu-0h for 16499@debbugs.gnu.org; Sun, 19 Jan 2014 20:55:40 -0500 Received: by mail-pd0-f175.google.com with SMTP id w10so955593pde.34 for <16499@debbugs.gnu.org>; Sun, 19 Jan 2014 17:55:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=WC5F767sfKlwc+OwLOKlpmmxdnpquA938rQ9zH3uzwg=; b=NIcHzew1eS8rT6t/pIjsRyAzmJbvUGDntPPJW96HUx5LKB5X6D2Sy4Wbvl+w9EtAwL BTyHDXTIuphUt2XU0rOTU0boW0cWGbZx0QTQ34l54vA0/W9s5CFzbx4kDAifFMbZptiZ N+4PSm39VyDTYC8RUJ6wS8P+Ce5zFdq+EA0JO0zQ5lvDAqhxIIQ0PkTxewcS44VQmlvR qe1IVKFiu17WrmSfVJhDusjm7LYv0xfZB/GJGWXdGfOp+sc2li0d4i2nw+TvlIweUFbY curoubMKIdeOAkmCWwDtOmEd6gY1dIli+twoTv6LdT5EqU8PCywlU8/B5Fq1qdcs1ogn 13hw== X-Received: by 10.66.138.40 with SMTP id qn8mr182354pab.154.1390182939041; Sun, 19 Jan 2014 17:55:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.157.202 with HTTP; Sun, 19 Jan 2014 17:55:18 -0800 (PST) In-Reply-To: <20140119182457.74a5d22f@telaviv1.shlomifish.org> References: <20140119182457.74a5d22f@telaviv1.shlomifish.org> From: Jim Meyering Date: Sun, 19 Jan 2014 17:55:18 -0800 X-Google-Sender-Auth: V4Z-m0qwfk_HKBsVN6FkUe8AqWY Message-ID: Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) [resending also to the correct bug address] > Subject: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file > Hi all, > > after I save the attached file as 1.dat , I see that grep -iP on '^Subject:' > or on '^S' gets stuck in the en_US.UTF-8 locale. It is fine in pcregrep and in > ack. > > [SHELL] > shlomif@telaviv1:~$ time LC_ALL=en_US.UTF-8 > ~/apps/TEST-grep-from-git-TO- DEL/bin/grep -iP '^Subject:' < 1.dat ^C > > real 0m4.199s > user 0m4.195s > sys 0m0.003s Thanks for the report. I am unable to reproduce that on debian unstable using the latest grep: $ env LC_ALL=en_US.UTF-8 time -f %e grep -iP '^S' < /t/1.dat Command exited with non-zero status 1 0.00 [Exit 1] A good way for you to diagnose it is to run under strace or, better, via gdb and find out precisely what code it running when it is making no progress. From unknown Sat Jun 14 05:12:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16499: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file Resent-From: Paolo Bonzini Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 20 Jan 2014 10:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16499 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Jim Meyering Cc: shlomif , Tony Abou-Assaleh , 16499@debbugs.gnu.org, Shlomi Fish Received: via spool by 16499-submit@debbugs.gnu.org id=B16499.139021412614921 (code B ref 16499); Mon, 20 Jan 2014 10:36:02 +0000 Received: (at 16499) by debbugs.gnu.org; 20 Jan 2014 10:35:26 +0000 Received: from localhost ([127.0.0.1]:57726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5CCS-0003sW-5e for submit@debbugs.gnu.org; Mon, 20 Jan 2014 05:35:24 -0500 Received: from mail-ea0-f178.google.com ([209.85.215.178]:37638) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5CCQ-0003sP-DC for 16499@debbugs.gnu.org; Mon, 20 Jan 2014 05:35:22 -0500 Received: by mail-ea0-f178.google.com with SMTP id a15so1891982eae.9 for <16499@debbugs.gnu.org>; Mon, 20 Jan 2014 02:35:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=ik2ML5Q5Vdo02jj4uDr14QBgXUqdhdf6VYzQ593yvnc=; b=FkMo83ch0FLVi45Bj+MK+dRQ+EQ9VevW4Tz7F4uJ67ZCbP7w46RtDqKA4JilorBZPL nXzjIALiR7cS/1EbDE50gpWZ/OoyhLq3QUiyUIgp460G9Zl65/hU/fnjoT7g3MXzym++ 84EPj2Z/2X9QUZXGvhNEeuy+tVJhgK/PV99JXkq07usV3ZUwsFRM8vPvQNnA2Zzi67t5 ZRNP6GcuH6iH53z4Zw41tTQYmOlUPDbrYzqEjVc+SLZPzuu+uhfm84tq+t2Hnt2p/Rjz 44psPgwt2e/M9Ik5PDuA0T8T8jNM7Zo0D+wPL+W0e8klBaeHZnh4J1uawLX0v5I+uVy6 TIpA== X-Received: by 10.14.3.130 with SMTP id 2mr16909299eeh.36.1390214121544; Mon, 20 Jan 2014 02:35:21 -0800 (PST) Received: from yakj.usersys.redhat.com (net-2-35-197-229.cust.dsl.vodafone.it. [2.35.197.229]) by mx.google.com with ESMTPSA id i2sm1885492eem.6.2014.01.20.02.35.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 20 Jan 2014 02:35:20 -0800 (PST) Message-ID: <52DCFBE9.3090005@gnu.org> Date: Mon, 20 Jan 2014 11:35:21 +0100 From: Paolo Bonzini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9 MIME-Version: 1.0 References: <20140119182457.74a5d22f@telaviv1.shlomifish.org> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Il 20/01/2014 02:55, Jim Meyering ha scritto: > Thanks for the report. I am unable to reproduce that on debian > unstable using the latest grep: > > $ env LC_ALL=en_US.UTF-8 time -f %e grep -iP '^S' < /t/1.dat > Command exited with non-zero status 1 > 0.00 > [Exit 1] > > A good way for you to diagnose it is to run under strace or, better, > via gdb and find out precisely what code it running when it is making > no progress. I reproduced it with Fedora 20. $ rpm -q grep pcre grep-2.16-1.fc20.x86_64 pcre-8.33-2.fc20.1.x86_64 Paolo From unknown Sat Jun 14 05:12:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16499: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file Resent-From: Shlomi Fish Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Mon, 20 Jan 2014 10:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16499 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Jim Meyering Cc: Paolo Bonzini , shlomif , 16499@debbugs.gnu.org Received: via spool by 16499-submit@debbugs.gnu.org id=B16499.139021528516922 (code B ref 16499); Mon, 20 Jan 2014 10:55:02 +0000 Received: (at 16499) by debbugs.gnu.org; 20 Jan 2014 10:54:45 +0000 Received: from localhost ([127.0.0.1]:57771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5CVA-0004Or-7A for submit@debbugs.gnu.org; Mon, 20 Jan 2014 05:54:45 -0500 Received: from gateway01.websitewelcome.com ([67.18.62.19]:40273) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5CV7-0004Oi-A6 for 16499@debbugs.gnu.org; Mon, 20 Jan 2014 05:54:42 -0500 Received: by gateway01.websitewelcome.com (Postfix, from userid 5007) id 09A8D17BADB1F; Mon, 20 Jan 2014 04:54:40 -0600 (CST) Received: from gator4065.hostgator.com (gator4065.hostgator.com [192.185.4.76]) by gateway01.websitewelcome.com (Postfix) with ESMTP id EC9B017BADADB for <16499@debbugs.gnu.org>; Mon, 20 Jan 2014 04:54:39 -0600 (CST) Received: from [109.65.32.171] (port=33328 helo=telaviv1.shlomifish.org) by gator4065.hostgator.com with esmtpa (Exim 4.80) (envelope-from ) id 1W5CV5-0005gI-7I; Mon, 20 Jan 2014 04:54:39 -0600 Received: from telaviv1.shlomifish.org (telaviv1.shlomifish.org [127.0.0.1]) by telaviv1.shlomifish.org (Postfix) with ESMTP id 322F826005F; Mon, 20 Jan 2014 12:54:38 +0200 (IST) Date: Mon, 20 Jan 2014 12:54:37 +0200 From: Shlomi Fish Message-ID: <20140120125437.7271fb30@telaviv1.shlomifish.org> In-Reply-To: References: <20140119182457.74a5d22f@telaviv1.shlomifish.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-mageia-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4065.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - shlomifish.org X-BWhitelist: no X-Source-IP: 109.65.32.171 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (telaviv1.shlomifish.org) [109.65.32.171]:33328 X-Source-Auth: shlomif@shlomifish.org X-Email-Count: 4 X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yNDA2NS5ob3N0Z2F0b3IuY29t X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Hi Jim, On Sun, 19 Jan 2014 17:55:18 -0800 Jim Meyering wrote: > [resending also to the correct bug address] > > Subject: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git > > master HEAD get stuck during an LC_ALL=3Den_US.UTF-8 search inside a sh= ort > > binary file Hi all, > > > > after I save the attached file as 1.dat , I see that grep -iP on '^Subj= ect:' > > or on '^S' gets stuck in the en_US.UTF-8 locale. It is fine in pcregrep= and > > in ack. > > > > [SHELL] > > shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 > > ~/apps/TEST-grep-from-git-TO- > DEL/bin/grep -iP '^Subject:' < 1.dat ^C > > > > real 0m4.199s > > user 0m4.195s > > sys 0m0.003s >=20 > Thanks for the report. I am unable to reproduce that on debian > unstable using the latest grep: >=20 > $ env LC_ALL=3Den_US.UTF-8 time -f %e grep -iP '^S' < /t/1.dat > Command exited with non-zero status 1 > 0.00 > [Exit 1] >=20 > A good way for you to diagnose it is to run under strace or, better, > via gdb and find out precisely what code it running when it is making > no progress. After some investigation I discovered that the problem was manifested on x8= 6-64 systems only with PCRE-8.x that was built with JIT support (and --enable-utf too naturally). The problem happens in a JIT-generated function without debugging symbols.=20 If I built PCRE and GNU grep-2.16 like this on a Debian Testing ("jessie") x86-64 VM then running LC_ALL=3Den_US.UTF-8 ~/apps/grep/bin/grep -iP '^S' <= 1.dat caused it to hang: BUILD_pcre.bash: =C2=AB #!/bin/bash CFLAGS=3D"-g" ./configure --prefix=3D"$HOME/apps/pcre" --enable-utf --enabl= e-jit =C2=BB BUILD_grep.bash: =C2=AB #!/bin/bash # Source this file. export CPATH=3D"/home/shlomif/apps/pcre/include/" export LD_LIBRARY_PATH=3D"/home/shlomif/apps/pcre/lib" export LIBRARY_PATH=3D"/home/shlomif/apps/pcre/lib" CFLAGS=3D"-g" ./configure --prefix=3D"$HOME/apps/grep" =C2=BB (searcing for =C2=AB-iP '^Su'=C2=BB was fine). In any case here is the output of running this gdb command set on the grep = on my system: =C2=AB set args -iP '^Subject:' 1.dat b main r b 2280 c b 2398 c b grepfile c b grepdesc c b grep c b grepbuf c b do_execute c b 1077 c s b 178 c s b 6514 c s b 9519 c bt q =C2=BB Output is: =C2=AB shlomif@telaviv1:~/conf/bugs/gnu-grep$ LC_ALL=3Den_US.UTF-8 gdb --command= =3Dcmds.gdb ~/apps/TEST-grep-from-git-TO-DEL/bin/grep=20 GNU gdb (GDB) 7.6-6.mga4 (Mageia release 4) Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-mageia-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/shlomif/apps/TEST-grep-from-git-TO-DEL/bin/grep.= ..done. Breakpoint 1 at 0x407fdf: file main.c, line 1960. [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, main (argc=3D4, argv=3D0x7fffffffd3e8) at main.c:1960 1960 exit_failure =3D EXIT_TROUBLE; Breakpoint 2 at 0x408984: file main.c, line 2280. Breakpoint 2, main (argc=3D4, argv=3D0x7fffffffd3e8) at main.c:2280 2280 if (color_option =3D=3D 2) Breakpoint 3 at 0x408d54: file main.c, line 2398. Breakpoint 3, main (argc=3D4, argv=3D0x7fffffffd3e8) at main.c:2398 2398 status &=3D grep_command_line_arg (argv[optind]); Breakpoint 4 at 0x406dd0: file main.c, line 1372. Breakpoint 4, grepfile (dirdesc=3D-100, name=3D0x7fffffffd94e "1.dat", foll= ow=3D1,=20 command_line=3D1) at main.c:1372 1372 int desc =3D openat_safer (dirdesc, name, O_RDONLY | (follow ? 0 = : O_NOFOLLOW)); Breakpoint 5 at 0x406e66: file main.c, line 1386. Breakpoint 5, grepdesc (desc=3D8, command_line=3D1) at main.c:1386 1386 int status =3D 1; Breakpoint 6 at 0x406579: file main.c, line 1165. Breakpoint 6, grep (fd=3D8, st=3D0x7fffffffd090) at main.c:1165 1165 char eol =3D eolbyte; Breakpoint 7 at 0x4063b0: file main.c, line 1111. Breakpoint 7, grepbuf (beg=3D0x62d000 "\277P\"\360\276P", lim=3D0x62d329 "") at main.c:1111 1111 nlines =3D 0; Breakpoint 8 at 0x406279: file main.c, line 1076. Breakpoint 8, do_execute (buf=3D0x62d000 "\277P\"\360\276P", size=3D809,=20 match_size=3D0x7fffffffcfb8, start_ptr=3D0x0) at main.c:1076 1076 if (MB_CUR_MAX =3D=3D 1 || !match_icase) Breakpoint 9 at 0x40628e: file main.c, line 1077. Breakpoint 9, do_execute (buf=3D0x62d000 "\277P\"\360\276P", size=3D809,=20 match_size=3D0x7fffffffcfb8, start_ptr=3D0x0) at main.c:1077 1077 return execute (buf, size, match_size, start_ptr); Pexecute (buf=3D0x62d000 "\277P\"\360\276P", size=3D809,=20 ---Type to continue, or q to quit--- match_size=3D0x7fffffffcfb8, start_ptr=3D0x0) at pcresearch.c:152 152 int e =3D PCRE_ERROR_NOMATCH; Breakpoint 10 at 0x404b04: file pcresearch.c, line 178. Breakpoint 10, Pexecute (buf=3D0x62d000 "\277P\"\360\276P", size=3D809,=20 match_size=3D0x7fffffffcfb8, start_ptr=3D0x0) at pcresearch.c:178 178 e =3D pcre_exec (cre, extra, line_buf, line_end - line_buf, pcre_exec (argument_re=3D0x62c7f0, extra_data=3D0x62c930,=20 subject=3D0x62d000 "\277P\"\360\276P", length=3D808, start_offset=3D0,= =20 options=3D8192, offsets=3D0x7fffffffca40, offsetcount=3D300) at pcre_ex= ec.c:6392 6392 { Breakpoint 11 at 0x7ffff7b9d797: file pcre_exec.c, line 6514. Breakpoint 11, pcre_exec (argument_re=3D0x62c7f0, extra_data=3D,=20 subject=3D0x62d000 "\277P\"\360\276P", length=3D808, start_offset=3D0,= =20 options=3D8192, offsets=3D0x7fffffffca40, offsetcount=3D300) at pcre_ex= ec.c:6514 6514 rc =3D PRIV(jit_exec)(extra_data, (const pcre_uchar *)subject, le= ngth, _pcre_jit_exec (extra_data=3Dextra_data@entry=3D0x62c930,=20 subject=3Dsubject@entry=3D0x62d000 "\277P\"\360\276P",=20 length=3Dlength@entry=3D808, start_offset=3Dstart_offset@entry=3D0,=20 options=3Doptions@entry=3D8192, offsets=3Doffsets@entry=3D0x7fffffffca4= 0,=20 offset_count=3Doffset_count@entry=3D300) at pcre_jit_compile.c:9460 9460 { Breakpoint 12 at 0x7ffff7bc08d4: file pcre_jit_compile.c, line 9519. Breakpoint 12, _pcre_jit_exec (extra_data=3Dextra_data@entry=3D0x62c930,=20 subject=3Dsubject@entry=3D0x62d000 "\277P\"\360\276P",=20 length=3Dlength@entry=3D808, start_offset=3Dstart_offset@entry=3D0,=20 options=3Doptions@entry=3D8192, offsets=3Doffsets@entry=3D0x7fffffffca4= 0,=20 offset_count=3D2, offset_count@entry=3D300) at pcre_jit_compile.c:9519 9519 retval =3D convert_executable_func.call_executable_func(&argument= s); #0 _pcre_jit_exec (extra_data=3Dextra_data@entry=3D0x62c930,=20 subject=3Dsubject@entry=3D0x62d000 "\277P\"\360\276P",=20 length=3Dlength@entry=3D808, start_offset=3Dstart_offset@entry=3D0,=20 options=3Doptions@entry=3D8192, offsets=3Doffsets@entry=3D0x7fffffffca4= 0,=20 offset_count=3D2, offset_count@entry=3D300) at pcre_jit_compile.c:9519 #1 0x00007ffff7b9d7c0 in pcre_exec (argument_re=3D0x62c7f0,=20 extra_data=3D, subject=3D0x62d000 "\277P\"\360\276P",=20 length=3D808, start_offset=3D0, options=3D8192, offsets=3D0x7fffffffca4= 0,=20 offsetcount=3D300) at pcre_exec.c:6514 #2 0x0000000000404b48 in Pexecute (buf=3D0x62d000 "\277P\"\360\276P", size= =3D809,=20 match_size=3D0x7fffffffcfb8, start_ptr=3D0x0) at pcresearch.c:178 #3 0x00000000004062a7 in do_execute (buf=3D0x62d000 "\277P\"\360\276P",=20 size=3D809, match_size=3D0x7fffffffcfb8, start_ptr=3D0x0) at main.c:1077 #4 0x0000000000406509 in grepbuf (beg=3D0x62d000 "\277P\"\360\276P",=20 lim=3D0x62d329 "") at main.c:1113 #5 0x00000000004067fb in grep (fd=3D8, st=3D0x7fffffffd090) at main.c:1224 #6 0x0000000000407186 in grepdesc (desc=3D8, command_line=3D1) at main.c:1= 478 #7 0x0000000000406e4c in grepfile (dirdesc=3D-100, name=3D0x7fffffffd94e "= 1.dat",=20 follow=3D1, command_line=3D1) at main.c:1379 #8 0x000000000040737a in grep_command_line_arg (arg=3D0x7fffffffd94e "1.da= t") ---Type to continue, or q to quit--- at main.c:1530 #9 0x0000000000408d76 in main (argc=3D4, argv=3D0x7fffffffd3e8) at main.c:= 2398 A debugging session is active. Inferior 1 [process 14934] will be killed. Quit anyway? (y or n) [answered Y; input not from terminal] shlomif@telaviv1:~/conf/bugs/gnu-grep$=20 =C2=BB So it seems the problem is with a JIT-enabled PCRE (though I don't know why= it is not manifested with pcregrep). Regards, Shlomi Fish --=20 ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Original Riddles - http://www.shlomifish.org/puzzles/ Writing a BitKeeper replacement is probably easier at this point than getti= ng its license changed. =E2=80=94 Matt Mackall (who ended up writing a BitKeeper replacement) Please reply to list if it's a mailing list post - http://shlom.in/reply . From unknown Sat Jun 14 05:12:45 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.503 (Entity 5.503) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Shlomi Fish Subject: bug#16499: closed (Re: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file) Message-ID: References: <20140119171011.1cfebc88@telaviv1.shlomifish.org> X-Gnu-PR-Message: they-closed 16499 X-Gnu-PR-Package: grep Reply-To: 16499@debbugs.gnu.org Date: Tue, 21 Jan 2014 23:57:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1390348623-17981-1" This is a multi-part message in MIME format... ------------=_1390348623-17981-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #16499: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git mas= ter HEAD get stuck during an LC_ALL=3Den_US.UTF-8 search inside a short bin= ary file which was filed against the grep package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 16499@debbugs.gnu.org. --=20 16499: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D16499 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1390348623-17981-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 16499-done) by debbugs.gnu.org; 21 Jan 2014 23:56:46 +0000 Received: from localhost ([127.0.0.1]:59943 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5lBW-0004fW-6d for submit@debbugs.gnu.org; Tue, 21 Jan 2014 18:56:46 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:49912) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5lBS-0004fK-KH for 16499-done@debbugs.gnu.org; Tue, 21 Jan 2014 18:56:43 -0500 Received: by mail-pa0-f50.google.com with SMTP id kp14so9072790pab.23 for <16499-done@debbugs.gnu.org>; Tue, 21 Jan 2014 15:56:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=rhPWlC45oIxnmj0nXmyiWHJkO9cYbgqhMaV49XbuWlE=; b=NS8iABVAGc3vefP8tL4VtqcFC/QPH56oIFW+6zLOjEoecQkFLoPWxrcGUWdttPFfbl 7OW2YTmyTM+rqxJgHeF1jnJmqUVLUPxnTHFQkMoocJE7APVlzlpElFUayUET9OcqguQn kqYQJRcKRUHAiaF0UVGI9p1/NTznAOfjeyICA+54oWhFErHeC0MOjPZbvfYSkGWN0kjw bB2kuTAYH+8ZganhGy9y4IXPuJJ9d8uv3dQWDQoj52sMWqXo5A3exmaFYH2o7aWiZquW 99kFJmBS+F3EybqAY7lft9SxZG7nr0GTU+2/fWi8tSxQI1NLyAj1cSlhNkEAQnRPrwGw NTuw== X-Received: by 10.68.180.37 with SMTP id dl5mr27528024pbc.111.1390348601574; Tue, 21 Jan 2014 15:56:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.68.157.202 with HTTP; Tue, 21 Jan 2014 15:56:21 -0800 (PST) In-Reply-To: <20140120125437.7271fb30@telaviv1.shlomifish.org> References: <20140119182457.74a5d22f@telaviv1.shlomifish.org> <20140120125437.7271fb30@telaviv1.shlomifish.org> From: Jim Meyering Date: Tue, 21 Jan 2014 15:56:21 -0800 X-Google-Sender-Auth: 5SG7paH29XNWC6KLzD0McV37w1k Message-ID: Subject: Re: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file To: Shlomi Fish Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 16499-done Cc: Paolo Bonzini , shlomif , 16499-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 16499 notabug close 16499 thanks Thank you for investigating. I agree that it sure looks like the bug is in libpcre, and not in grep itself. If you haven't already reported it to libpcre developers, would you please do that? ------------=_1390348623-17981-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Jan 2014 18:47:01 +0000 Received: from localhost ([127.0.0.1]:57302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W4xOd-0003Du-Uw for submit@debbugs.gnu.org; Sun, 19 Jan 2014 13:47:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56979) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W4u1F-0005R2-56 for submit@debbugs.gnu.org; Sun, 19 Jan 2014 10:10:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4u17-0008Qf-9l for submit@debbugs.gnu.org; Sun, 19 Jan 2014 10:10:36 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:39061) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4u17-0008QZ-4s for submit@debbugs.gnu.org; Sun, 19 Jan 2014 10:10:29 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58683) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4u10-0000HS-Hp for bug-grep@gnu.org; Sun, 19 Jan 2014 10:10:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4u0u-0008PX-0d for bug-grep@gnu.org; Sun, 19 Jan 2014 10:10:22 -0500 Received: from gateway07.websitewelcome.com ([69.93.66.94]:36259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4u0t-0008PR-R0 for bug-grep@gnu.org; Sun, 19 Jan 2014 10:10:15 -0500 Received: by gateway07.websitewelcome.com (Postfix, from userid 5007) id 65156705CAA62; Sun, 19 Jan 2014 09:10:13 -0600 (CST) Received: from gator4065.hostgator.com (gator4065.hostgator.com [192.185.4.76]) by gateway07.websitewelcome.com (Postfix) with ESMTP id 57A67705CAA0E for ; Sun, 19 Jan 2014 09:10:13 -0600 (CST) Received: from [109.65.32.171] (port=57075 helo=telaviv1.shlomifish.org) by gator4065.hostgator.com with esmtpa (Exim 4.80) (envelope-from ) id 1W4u0q-00074j-P1 for bug-grep@gnu.org; Sun, 19 Jan 2014 09:10:13 -0600 Received: from telaviv1.shlomifish.org (telaviv1.shlomifish.org [127.0.0.1]) by telaviv1.shlomifish.org (Postfix) with ESMTP id C36C526005F for ; Sun, 19 Jan 2014 17:10:11 +0200 (IST) Date: Sun, 19 Jan 2014 17:10:11 +0200 From: Shlomi Fish To: bug-grep@gnu.org Subject: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file Message-ID: <20140119171011.1cfebc88@telaviv1.shlomifish.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-mageia-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/Je+03KfbBLjRT_9qovx_acs" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4065.hostgator.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - shlomifish.org X-BWhitelist: no X-Source-IP: 109.65.32.171 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (telaviv1.shlomifish.org) [109.65.32.171]:57075 X-Source-Auth: shlomif@shlomifish.org X-Email-Count: 1 X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yNDA2NS5ob3N0Z2F0b3IuY29t X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Sun, 19 Jan 2014 13:46:58 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.3 (----) --MP_/Je+03KfbBLjRT_9qovx_acs Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi all, after I save the attached file as 1.dat , I see that grep -iP on '^Subject:' or on '^S' gets stuck in the en_US.UTF-8 locale. It is fine in pcregrep and= in ack. [SHELL] shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -iP '^Subject:' < 1.dat ^C real 0m4.199s user 0m4.195s sys 0m0.003s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -iP '^S' < 1.dat ^C real 0m3.486s user 0m3.485s sys 0m0.001s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -iE '^S' < 1.dat real 0m0.002s user 0m0.002s sys 0m0.000s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -P '^S' < 1.dat ^C real 0m1.887s user 0m1.885s sys 0m0.000s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -P '^Subject:' < 1.dat real 0m0.003s user 0m0.000s sys 0m0.002s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -P '^Subject:' < 1.dat time LC_AL= L=3DC ~/apps/TEST-grep-from-git-TO-DEL/bin/grep -iP '^Subject:' < 1.dat real 0m0.003s user 0m0.001s sys 0m0.001s shlomif@telaviv1:~$ time LC_ALL=3DC pcregrep -i '^Subject:' < 1.dat real 0m0.002s user 0m0.001s sys 0m0.000s shlomif@telaviv1:~$ time LC_ALL=3DC ack -i '^Subject:' 1.dat real 0m0.066s user 0m0.059s sys 0m0.007s shlomif@telaviv1:~$ time LC_ALL=3Den_US.UTF-8 ack -i '^Subject:' 1.dat real 0m0.070s user 0m0.063s sys 0m0.006s [/SHELL] The same thing happens with grep-2.16 built from the sources. I'm on Mageia Linux x86-64 Cauldron (what will be Mageia 4).=20 shlomif@telaviv1:~$ ldd ~/apps/TEST-grep-from-git-TO-DEL/bin/grep=20 linux-vdso.so.1 (0x00007fff2a7fe000) libpcre.so.1 =3D> /lib64/libpcre.so.1 (0x00007f19ed302000) libc.so.6 =3D> /lib64/libc.so.6 (0x00007f19ecf4d000) libpthread.so.0 =3D> /lib64/libpthread.so.0 (0x00007f19ecd30000) /lib64/ld-linux-x86-64.so.2 (0x00007f19ed568000) shlomif@telaviv1:~$ rpm -qf /lib64/libpcre.so.1 lib64pcre1-8.33-2.mga4 Regards, Shlomi Fish --=20 ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Humanity - Parody of Modern Life - http://shlom.in/humanity Linux =E2=80=94 Because Software Problems Should not Cost Money. Please reply to list if it's a mailing list post - http://shlom.in/reply . --MP_/Je+03KfbBLjRT_9qovx_acs Content-Type: application/octet-stream; name=1.dat Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=1.dat v1Ai8L5QAAAAoAsAAABycnJyIHJycnJych4AAABXZWQsIDUgRGVjIDIwMTIgMDg6NTY6MzQgKzAy MDAfAAAAcnJpciBycnJycnIgPHJycnJycnJAZ21haWwuY29tPiQAAABTaGxvbWkgRmlzaCA8c2hs b21pZkBzaGxvbWlmaXNoLm9yZz4AAAAAAAAAACYAAABSZTogRWR1Y2F0aW9uIHBsYXRmb3JtIGJh c2VkIG9uIERqYW5nb0IAAABDQUV2bTVtZG5UPUdHTUd4cng4ZHI5NC0rWDVIN05QNHVqa2h1QnY5 OUNGQjBPd3NMMXdAbWFpbC5nbWFpbC5jb20qAAAAMjAxMjEyMDMyMTQ1MTcuMGM2NDQ4M2NAbGFw LnNobG9taWZpc2gub3JnAAAAAAAAAAAAAAAAEQAAACoAAAAyMDEyMTIwMzIxNDUxNy4wYzY0NDgz Y0BsYXAuc2hsb21pZmlzaC5vcmdCAAAAQ0FFdm01bWRic1NGY0NxMUJjRV80WkRiUl9SRD0xeHRG WG0tNWY5MWlGVUZmeHhmVzZ3QG1haWwuZ21haWwuY29tKgAAADIwMTIxMTI3MTQzMzE0Ljc2MjNj ZWQzQGxhcC5zaGxvbWlmaXNoLm9yZ0IAAABDQUV2bTVtY09rTV9fRFdtTGMzdnU2MXdBUnNtWHNf WjV4UWV5Sm1IdDVETWZPU2ZMZEFAbWFpbC5nbWFpbC5jb21CAAAAQ0FFdm01bWU4eDJlakxldW1l NTMtRy03X2pabWFTMXFVRi01VVpyUDgzT0cyYzZxNE5RQG1haWwuZ21haWwuY29tKgAAADIwMTIx MTIwMTE0NzM3LjE2MmY3NzMyQGxhcC5zaGxvbWlmaXNoLm9yZ0IAAABDQUV2bTVtY2labS1ZaC13 VW5INlJHNm1oY19Cb2lUK3JWSD1BUExWclhHQnBhSloxYlFAbWFpbC5nbWFpbC5jb20qAAAAMjAx MjExMjAxMTA1MjIuNDg2ZjQwYTlAbGFwLnNobG9taWZpc2gub3JnQgAAAENBRXZtNW1ka0dyZE9r dUhQWi1UWFc2Ygo= --MP_/Je+03KfbBLjRT_9qovx_acs-- ------------=_1390348623-17981-1-- From unknown Sat Jun 14 05:12:45 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16499: GNU grep-2.16-1.mga4 , grep-2.16 from sources and grep from git master HEAD get stuck during an LC_ALL=en_US.UTF-8 search inside a short binary file Resent-From: Shlomi Fish Original-Sender: "Debbugs-submit" Resent-CC: bug-grep@gnu.org Resent-Date: Wed, 22 Jan 2014 07:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16499 X-GNU-PR-Package: grep X-GNU-PR-Keywords: To: Jim Meyering Cc: Paolo Bonzini , shlomif , 16499-done@debbugs.gnu.org Received: via spool by 16499-done@debbugs.gnu.org id=D16499.13903771448050 (code D ref 16499); Wed, 22 Jan 2014 07:53:02 +0000 Received: (at 16499-done) by debbugs.gnu.org; 22 Jan 2014 07:52:24 +0000 Received: from localhost ([127.0.0.1]:60189 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5sbn-00025l-Q6 for submit@debbugs.gnu.org; Wed, 22 Jan 2014 02:52:24 -0500 Received: from gateway13.websitewelcome.com ([69.93.164.20]:39199) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W5sbl-00025Z-1E for 16499-done@debbugs.gnu.org; Wed, 22 Jan 2014 02:52:22 -0500 Received: by gateway13.websitewelcome.com (Postfix, from userid 5007) id 171E8522A8E7A; Wed, 22 Jan 2014 01:52:19 -0600 (CST) Received: from gator4065.hostgator.com (gator4065.hostgator.com [192.185.4.76]) by gateway13.websitewelcome.com (Postfix) with ESMTP id 01F52522A8E16 for <16499-done@debbugs.gnu.org>; Wed, 22 Jan 2014 01:52:19 -0600 (CST) Received: from [109.65.32.171] (port=33838 helo=telaviv1.shlomifish.org) by gator4065.hostgator.com with esmtpa (Exim 4.80) (envelope-from ) id 1W5sbi-0002hT-EW; Wed, 22 Jan 2014 01:52:18 -0600 Received: from telaviv1.shlomifish.org (telaviv1.shlomifish.org [127.0.0.1]) by telaviv1.shlomifish.org (Postfix) with ESMTP id 7993026005F; Wed, 22 Jan 2014 09:52:12 +0200 (IST) Date: Wed, 22 Jan 2014 09:52:12 +0200 From: Shlomi Fish Message-ID: <20140122095212.370c1b77@telaviv1.shlomifish.org> In-Reply-To: References: <20140119182457.74a5d22f@telaviv1.shlomifish.org> <20140120125437.7271fb30@telaviv1.shlomifish.org> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-mageia-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4065.hostgator.com X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - shlomifish.org X-BWhitelist: no X-Source-IP: 109.65.32.171 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (telaviv1.shlomifish.org) [109.65.32.171]:33838 X-Source-Auth: shlomif@shlomifish.org X-Email-Count: 4 X-Source-Cap: c2hsb21pZjtzaGxvbWlmO2dhdG9yNDA2NS5ob3N0Z2F0b3IuY29t X-Spam-Score: 0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.7 (/) Hi, On Tue, 21 Jan 2014 15:56:21 -0800 Jim Meyering wrote: > Thank you for investigating. I agree that it sure looks like the bug > is in libpcre, and not in grep itself. If you haven't already > reported it to libpcre developers, would you please do that? reported here: http://bugs.exim.org/show_bug.cgi?id=3D1437 Thanks! =E2=80=94 Shlomi Fish --=20 ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Best Introductory Programming Language - http://shlom.in/intro-lang =E2=80=9CI simply hate, detest, loathe, despise, and abhor redundancy.=E2= =80=9D =E2=80=94 http://uncyclopedia.org/wiki/Redundancy Please reply to list if it's a mailing list post - http://shlom.in/reply .