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

Segmentation fault on recognizer.close() in Java #1556

Open
olafth opened this issue Apr 12, 2024 · 1 comment
Open

Segmentation fault on recognizer.close() in Java #1556

olafth opened this issue Apr 12, 2024 · 1 comment

Comments

@olafth
Copy link

olafth commented Apr 12, 2024

I have a RSocket channel, send data and recognition works.
On resource cleanup, specifically on recognizer.close a SIGSEGV happens. I am using VoskApi 0.3.45 and also compiled the current master (0.3.48) and installed libvosk.so in /usr/lib. No changes. OS is Kubuntu 22.04. The SIGSEGV happens both with a self written RSocket client and rsc.jar and the commandline
java -jar rsc.jar --debug --channel --load ./de_1.wav --route audio.bytes.de tcp://localhost:7000

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007b51a67e791f, pid=60565, tid=62882
#
# JRE version: OpenJDK Runtime Environment (17.0.10+13) (build 17.0.10+13-LTS)
# Java VM: OpenJDK 64-Bit Server VM (17.0.10+13-LTS, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [jna18035368486101055434.tmp+0x3e791f]  kaldi::LatticeIncrementalDecoderTpl<fst::Fst<fst::ArcTpl<fst::TropicalWeightTpl<float> > >, kaldi::decoder::BackpointerToken>::~LatticeIncrementalDecoderTpl()+0x1f
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/otho/IdeaProjects/VoskServer/Thor11Asr/core.60565)
#
# An error report file with more information is saved as:
# /home/[...]/hs_err_pid60565.log
_malloc_consolidate(): invalid chunk size_```
@olafth
Copy link
Author

olafth commented Apr 25, 2024

I found the problem. It happens when the recognizer is not disposed of correctly. This should definitely raise an exception, but a SIGSEGV is a bit much :)

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

No branches or pull requests

1 participant