Segmentation fault
Opened this issue · 7 comments
On a Raspberry Pi, Raspbian jessie, using a USB microphone interface that does work with arecord.
When executing ./witd-arm -i plughw:1,0 -v 10
:
[wit] initialized sox: 14.4.1
[wit] init state machine
[wit] initialized with device: plughw:1,0
[witd] listening on 0.0.0.0:9877
[wit] ready. state=idle
[http] request: /start?autoend=true&access_token=private
[wit] initialized recording device
[wit] rate: 48000, channels: 2, encoding: SOX_ENCODING_SIGN2, bits_per_sample: 16, opposite_endian: SoxFalse
[wit] Sending speech request with content type: audio/raw;encoding=signed-integer;bits=16;rate=48000;endian=big
[wit] ready. state=recording
[wit] received true
Segmentation fault
Any idea?
Thanks for the report. Do text queries work? (http://localhost:9877/text?q=hello&access_token=***
) And what about queries with end-of-speech detection disabled? (http://localhost:9877/start?access_token=***
and http://localhost:9877/stop
)
stop and text works.
start without autoend outputs a lot of numbers:
[wit] error while sending: Some([0, 11, 0, 11, 0, 12, 0, 12, 0, 21, 0, 21, 0, 31, 0, 31, 0, 43, 0, 43, 0, 50, 0, 50, 0, 54, 0, 54, 0, 48, 0, 48, 0, 47, 0, 47, 0, 48, 0, 48, 0, 50, 0, 50, 0, 73, 0, 73, 0, 70, 0, 70, 0, 63, 0, 63, 0, 51, 0, 51, 0, 42, 0, 42, 0, 32, 0, 32, 0, 34, 0, 34, 0, 35, 0, 35, 0, 39, 0, 39, 0, 33, 0, 33, 0, 22, 0, 22, 0, 12, 0, 12, 0, 11, 0, 11, 0, 18, 0, 18])
We haven't had a chance to test witd-arm on Jessie yet. I updated witd-arm
so that it contains debugging symbols. If you have time could you try running it inside gdb
and showing a backtrace? (gdb --args ./witd-arm -i plughw:1,0 -v 10
, then run
, do the http request with autoend=true
, and do bt
when you get a segfault). This way we might be able to see what is failing.
root ~/wit.ai # gdb --args ./witd-arm -i plughw:1,0 -v 10
GNU gdb (Raspbian 7.7.1+dfsg-3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./witd-arm...done.
(gdb) run
Starting program: /root/wit.ai/witd-arm -i plughw:1,0 -v 10
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
Cannot access memory at address 0x0
Program received signal SIGILL, Illegal instruction.
0xb6e56b40 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) continue
Continuing.
Cannot access memory at address 0x0
Program received signal SIGILL, Illegal instruction.
0xb6e56b48 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0
(gdb) continue
Continuing.
[wit] initialized sox: 14.4.1
[wit] init state machine
[New Thread 0xb56e33d0 (LWP 482)]
[wit] initialized with device: plughw:1,0
[witd] listening on 0.0.0.0:9877
[wit] ready. state=idle
[New Thread 0xb54e33d0 (LWP 483)]
[New Thread 0xb52e33d0 (LWP 484)]
[http] request: /start?autoend=true&access_token=RH546W5ESRADISIMP5X7USEY7BFX2RO5
[wit] initialized recording device
[wit] rate: 48000, channels: 2, encoding: SOX_ENCODING_SIGN2, bits_per_sample: 16, opposite_endian: SoxFalse
[New Thread 0xb4a313d0 (LWP 485)]
[wit] Sending speech request with content type: audio/raw;encoding=signed-integer;bits=16;rate=48000;endian=big
[wit] received true
[New Thread 0xb48313d0 (LWP 486)]
[wit] ready. state=recording
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb4a313d0 (LWP 485)]
0xb62c9d4c in snd_pcm_state () from /usr/lib/arm-linux-gnueabihf/libasound.so.2
(gdb) bt
#0 0xb62c9d4c in snd_pcm_state ()
from /usr/lib/arm-linux-gnueabihf/libasound.so.2
#1 0xb62d133c in ?? () from /usr/lib/arm-linux-gnueabihf/libasound.so.2
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Hi Emile, we are looking into the issue.
Awesome, thanks. If i can help, let me know!
I'll try to reproduce your issue today and let you know what I get. Thank you for your patience!