{"action":"created","issue":{"url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/850","repository_url":"https://api.github.com/repos/BurntSushi/ripgrep","labels_url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/850/labels{/name}","comments_url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/850/comments","events_url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/850/events","html_url":"https://github.com/BurntSushi/ripgrep/issues/850","id":303713589,"number":850,"title":"Incorrect results","user":{"login":"abhichandra21","id":3826720,"avatar_url":"https://avatars2.githubusercontent.com/u/3826720?v=4","gravatar_id":"","url":"https://api.github.com/users/abhichandra21","html_url":"https://github.com/abhichandra21","followers_url":"https://api.github.com/users/abhichandra21/followers","following_url":"https://api.github.com/users/abhichandra21/following{/other_user}","gists_url":"https://api.github.com/users/abhichandra21/gists{/gist_id}","starred_url":"https://api.github.com/users/abhichandra21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhichandra21/subscriptions","organizations_url":"https://api.github.com/users/abhichandra21/orgs","repos_url":"https://api.github.com/users/abhichandra21/repos","events_url":"https://api.github.com/users/abhichandra21/events{/privacy}","received_events_url":"https://api.github.com/users/abhichandra21/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-03-09T03:39:15Z","updated_at":"2018-03-09T16:12:56Z","closed_at":null,"author_association":"NONE","body":"#### What version of ripgrep are you using?\r\n\r\nripgrep 0.8.1 (rev c8e9f25b85)\r\n+SIMD -AVX\r\n\r\n#### What operating system are you using ripgrep on?\r\n\r\nSLES 11 SP3\r\n\r\n#### Describe your question, feature request, or bug.\r\n\r\nTried to search using grep and ripgrep and the ripgrep results are incorrect. \r\nIncorrect\r\nI was trying to do some performance testing between grep and ripgrep and the results shown by ripgrep are not correct. I'm searching through log files ~20G in size. Changing options by removing \"-F\" or using a single cpu by adding -j1 didn't make any difference. \r\n\r\n#### If this is a bug, what are the steps to reproduce the behavior?\r\n\r\nThese log files are proprietary, so I can't provide the actual logs.\r\n\r\n#### If this is a bug, what is the actual behavior?\r\n\r\nAdditional output using the --debug flag is following:\r\nLiteral {\r\n    chars: [\r\n        'S',\r\n        'u',\r\n        'c',\r\n        'c',\r\n        'e',\r\n        's',\r\n        's',\r\n        'f',\r\n        'u',\r\n        'l',\r\n        'l',\r\n        'y',\r\n        ' ',\r\n        's',\r\n        'e',\r\n        'n',\r\n        't',\r\n        ' ',\r\n        't',\r\n        'o'\r\n    ],\r\n    casei: false\r\n}\r\nDEBUG/grep::literals/grep/src/literals.rs:38: literal prefixes detected: Literals { lits: [Complete(Successfully sent to)], limit_size: 250, limit_class: 10 }\r\n\r\n#### If this is a bug, what is the expected behavior?\r\nShow correct counts for the string I was searching.\r\n\r\nOutput:\r\nIncorrect\r\n\r\n```\r\n[user1@test@linux 20180308]# time /opt/emageon/var/achandra/rg -Fc \"Successfully sent to\" 201803080* 201803081* 2018030820.log | sort\r\n2018030800.log:301\r\n2018030801.log:55489\r\n2018030802.log:10139\r\n2018030803.log:2881\r\n2018030804.log:16529\r\n2018030805.log:2126\r\n2018030806.log:3772\r\n2018030807.log:10811\r\n2018030808.log:1670\r\n2018030809.log:524\r\n2018030810.log:10\r\n2018030811.log:154\r\n2018030812.log:2965\r\n2018030813.log:2435\r\n2018030814.log:3133\r\n2018030815.log:654\r\n2018030816.log:644\r\n2018030817.log:2206\r\n2018030818.log:312\r\n2018030819.log:2458\r\n2018030820.log:962\r\n\r\nreal    1m57.627s\r\nuser    0m20.769s\r\nsys     0m14.877s\r\n[user1@test@linux 20180308]#\r\n\r\n```\r\nCorrect\r\n```\r\n\r\n[user1@test@linux 20180308]# time grep -Fc \"Successfully sent to\" 201803080* 201803081* 2018030820.log\r\n2018030800.log:46377\r\n2018030801.log:65685\r\n2018030802.log:40223\r\n2018030803.log:41577\r\n2018030804.log:39665\r\n2018030805.log:21650\r\n2018030806.log:29316\r\n2018030807.log:52661\r\n2018030808.log:108611\r\n2018030809.log:129357\r\n2018030810.log:200449\r\n2018030811.log:194566\r\n2018030812.log:147773\r\n2018030813.log:181545\r\n2018030814.log:176097\r\n2018030815.log:157315\r\n2018030816.log:170310\r\n2018030817.log:22196\r\n2018030818.log:238030\r\n2018030819.log:155504\r\n2018030820.log:112215\r\n\r\nreal    37m26.343s\r\nuser    2m12.048s\r\nsys     1m58.763s\r\n[user1@test@linux 20180308]#\r\n```"},"comment":{"url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/comments/371858569","html_url":"https://github.com/BurntSushi/ripgrep/issues/850#issuecomment-371858569","issue_url":"https://api.github.com/repos/BurntSushi/ripgrep/issues/850","id":371858569,"user":{"login":"BurntSushi","id":456674,"avatar_url":"https://avatars3.githubusercontent.com/u/456674?v=4","gravatar_id":"","url":"https://api.github.com/users/BurntSushi","html_url":"https://github.com/BurntSushi","followers_url":"https://api.github.com/users/BurntSushi/followers","following_url":"https://api.github.com/users/BurntSushi/following{/other_user}","gists_url":"https://api.github.com/users/BurntSushi/gists{/gist_id}","starred_url":"https://api.github.com/users/BurntSushi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BurntSushi/subscriptions","organizations_url":"https://api.github.com/users/BurntSushi/orgs","repos_url":"https://api.github.com/users/BurntSushi/repos","events_url":"https://api.github.com/users/BurntSushi/events{/privacy}","received_events_url":"https://api.github.com/users/BurntSushi/received_events","type":"User","site_admin":false},"created_at":"2018-03-09T16:12:56Z","updated_at":"2018-03-09T16:12:56Z","author_association":"OWNER","body":"@abhichandra21 No, definitely not. Incorrect results like this on a simple literal query is a *serious* bug. If I could reproduce it, I would try to fix it as quickly as possible. My guess is that there's something else going on that we're not accounting for and that the search itself isn't buggy. Is there anything else peculiar about your environment? If you're willing to work with me on this, then maybe we can try to debug this:\r\n\r\n1. Does the same problem occur if you're searching only one of these log files?\r\n2. If so, let's throw out the multiple file case and just focus on that one file. Does the same problem occur if you cut the file in half?\r\n3. If so, does it occur if you cut the file in half again? And so on.\r\n\r\nIf you repeat that process and get the file down to a reasonable size, then maybe it's possible to sanitize it and share it. I'm also amenable to other forms of sharing. e.g., You could encrypt the file with my public key and I could promise not to share it, but obviously I understand that's a long shot. :-)"}}
{"actor":{"display_login":"BurntSushi"}}