Termination in a bad_alloc error

Submitted by carlesg on Wed, 01/24/2018 - 18:54
Forums

Hello,

We are using Freeling 3.1 on a LINUX RED HAT Server, from the Java API bridge. We start several JVM services (Uima AS) that can process text request to analyze in some different ways, using Freeling.
Since the last few weeks, the amount of requests is increasing. From that time, we are noticing that some JVM collapse. It seems to be randomly.

Each time the process falls, we see a log line like:

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
/apps/uima-as/bin/runUimaClass.sh: line 109: 15312 Aborted (core dumped) "$UIMA_JAVA_CALL" -DVNS_HOST=$VNS_HOST -DVNS_PORT=$VNS_PORT "-Duima.home=$UIMA_HOME" "-Duima.datapath=$UIMA_DATAPATH" "-Djava.util.logging.config.file=$UIMA_LOGGER_CONFIG_FILE" "$UIMA_CVDMAN" $UIMA_JVM_OPTS "$LOG4J_CONFIG_FILE" -DUimaBootstrapSuppressClassPathDisplay -Dorg.apache.uima.jarpath="$UIMA_CLASSPATH" -jar "$UIMA_HOME/lib/uimaj-bootstrap.jar" $@

We got some Linux ELF core file, but we cannot understand what is in it.
We have seen in another Topic ( http://blade10.cs.upc.edu/freeling-old/index.php?option=com_simpleboard… ) that this can be caused by a wrong format on the dictionary files. How can we check if this is the cause?
How can we know what is causing the problem? How can we fix it?

If it is random, it may be a memory leak (I believe I recall 3.1 had a leak in parse_tree class, so if you use parsing modules, you may run out of memory after some time).

It also may be some error in a data file, but that probably would not be random

In any case, version 3.1 is some years old and many things have been improved and fixed since then. You should consider moving to version 4.