-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash in updateBundleStack() when trying to run tests in parallel #1334
Comments
I tried upgrading to the latest snapshot, somewhat different error message:
|
Thanks for moving to the 20191218-SNAPSHOTs to explore this. I am unable to duplicate this using our tests. I suspect it has something to do with the way a specific |
I tried, but I haven't figured out anything so far. |
I found out something, but I don't know what it means: If I create multiple classes (test suites), then I get the failure. If I put all the tests into a single class and use |
Could you provide your |
Here you go: |
Thanks @oharboe. I've tried duplicating your environment, but I'm unable to reproduce this with our code. Mind you, we only have one example (chisel-template) that uses both iotesters and testers2. This does have two test classes, but it doesn't look like they are running in parallel to me. I've created a bundleStackCrash branch in this repository with my attempt to apply your sbt changes. Could you give this a try and see if it is capable of reproducing your problem? |
@ucbjrl I've just upgraded to 3.3-20200227-SNAPSHOT and the problem is still there. |
@ucbjrl I'm not sure what you're asking me to test. What are the steps? I've just upgraded to 3.3-20200227-SNAPSHOT, the problem is still there. |
Sorry, @oharboe, I should have been more specific. I believe there's an environmental component to this issue, and we need to be able to duplicate enough of your environment to reproduce and ultimately address this issue. chisel-template is the simplest publicly available code body that uses both testers and testers2 the inclusion of which may be instrumental in reproducing this issue. The test I'd like your input on consists of:
This should duplicate at least some of the sbt test environment under which you experienced the issue. If it doesn't demonstrate the issue, could you inspect the sbt settings ( I realize this may be a diversion for you and i understand there is a limit to the resources you have available to devote to this task. Your help is appreciated. |
Excellent! Each class, which can have multiple tests, is executed in serial, so you need many classes to get tests in paralllel. Run
|
@ucbjrl By the way... I've managed to break the back of the running time problems I had with my tests, I'm down from 1h15 to 20 minutes, which is manageable, but there's no reason why some of these iteration times on Chisel tests couldn't be in the sub-minute turnaround time. Especially if the Verilator binaries are cached/reused across runs(saves elaboration AND Verilator AND C/C++ compilation) and one is iterating on the Scala peek/poke code. |
Thanks @oharboe. Yes, with your updates, I can reproduce the issue. I've updated the chisel-template And yes, there is clear consensus that caching the DUT simulation while iterating on tester development would be a significant improvement. It's largely a question of priority, and soliciting contributions from the community-at-large. BTW, you're welcome to attend the weekly developer meetings (Chisel/FIRRTL development meetings happen every Monday from 1100–1300 PT). I realize this may not be a convenient time for you. |
@ucbjrl Thanks! 1100am PDT isn't impossible, just slightly incovenient. I may join in to hear what's going on. |
@ucbjrl I'm travelling to the Bay Area in Monday May 11., might it be possible to join in person for one of these meetings? I wasn't able to make the CCC20 and it would be good to put some faces to the github handles :-) |
Absolutely, but let's continue this discussion via email. |
Hello ! Any news on this ? I ran in the same problem. I sometime have another error:
I'm using snapshot versions also of chisel3 and testers2 (no iotesters in my tests). |
Unfortunately, this appears to be an architectural issue - multiple threads end up using the default Chisel context during parallel tests. I've put it on the priority PR discussion list for tomorrow's developer meeting. |
After discussion at the chisel-dev meeting on April 6, 2020, we've decided to investigate a short-term solution which will attempt to ensure each thread has its own Chisel context at the place the collision typically occurs. Note: this is a whack-a-mole type of solution. The long term solution is to reduce the dependency on and use of global mutable structures. |
Fixed by #1404 |
@ucbjrl I have removed my workaround, seems to work fine. I will open a new issue if the problem resurfaces. Thanks! |
Thanks, it works for me also. |
@ucbjrl I realize this isn't a great bug report.... I'll try to flesh it out as I learn more.
Type of issue: bug report
Impact: no functional change
Development Phase: request
Other information
exceprt from my build.sbt:
If the current behavior is a bug, please provide the steps to reproduce the problem:
I can't provide the source code, but I'm trying to run tests in paralllel(it's going to cut down running time from 1h20 to 20m...).
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/chisel-users/F8PWmR79djE/W270FB1FFgAJ
What is the current behavior?
Exception.
What is the expected behavior?
No exception.
Please tell us about your environment:
What is the use case for changing the behavior?
The text was updated successfully, but these errors were encountered: