-
Notifications
You must be signed in to change notification settings - Fork 233
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
Protege hangs when attempting to save certain obo files #501
Comments
I can reproduce this with the particular commit mentioned. Just to note, with the head of master things work as expected. Will look into it. |
For information, I'm getting a bunch of errors when saving the commit:
The errors are thrown by Protege should of course handle this a bit better. |
The above error messages are red herrings. I think I've found the actual problem, which looks like it is caused by a deadlock that happens in the OWL API when there is essentially an attempt to upgrade a manager read lock to a write lock (which isn't possible). This is happens when the OWLAPIOwl2Obo code creates a fresh ontology during the save. I haven't checked, but the code path that does this isn't always invoked on a save. |
Another update... The deadlock arises when the save code has to translate axioms that cannot be serialised to OBO syntax. In this case the axioms are saved in functional syntax and this serialisation is written into the OBO file - as far as I can tell. To do this, a fresh ontology is created. This requires a write lock, which blocks due to the read lock that is held during the save operation. It would be best if a separate manager was created in order to generate the functional syntax. However, we should also check the locking strategy in the OWL API to see whether it is doing the right thing here. |
Thanks! Yes, you are quite right, see 5.0.4 of the spec for treatment of untranslatable axioms. Just knowing this is the cause should give us some short term options (these are probably unintended in this ontology). |
Removing the owl-axioms header. This contained two axioms that couldn't be translated to .obo: * TO_0000241 had an rdfs:comment that was an empty string * TO_0000980 had a created_by that was an empty string These were presumably unintentional/errors It seems the owl->obo converter refuses to convert empty-string fields, which forces them into the OWL header (http://owlcollab.github.io/oboformat/doc/obo-syntax.html#5.04) This is not itself a problem normally, but until protegeproject/protege#501 is fixed, the file cannot be saved in obo from protege
Any progress on this? Was hoping it would be fixed in 5.1, but (from the file I'm working with right now at least) it seems not. Many thanks, |
Hi David, I believe that the fix for this needs to occur in the OBO writer. I'm not sure who's best placed to fix this. Copying in @ignazio1977 incase he has thoughts about it! |
OWLAPIOwl2Obo has a translationManager included that's used only for untranslatable axioms and to obtain data factories - looks like it was designed to act as a separate manager. However in the OWLAPI renderer this manager is initialised with the ontology manager, which would cause the problem Matthew is observing. I'll try to replicate this in a unit test. |
On Jul 10, 2017, at 8:53 AM, LilyAndres ***@***.***> wrote:
Is there any update to this? I've been just trying to use owl2obo but I'm just wasting my time. I'm working with version the 5.2.0
I can confirm that this is still an issue with 5.2. I (now) only see this issue when a stanza contains an OBO id axiom whose value differs from the URI.
e.g. of AP axiom:
http://www.geneontology.org/formats/oboInOwl#id "GO:0000199"^^xsd:string
This is a common issue when creating terms through duplication. robot and owltools cope fine with this.
|
I can confirm that this is still an issue with 5.2. I (now) only see
this issue when a stanza contains an OBO id axiom whose value differs
from the URI.
e.g. of AP axiom:
http://www.geneontology.org/formats/oboInOwl#id
"GO:0000199"^^xsd:string
This is a common issue when creating terms through duplication. robot
and owltools cope fine with this.
These annotations cause a lot of confusion. Perhaps we should remove the
auto-generation of these
|
This needs retesting with 5.5.0-beta-8 or later as we've upgraded the OWL API |
I can confirm that the problem is still present in the latest snapshot of Protege-5.5.0-beta-9. |
Are these large files? There's a long-standing issue with large obo files, the translator requires a lot of memory. |
I don't think the files are large @ignazio1977. I'm pretty sure that the problem is caused by the deadlock described above. Basically this comment and the one above it. |
Ok, deadlock can be replicated with a small test:
I'll look into a solution, but it might be tricky. |
Beautiful test case @ignazio1977 |
protegeproject/protege#501 OBO renderers serialise untranslatable axioms as a functional syntax string, but the FS renderer needs an ontology to work on. Using the manager that hosts the ontology to save to create the new ontology causes a deadlock - the read lock has already been acquired, the creation of a new ontology tries to engage the write lock -> deadlock. Fix is to use an injector to get a new manager to create the ontology. A manager provider would be a better solution but there are static methods and interface changes involved.
Fix is up, I'm not overly proud of it but it's the best fix that does not involve interface changes. |
Thanks @ignazio1977. Will keep my eyes open for a 4 release. |
I'd like to fix the different individuals annotation issue before releasing |
OWLAPI 4.5.9 has been released, fixes three bugs that affect Protege. |
Thanks so much for the fix @ignazio1977 |
Thanks!!! |
protegeproject/protege#501 OBO renderers serialise untranslatable axioms as a functional syntax string, but the FS renderer needs an ontology to work on. Using the manager that hosts the ontology to save to create the new ontology causes a deadlock - the read lock has already been acquired, the creation of a new ontology tries to engage the write lock -> deadlock. Fix is to use an injector to get a new manager to create the ontology. A manager provider would be a better solution but there are static methods and interface changes involved.
The plant trait ontology editors would like to keep their source file in obo (for diffs) and edit in Protege. Unfortunately Protege hangs whenever they try and save.
The ontology can be parsed and saved using the OWLAPI so it seems likely there is something in Protege causing this. I have been unable to reduce this to a small test example (since it requires opening up Protege, making a change, saving, which is time consuming). There are no obvious culprits, and I have not seen this behavior in any ontology.
To reproduce:
plant-trait-ontology.obo
in Protegecarbon sensitivity
, modify the textual definitionProtege will hang.
We are using the latest Protege -- About shows "Protege 5.0.0. (Build )"
cc @marieALaporte @austinmeier @cooperl09
The text was updated successfully, but these errors were encountered: