question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Golang list modules command timesout after 30 minutes

See original GitHub issue

Describe the bug Golang list modules command timesout after 30 minutes Please note that same command works outside the dependencycheck (with the same environment where the dependency checker is run). When executed outside dependency checker, “go list -m all” lists 541 dependencies and “go list -json -m all” gives 4551 lines of output. Version of dependency-check used 6.0.2 Log file 2020-10-14 12:42:32,271 org.owasp.dependencycheck.analyzer.GolangModAnalyzer:242 INFO - Golang Mod Analyzer is enabled. 2020-10-14 12:42:32,271 org.owasp.dependencycheck.Engine:762 DEBUG - Starting Golang Mod Analyzer 2020-10-14 12:42:32,271 org.owasp.dependencycheck.Engine:810 DEBUG - Parallel processing with up to 16 threads: Golang Mod Analyzer. 2020-10-14 12:42:32,272 org.owasp.dependencycheck.AnalysisTask:86 DEBUG - Begin Analysis of ‘<path>/go.mod’ (Golang Mod Analyzer) 2020-10-14 12:42:32,272 org.owasp.dependencycheck.analyzer.GolangModAnalyzer:197 INFO - Launching: [go, list, -json, -m, all] from <path> 2020-10-14 13:12:32,272 org.owasp.dependencycheck.Engine:1128 ERROR - Analysis task was cancelled. 2020-10-14 13:12:32,272 org.owasp.dependencycheck.AnalysisTask:90 WARN - An error occurred while analyzing ‘<path>/go.mod’ (Golang Mod Analyzer). 2020-10-14 13:12:32,275 org.owasp.dependencycheck.AnalysisTask:91 DEBUG - org.owasp.dependencycheck.analyzer.exception.AnalysisException: go process interrupted at org.owasp.dependencycheck.analyzer.GolangModAnalyzer.analyzeDependency(GolangModAnalyzer.java:293) at org.owasp.dependencycheck.analyzer.AbstractAnalyzer.analyze(AbstractAnalyzer.java:131) at org.owasp.dependencycheck.AnalysisTask.call(AnalysisTask.java:88) at org.owasp.dependencycheck.AnalysisTask.call(AnalysisTask.java:37) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.InterruptedException: null at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395) at org.owasp.dependencycheck.analyzer.GolangModAnalyzer.analyzeDependency(GolangModAnalyzer.java:290) … 7 common frames omitted 2020-10-14 13:12:32,275 org.owasp.dependencycheck.Engine:1129 DEBUG - java.util.concurrent.CancellationException: null at java.util.concurrent.FutureTask.report(FutureTask.java:121) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at org.owasp.dependencycheck.Engine.executeAnalysisTasks(Engine.java:773) at org.owasp.dependencycheck.Engine.analyzeDependencies(Engine.java:673) at org.owasp.dependencycheck.App.runScan(App.java:270) at org.owasp.dependencycheck.App.run(App.java:202) at org.owasp.dependencycheck.App.main(App.java:83) 2020-10-14 13:12:32,585 org.owasp.dependencycheck.App:218 ERROR - One or more fatal errors occurred 2020-10-14 13:12:32,586 org.owasp.dependencycheck.App:224 ERROR - go process interrupted 2020-10-14 13:12:32,586 org.owasp.dependencycheck.App:225 DEBUG - unexpected error org.owasp.dependencycheck.analyzer.exception.AnalysisException: go process interrupted at org.owasp.dependencycheck.analyzer.GolangModAnalyzer.analyzeDependency(GolangModAnalyzer.java:293) at org.owasp.dependencycheck.analyzer.AbstractAnalyzer.analyze(AbstractAnalyzer.java:131) at org.owasp.dependencycheck.AnalysisTask.call(AnalysisTask.java:88) at org.owasp.dependencycheck.AnalysisTask.call(AnalysisTask.java:37) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.lang.InterruptedException: null at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:502) at java.lang.UNIXProcess.waitFor(UNIXProcess.java:395) at org.owasp.dependencycheck.analyzer.GolangModAnalyzer.analyzeDependency(GolangModAnalyzer.java:290) … 7 common frames omitted 2020-10-14 13:12:32,586 org.owasp.dependencycheck.utils.Settings:751 DEBUG - Deleting ALL temporary files from <path>/<file> 2020-10-14 13:12:32,620 org.owasp.dependencycheck.App:84 DEBUG - Exit code: -13

Expected behavior Report should be clean without any errors.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
benjsmicommented, Jun 10, 2021

Can confirm that I’m still seeing a very similar issue in 6.2.2.

0reactions
andrewmarklloydcommented, Jul 21, 2021

Also confirming the same issue in 6.2.2. Any estimate on a fix for this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to efficiently call a func after X hours? - Stack Overflow
Traversing through a list on the other hand takes very little space and is done in O(n) time. A good example of this...
Read more >
go command - cmd/go - Go Packages
Go is a tool for managing Go source code. Usage: go <command> [arguments]. The commands are: bug start a bug report build compile...
Read more >
time.Sleep() Function in Golang With Examples - GeeksforGeeks
The Sleep() function in Go language is used to stop the latest go-routine for at least the stated duration d.
Read more >
ERRO Running error: context loading failed: failed to ... - GitHub
Default value is empty list, but there is # no need to include all ... [bugs unused] INFO [loader] Go packages loading at...
Read more >
Azure Functions: Extend Execution Timeout Past 5 Minutes
To enable “unlimited execution time” the functionTimout configuration can be set to the value of -1 . However, it is strongly recommended to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found