Skip to content
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

[DEFECT] Plugin checker (config file creation) might fail if multiple raven instances are accessing to it #1521

Closed
5 of 10 tasks
alfoa opened this issue Apr 20, 2021 · 3 comments

Comments

@alfoa
Copy link
Collaborator

alfoa commented Apr 20, 2021


Defect Description

Plugin checker (config file creation) might fail if multiple raven instances are accessing to it.

The plugin check in RavenRunningRaven randomly fail with the following crash

What did you expect to see happen?

No problem in importing plugins from multiple raven instances

What did you see instead?
CONDA
raven_libraries       *  /Users/alfoa/miniconda3/envs/raven_libraries
Installing ExamplePlugin...
Initializing plugin "/Users/alfoa/projects/raven_github/raven/scripts/../plugins/ExamplePlugin"
 ... plugin located at "/Users/alfoa/projects/raven_github/raven/plugins/ExamplePlugin" ...
Installing plugins ...
 ... plugin "ExamplePlugin" path updated to "/Users/alfoa/projects/raven_github/raven/plugins/ExamplePlugin" ...
Traceback (most recent call last):
  File "/Users/alfoa/projects/raven_github/raven/scripts/install_plugins.py", line 146, in <module>
    rLoc = pluginHandler.tellPluginAboutRaven(plugDir)
  File "/Users/alfoa/projects/raven_github/raven/scripts/plugin_handler.py", line 121, in tellPluginAboutRaven
    root, _ = xmlUtils.loadToTree(configFile)
  File "/Users/alfoa/projects/raven_github/raven/scripts/../framework/utils/xmlUtils.py", line 250, in loadToTree
    tree = ET.parse(filename, parser=parser)
  File "/Users/alfoa/miniconda3/envs/raven_libraries/lib/python3.6/xml/etree/ElementTree.py", line 1196, in parse
    tree.parse(source, parser)
  File "/Users/alfoa/miniconda3/envs/raven_libraries/lib/python3.6/xml/etree/ElementTree.py", line 597, in parse
    self._root = parser._parse_whole(source)
xml.etree.ElementTree.ParseError: no element found: line 1, column 0
Do you have a suggested fix for the development team?

Describe how to Reproduce
Steps to reproduce the behavior:

  1. Random Failure
  2. Raven running Raven

Screenshots and Input Files
Please attach the input file(s) that generate this error. The simpler the input, the faster we can find the issue.

Platform (please complete the following information):

  • OS: [e.g. iOS]
  • Version: [e.g. 22]
  • Dependencies Installation: [CONDA or PIP]

For Change Control Board: Issue Review

This review should occur before any development is performed as a response to this issue.

  • 1. Is it tagged with a type: defect or task?
  • 2. Is it tagged with a priority: critical, normal or minor?
  • 3. If it will impact requirements or requirements tests, is it tagged with requirements?
  • 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
  • 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)

For Change Control Board: Issue Closure

This review should occur when the issue is imminently going to be closed.

  • 1. If the issue is a defect, is the defect fixed?
  • 2. If the issue is a defect, is the defect tested for in the regression test system? (If not explain why not.)
  • 3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
  • 4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
  • 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?
@alfoa
Copy link
Collaborator Author

alfoa commented Apr 20, 2021

I found the reason.

tellPluginAboutRaven() is not "thread-safe". Since we always re-write the config file in the plugins, it might happen that there is a processor that is writing and another that is reading at the same time and the "reading" one fails

@PaulTalbot-INL
Copy link
Collaborator

Ohhh, interesting. What a pain.

@alfoa alfoa changed the title [DEFECT] Title Here [DEFECT] Plugin checker (config file creation) might fail if multiple raven isntances are accessing to it Apr 20, 2021
@alfoa alfoa changed the title [DEFECT] Plugin checker (config file creation) might fail if multiple raven isntances are accessing to it [DEFECT] Plugin checker (config file creation) might fail if multiple raven instances are accessing to it Apr 20, 2021
alfoa added a commit that referenced this issue Apr 20, 2021
@alfoa
Copy link
Collaborator Author

alfoa commented Apr 20, 2021

Fixed in PR #1494

wangcj05 pushed a commit that referenced this issue Oct 29, 2021
* Closes #1493

* removed print statement

* minor other fixes

* restart civet

* Fixed issue #1520. Closes #1520

* Closes #1521

* fix

* Closes #1665

* Fixed GA failures in case of failures

* Update plugin_handler.py

* Update GradientDescent.py

* Update GradientDescent.py

* added failure

* Update GeneticAlgorithm.py

* Update MultiRun.py

added explanation

* Update failureOfRuns.xml

* for test

* making the failures random and adding the test to tests after regolding

* reverted files

* since the new ROM API, this pickled rom needed to be regenerated

* it seems that some of the user guide inputs did not get updated after ROM api update

* fixed Dataset


Co-authored-by: alfoa <andrea.alfonsi@inl.gov>
Co-authored-by: ANDREA ALFONSI <alfoa@ANDREAs-MacBook-Pro.local>
Co-authored-by: Jimmy-INL <52417034+Jimmy-INL@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants