dgarijo / Widoco

Wizard for documenting ontologies. WIDOCO is a step by step generator of HTML templates with the documentation of your ontology. It uses the LODE environment to create part of the template.
Apache License 2.0
292 stars 88 forks source link

Fatal Error by Java Runtime Environment: SIGSEGV (0xb) #466

Closed KonradHoeffner closed 2 years ago

KonradHoeffner commented 3 years ago

Describe the bug Running Widoco 1.4.15 immediately causes a segmentation fault.

To Reproduce Steps to reproduce the behavior:

  1. Download release file widoco-1.4.15-jar-with-dependencies.jar
  2. java -jar widoco-1.4.15-jar-with-dependencies.jar
  3. See error

Console Output

[main] WARN widoco.Configuration - Error while reading configuration properties from [/home/konrad/opt/config/config.properties]: /home/konrad/opt/config/config.properties (No such file or directory)
[main] WARN widoco.Configuration - Error while loading the default property file: /home/konrad/opt/config/config.properties (No such file or directory)

--WIzard for DOCumenting Ontologies (WIDOCO).
 https://w3id.org/widoco/

You are launching WIDOCO GUI

To use WIDOCO through the command line please type:

java -jar widoco-VERSION-jar-with-dependencies.jar [OPTIONS]

OPTIONS:
    -ontFile PATH  [required (unless -ontURI is used)]: Load a local ontology file (from PATH) to document.
         This option is incompatible with -ontURI
   [...ommitted for brevity...]
    --help: Shows this message and exit.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f6d58b3b0cc, pid=3275, tid=3276
#
# JRE version: OpenJDK Runtime Environment (16.0+36) (build 16+36-2231)
# Java VM: OpenJDK 64-Bit Server VM (16+36-2231, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  0x00007f6d58b3b0cc
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/konrad/core.3275)
#
# An error report file with more information is saved as:
# /home/konrad/hs_err_pid3275.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
zsh: abort (core dumped)  java -jar /home/konrad/opt/widoco-1.4.15-jar-with-dependencies.jar

Desktop (please complete the following information):

dgarijo commented 3 years ago

This does not seem to be an error of WIDOCO per se, but a problem of your JRE. Can you run other java programs? I just run the same command on my Unix machine without an issue. This is my JRE:

java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2, mixed mode, sharing)

Finally, bear in mind that the command you ran launches a GUI. If you are running on shell, it may not work (see the running options instead).

KonradHoeffner commented 3 years ago

Yes, my JRE can run other Java programs without any such error.

I updated my system with kernel 5.12.17-1-ck-skylake and GNOME Shell 40.3 and the problem still occurs. I use Gnome with x11 so GUIs normally work.

I tried it on Wayland as well but the same problem occurs.

However Java reports # The crash happened outside the Java Virtual Machine in native code., maybe that code is not compiled for my operating system or architecture?

Maybe some of Widoco's dependencies contains C code?

KonradHoeffner commented 3 years ago

I tried it now on the same machine under Windows 10 where it works without problems with Java 16.0.1 2021-04-20 (OpenJDK from Oracle).

dgarijo commented 3 years ago

I just tested it out in Linux with Java 16 (Ubuntu) and it seems to work fine:

root@85f88d216827:/test# uname -a
Linux 85f88d216827 5.11.0-7620-generic #21~1624379747~21.04~3abeff8-Ubuntu SMP Wed Jun 23 02:34:03 UTC  x86_64 x86_64 x86_64 GNU/Linux
root@85f88d216827:/test# java --version
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9-202105072341 (build 16.0.1+9-202105072341)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9-202105072341 (build 16.0.1+9-202105072341, mixed mode, sharing)

Running Widoco (this time there are no X, which is the other error I was referring to)

root@85f88d216827:/test# java -jar widoco-1.4.15-jar-with-dependencies.jar 
[main] WARN widoco.Configuration - Error while reading configuration properties from [/test/config/config.properties]: /test/config/config.properties (No such file or directory)
[main] WARN widoco.Configuration - Error while loading the default property file: /test/config/config.properties (No such file or directory)

--WIzard for DOCumenting Ontologies (WIDOCO).
 https://w3id.org/widoco/

You are launching WIDOCO GUI

To use WIDOCO through the command line please type:

java -jar widoco-VERSION-jar-with-dependencies.jar [OPTIONS]

