Tesseract: SIGSEGV in docker container when called from Java service

Created on 5 Dec 2019  路  3Comments  路  Source: tesseract-ocr/tesseract

I have a simple Java web service that I need to put in a Docker container.
It works fine on the host, but when put in a Docker container it always crashes.
Inside the container I installed tesseract via apk add --update tesseract-ocr
When running from shell it works properly, generating a text file with valid results.

Environment

  • Tesseract Version: tesseract 4.0.0
  • Platform: Linux a-virtual-machine 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64 Linux

Program Output

!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 209
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f6df96902b6, pid=1, tid=0x00007f6dfabb8b10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May  4 17:33:35 UTC 2019)
# Problematic frame:
# C  [libtesseract.so.4.0.0+0x1d62b6]  ERRCODE::error(char const*, TessErrorLogCode, char const*, ...) const+0x164
#
# Core dump written. Default location: //core or core.1
#
# Can not save log file, dump to screen..
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f6df96902b6, pid=1, tid=0x00007f6dfabb8b10
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 3.12.0
# Distribution: Custom build (Sat May  4 17:33:35 UTC 2019)
# Problematic frame:
# C  [libtesseract.so.4.0.0+0x1d62b6]  ERRCODE::error(char const*, TessErrorLogCode, char const*, ...) const+0x164
#
# Core dump written. Default location: //core or core.1
#
# If you would like to submit a bug report, please include
# instructions on how to reproduce the bug and visit:
#   https://icedtea.classpath.org/bugzilla
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x000055db25df2000):  JavaThread "SimpleAsyncTaskExecutor-1" [_thread_in_native, id=28, stack(0x00007f6dfaab8000,0x00007f6dfabb8ad0)]

siginfo: si_signo: 11 (SIGSEGV), si_code: 1 (SEGV_MAPERR), si_addr: 0x0000000000000000

Current Behavior:

Application crashes

Expected Behavior:

No crash

All 3 comments

How do I do that with apk?

Please respect guidelines for posting issue: we do not provide support for 3rd party projects. e.g. you have to be able reproduce problem with tesseract (executable) only - outside of other possible source of problems (docker and java).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LaurentBerger picture LaurentBerger  路  3Comments

egorpugin picture egorpugin  路  6Comments

dthrock picture dthrock  路  5Comments

clarkk picture clarkk  路  6Comments

Shreeshrii picture Shreeshrii  路  4Comments