grep works too long and consumes more than 2 GB

Sergey A. Solodky
Tue Feb 18 17:56:00 GMT 2020


I encountered a grep issue. For now, I use the older version of Cygwin 
(32-bit, W2k3) in my test environment (for nightly tests). I'm going to 
migrate to a  modern platform, Windows Sever 2016 or 2019. In the 
archive attached is a sample to reproduce the issue. Here is a simple 
script trying counting strings in data file (56 strings) according to a 
pattern (a pretty long one, auto-generated by test) in the corresponding 
file. Both data file and pattern file are from the real test. This 
counting takes about 25 seconds on the older 32-bit system and more than 
2 and half hours on the newer one. See result_*.log files. In the last 
case grep fully uses 1 core of Core-i7 and consumes 2+ GB of memory. See 

The pattern contains two serial 'http_host' sub-patterns. Maybe they 
lead to the issue because another similar tests have no such a problem 
and they do not contain such 'pairs'.

Best wishes,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: grep_issue.7z
Type: application/octet-stream
Size: 19035 bytes
Desc: not available
URL: <>
-------------- next part --------------

Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list