OPTIONS:
    -ontFile PATH  [required (unless -ontURI is used)]: Load a local ontology file (from PATH) to document.
         This option is incompatible with -ontURI
    -ontURI  URI   [required (unless -ontFile is used)]: Load an ontology to document from its URI.
        This option is incompatible with -ontFile
    -outFolder folderName: Specifies the name of the folder where to save the documentation.
        Default name is 'myDocumentation'
    -confFile PATH: Load your own configuration file for the ontology metadata.
        Incompatible with -getOntologyMetadata
    -getOntologyMetadata: Extract ontology metadata from the given ontology 
    -oops: Create an html page with the evaluation from the OOPS service (http://oops.linkeddata.es/)
    -rewriteAll: Replace any existing files when documenting an ontology (e.g., from a previous execution)
    -crossRef: ONLY generate the overview and cross reference sections. The index document will NOT be generated.
        The htaccess, provenance page, etc., will not be generated unless requested by other flags.
        This flag is intended to be used only after a first version of the documentation exists.
    -saveConfig PATH: Save a configuration file on PATH with the properties of a given ontology
    -useCustomStyle: Export the documentation using alternate css files (by Daniel Vila).
    -lang LANG1-LANG2: Generate documentation in multiple languages (separated by "-").
        Note that if the language is not supported, the system will load the labels in english.
        Usage example: en-pt-es
    -includeImportedOntologies: Indicates whether the terms of the imported ontologies of the current ontology
        should be documented as well or not.
    -htaccess: Create a bundle for publication ready to be deployed on your Apache server.
    -webVowl: Create a visualization based on WebVowl in the documentation.
    -licensius: Use the Licensius web services to retrieve license metadata.
        Only works if the -getOntologyMetadata flag is enabled.
    -ignoreIndividuals: Individuals will not be included in the documentation.
    -includeAnnotationProperties: Include annotation properties in the documentation
    -analytics CODE: Add a code snippet for Google analytics to track your HTML documentation.
        You need to add your CODE next to the flag. For example: UA-1234
    -doNotDisplaySerializations: The serializations of the ontology will not be displayed.
    -displayDirectImportsOnly: Include direct imports of the ontology in your documentation.
    -rewriteBase PATH: Change the default rewrite base path. The default value is "/".
        This flag can only be used with the htaccess option.
    -excludeIntroduction: Skip the introduction section in the documentation. 
    -uniteSections: Write all HTML sections into a single HTML document. 
    --help: Shows this message and exit.

[main] ERROR widoco.gui.GuiController - Error while launching the GUI
No X11 DISPLAY variable was set,
but this program performed an operation which requires it.

And running a test (through command line):

root@85f88d216827:/test# java -jar widoco-1.4.15-jar-with-dependencies.jar -ontURI https://raw.githubusercontent.com/ahmad88me/demo/master/alo.owl# -outFolder doc  -rewriteAll -useCustomStyle -lang en -includeImportedOntologies -crossRef -webVowl
[main] INFO widoco.gui.GuiController - 

--WIzard for DOCumenting Ontologies (WIDOCO).
 https://w3id.org/widoco/

[main] WARN widoco.Configuration - Error while reading configuration properties from [/test/config/config.properties]: /test/config/config.properties (No such file or directory)
[main] WARN widoco.Configuration - Error while loading the default property file: /test/config/config.properties (No such file or directory)
[main] WARN widoco.Configuration - Error while reading configuration properties from []:  (No such file or directory)
[main] WARN widoco.Configuration - Error while reading configuration properties from []:  (No such file or directory)
[main] INFO widoco.gui.GuiController - Processed configuration, loading ontology now. isFromFile=false
[main] INFO widoco.WidocoUtils - Attempting to download vocabulary in application/rdf+xml
[main] INFO widoco.WidocoUtils - Load ontology /test/tmp1626449491687/Ontology
[main] INFO widoco.CatalogIRIMapper - Creating JenaCatalogIRIMapper
[main] WARN org.semanticweb.owlapi.util.SAXParsers - http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl, error message: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
[main] WARN org.semanticweb.owlapi.util.SAXParsers - entityExpansionLimit not supported by parser type org.apache.xerces.jaxp.SAXParserImpl, error message: Property 'entityExpansionLimit' is not recognized.
[main] INFO widoco.gui.GuiController - Load properties from the ontology
[main] INFO widoco.gui.GuiController - Generating documentation for https://raw.githubusercontent.com/ahmad88me/demo/master/alo.owl# in lang en
[main] INFO widoco.CreateResources - Generate documentation in doc
[main] INFO widoco.CreateResources - - ontology IRI: http://vocab.linkeddata.es/datosabiertos/def/turismo/alojamiento#
[main] INFO widoco.LODEParser - Parsing Complete!
[main] INFO widoco.CreateResources - No previous version provided. No changelog produced!
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
[main] INFO widoco.Configuration - Doc successfully generated for lang en
Documentation generated successfully

I used this image: docker pull adoptopenjdk/openjdk16:jre-nightly

So it does not seem like a problem of the JRE

dgarijo commented 3 years ago

To be tested: on an archlinux Docker image with the latest JRE.

KonradHoeffner commented 3 years ago

This test could be possible as a GitHub action, which would allow to automate the test for the future.

KonradHoeffner commented 2 years ago

The error does not occur anymore on my machine with Widoco 1.4.15, however I now use the default kernel 5.17.4 and openjdk 18.0.1. I will thus close the issue as I cannot replicate this anymore, I hope that is OK with you. Thanks for the testing and the docker image!