Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

RangeError: Maximum call stack size exceeded #16

Closed
jagregory opened this issue Oct 6, 2017 · 6 comments
Closed

RangeError: Maximum call stack size exceeded #16

jagregory opened this issue Oct 6, 2017 · 6 comments
Assignees
Labels
bug Confirmed bugs or reports that are very likely to be bugs.

Comments

@jagregory
Copy link

Using a nodejs project on the hosted Hawkeye, it goes bang pretty quickly on one particular repo. Only seems to occur on this one repo though, not any others with the same stack.

Hawkeye starting...

Cloning [ redacted ]
[info] Welcome to Hawkeye v0.14.12!

[info] File Contents dynamically loaded
[info] Entropy dynamically loaded
[info] Example Module dynamically loaded
[info] Secret Files dynamically loaded
[info] Node Constant Hashtable Seed check dynamically loaded
[info] Node CrossEnv malware check dynamically loaded
[info] Node Check Updates dynamically loaded
[info] Node Security Project dynamically loaded
[info] Bundler Scan dynamically loaded
[info] Exclusion patterns: ^node_modules/, ^.git/, ^.git-crypt/, package-lock.json
[info] git repo detected, will only use git tracked files
[info] Files excluded by exclusion patterns: 0
[info] Files included in scan: 663
[info] Running module File Contents
[warn] File which exceeds 80kb limited detected: /tmp/repo-RtDjGM/test/crm-stub/fixtures/api/data/v8.1/GlobalOptionSetDefinitions.json
[warn] File which exceeds 80kb limited detected: /tmp/repo-RtDjGM/yarn.lock
/hawkeye/lib/modules/content/index.js:19
    return item => {
           ^

RangeError: Maximum call stack size exceeded
    at Object.item [as contentMatcher] (/hawkeye/lib/modules/content/index.js:19:12)
    at Object.pattern.check (/hawkeye/lib/modules/content/index.js:45:34)
    at fileManager.readFile (/hawkeye/lib/modules/content/index.js:67:21)
    at Object.FileManager.self.readFile (/hawkeye/lib/fileManager.js:170:12)
    at async.eachSeries (/hawkeye/lib/modules/content/index.js:65:23)
    at /hawkeye/node_modules/async/dist/async.js:3083:16
    at replenish (/hawkeye/node_modules/async/dist/async.js:946:17)
    at iterateeCallback (/hawkeye/node_modules/async/dist/async.js:931:17)
    at /hawkeye/node_modules/async/dist/async.js:906:16
    at fileManager.readFile (/hawkeye/lib/modules/content/index.js:68:13)
Request complete with errors.
@scooterhanson
Copy link
Contributor

This is a strange one. I haven't dug into it yet but in a project with many src trees, it appears that there is a certain threshold in directory depth from where I can run the scan successfully. I'm not saying this is it, but when I cd deeper I can scan the CWD successfully. No rhyme or reason to the depth yet, but I'll keep digging.

@scooterhanson
Copy link
Contributor

scooterhanson commented Oct 13, 2017

115 files max?

[info] Files excluded by exclusion patterns: 0
[info] Files included in scan: 115
[info] Target for scan: /Users/xxx/bin/test-pre-commit-scan/lotsOfFiles
[info] Running module File Contents
[info] scan complete, 0 issues found

vs

[info] Files excluded by exclusion patterns: 0
[info] Files included in scan: 116
[info] Target for scan: /Users/xxx/bin/test-pre-commit-scan/lotsOfFiles
[info] Running module File Contents
/usr/local/lib/node_modules/hawkeye-scanner/lib/scan.js:104
return done(err, output);

Stono added a commit that referenced this issue Oct 24, 2017
This was a nested async callstack issue, see:

  - See: caolan/async#1265
@Stono
Copy link
Contributor

Stono commented Oct 24, 2017

@scooterhanson & @jagregory Please see: #18 and let me know your thoughts!

@Stono Stono self-assigned this Oct 24, 2017
@Stono Stono added the bug Confirmed bugs or reports that are very likely to be bugs. label Oct 24, 2017
Stono added a commit that referenced this issue Oct 27, 2017
@Stono Stono closed this as completed Oct 27, 2017
@jagregory
Copy link
Author

This looks great. Do you know when it'll make it into the hosted deployment? I'm still seeing the issue over there right now.

@Stono
Copy link
Contributor

Stono commented Oct 31, 2017

@jagregory sorry mate, I'll be within the next day or so. I found a few issues on the hosted version that I'm just working through but start a new job tomorrow so it's all been a little hectic!

@Stono
Copy link
Contributor

Stono commented Nov 1, 2017

@jagregory just pushed 0.15.0 to the SaaS version; unfortunately the recent changed I have made resulted in me having to reset the history and notification database, so you'll need to reset that up. The joys of beta software ;)

Lemme know if it works OK for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bugs or reports that are very likely to be bugs.
Projects
None yet
Development

No branches or pull requests

3 participants