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.

ClassPath detection incomplete/non-deterministic when using parallel scans

See original GitHub issue

On version 4.8.138

If I construct a ClassGraph instance and have it scan the current classloader, eg:

new ClassGraph()
  .addClassLoader(classLoader)
  .scan()
  .getClasspathFiles()

The results change each time I run it and are generally incomplete (missing many entries). For example, I frequently will only get <50 entries back from a classpath of 800+ items.

If I simply change scan() to scan(1), the results are correct and deterministic. I do have logs for the incorrect and correct runs, but need to work on trying to sanitize them before I upload them here.

I suspect the problem might be that the root/only direct classpath entry is a classpath manifest jar. That then expands to a large (800+) jar classpath.

Any ideas what might be going on here?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:37 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
steveniemitzcommented, Jan 8, 2022

oh no worries/rush! I just wanted to make sure it had gotten to you. On my end I’ve worked around the bug so its not blocking anything for me, take your time!

0reactions
lukehutchcommented, Apr 15, 2022

Sorry, actually this is fixed in 4.8.145 (4.8.144 broke Windows compatibility).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ordering of manifest-only jars on classpath affects class ...
I'm scanning for interfaces in org.springframework.shell . ... ClassPath detection incomplete/non-deterministic when using parallel scans # ...
Read more >
Working with scans in DynamoDB - AWS Documentation
Parallel scan. By default, the Scan operation processes data sequentially. Amazon DynamoDB returns data to the application in 1 MB increments, and an ......
Read more >
Scan Performance Tuning - Soteri Documentation
To speed up scanning, you can change the number of parallel threads used by Security for Bitbucket during scans via the settings page....
Read more >
An uber-fast parallelized Java classpath scanner and module ...
ClassGraph scans the classpath or module path using carefully ... ClassPath detection incomplete/non-deterministic when using parallel scans.
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