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

CORBA.FAILURE getting a component after reloading its container #54

Open
marco-buttu opened this issue Jun 23, 2017 · 6 comments
Open

Comments

@marco-buttu
Copy link
Contributor

marco-buttu commented Jun 23, 2017

I think there is an issue in Python (I do not know in C++ or Java) after reloading the container. I am using the latest ACS release (2017-02). Here is a test that fails (the complete file is in attachment), because the last but one line raises a CORBA.FAILURE:

    def test_get_component_after_reloading_container(self):
        component = self.client.getComponent(self.component_name)
        foo = component.find_characteristic('foo')
        # Stop the container
        self.container.stop()
        self.container.wait_until_not_running()
        # Restart the container
        self.container.start()
        self.container.wait_until_running()
        # Get again the component, but it is the same if you do not do it
        component = self.client.getComponent(self.component_name)
        foo = component.find_characteristic('foo')  # BOOM!
        self.assertEqual(foo, [])

Basically, if I get the component, stop the container, re-start the container, and get again the component, then at the first use of the component (calling a method, for instance) I get a CORBA.FAILURE. After that everything works fine (if you catch the exception...).

test_get_component.py.txt

marco-buttu added a commit to marco-buttu/ACS that referenced this issue Jun 23, 2017
@acaproni
Copy link

Marco, the reference to the component should be valid even after restarting the container i.e. you should not need to get the component again. Did you try to call a method of the component after resrting the container but without getting the component again?

@marco-buttu
Copy link
Contributor Author

Commit c8ee545 is just a workaround I am using to fix the problem. I am not sending a pull request because I hope someone can find the time to investigate and fix the issue from the root...

@marco-buttu
Copy link
Contributor Author

Hi @acaproni , thanks :-) unfortunately, it is the same :( If you comment the getComponent() line in the test, you get again a CORBA.FAILURE

@bjeram
Copy link

bjeram commented Jun 23, 2017 via email

@marco-buttu
Copy link
Contributor Author

@bjeram , no issue with object explorer, so I think it only happens from the Python side.

@tstaig
Copy link
Collaborator

tstaig commented Sep 12, 2017

Sorry for the delay, I have ran into this issue before too. I don't know if you have had luck with this (other than the workaround). But it doesn't seem to be a bug, but rather a design decision made by OmniORBpy:
http://www.omniorb-support.com/pipermail/omniorb-list/2011-February/030906.html
The alternative to the try/catch you're doing would be to install a system exception handler, to automatically retry once, hence hiding the need to try/catch every time you are under this condition. See:
http://omniorb.sourceforge.net/omnipy3/omniORBpy/omniORBpy004.html
Section 4.7 explains the details about system exeption handlers for OmniORBpy, for your situation you're specially interested in section 4.7.3. Hope this helps.

I can confirm that both TAO and JacORB didn't make the same design decision and work right away with the existing reference after restarting the container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants