Comments (7)
To exclude multithreading issues (as we have seen on other recent bugreports) could you run it with -J-XX:ActiveProcessorCount=1
?
from joern.
To exclude multithreading issues (as we have seen on other recent bugreports) could you run it with
-J-XX:ActiveProcessorCount=1
?
with -J-XX:ActiveProcessorCount=1
option, both two machines can successfully run the joern-parse command. Thanks.
from joern.
To exclude multithreading issues (as we have seen on other recent bugreports) could you run it with
-J-XX:ActiveProcessorCount=1
?
more info: It seems that joern-parse might not work properly with multiple CPUs. I was able to successfully generate cpg.bin when using -J-XX:ActiveProcessorCount=64
. However, when using -J-XX:ActiveProcessorCount=128
, the aforementioned error occurs(this machine has two AMD EPYC 7763 64-Core Processor).
from joern.
@johannescoetzee @DavidBakerEffendi @bbrehm
So that worries me somewhat. We have quite some beefy machines here with tons of processors / RAM.
Could the implementation of the parallel passes (e.g., ForkJoinParallelCpgPass) be the issue here?
Or some limitation w.r.t. ODB with very high thread counts?
@wildoranges Thanks for the detailed report! We'll have a look.
No issues with 64 vs. 128 failing is a quite interesting result.
from joern.
more info: after my testing on my two machines, -J-XX:ActiveProcessorCount=123
has no errors, but processor count > 123 will generate the aforementioned error. 123 seems to be a boundary.
from joern.
Ok, the bug is here.
If you run the pass with 7 nodes that require linking, and have 16 processors available, then you end up with a batch size of 7/16
which is zero. This throws in the grouped iterator thing.
If you run the pass with 101 nodes that require linking, and have 102 processors available, then you end up with a batch size of 101/102
which is zero. This throws in the grouped iterator thing
There is a one-line quickfix -- just set the batchsize to 100 and be done with that nonsense, starting a thread ain't worth it for fewer items anyways. Or if you insist, just ensure that the batchsize is at least 1.
There is an actual fix as well: This code is really really bad. So I'll need to take a look how this got into the codebase in the first place, and talk to both author and reviewers and presumably write another "how not to shoot into your foot when multi-threading" primer.
I'm out with sick kid for today, so I'll look into it once I'm back. Feel free to merge a quickfix in the meantime.
from joern.
Possibly related? #4596
According to this bug fix, it was introduced in #4227, and unfortunately, @bbrehm, you were also a reviewer š
It was a pretty big, complex, and drawn-out PR however, with lots of iterations, but mostly was customer impacting in that the original concurrency of this source finder was not scaling well.
from joern.
Related Issues (20)
- [Bug] parse __ro_after_init failed HOT 2
- how to custom Data-Flow Semantics HOT 2
- [Bug] dataflow error HOT 23
- [Bug] Type loss/erasure in compiled domain classes severely hurts interoperability HOT 5
- Binary File Decompiler To CPG HOT 2
- [Bug] Can't run script in Interactive Shell HOT 2
- [ruby][bug] `%W` String array with Interpolations not parsing correct
- [ruby][bug] `%I` results in an `Unknown` node in `RubyNodeCreator`
- [ruby][bug] Parameters / Statements in `initialize` disappear
- [ruby] Implement handling of `%x`
- [ruby][bug] Syntax error using backticks to execute a system command
- [rubysrc] tracking bug for simpler misc issues HOT 14
- [Bug] [php2cpg] call do not resolve to parent class method when child class do not have overload method
- [Bug] wrong LINE_NUMBER_END of control structure "ELSE" in cpg .dot files HOT 3
- [Bug] [pysrc2cpg] `inheritsFromTypeFullName` names are mangled by file extension separator
- [Bug] [pysrc2cpg] Class inheritance does not recognize generic parent classes
- [Bug][Java] Unable to correctly resolve the full name of the method inherited from the parent class
- [Bug][Java] Inconsistent results for arguments resolving of similar calls
- [Bug][Java]MIssing node in the path given by sink.reachableByFlows(source)
- [Bug][python] Incorrect processing of keyword parameters interrupts the data flow.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joern.