taosd is active, but dnodes is offline - tdengine

Bug Description
tdengine 3.0.2.2 :Unexpected restart when querying TDengine database.
To Reproduce
Steps to reproduce the behavior:
select * from database.stable limit 10000,1000
Expected Behavior
RD [root#tdengine01 ~]# coredumpctl list
TIME PID UID GID SIG COREFILE EXE
Sat 2023-01-07 21:02:43 CST 195171 0 0 6 present /usr/local/taos/bin/taosd
Sun 2023-01-08 01:00:38 CST 251379 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 02:40:36 CST 503716 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 03:11:36 CST 88591 0 0 6 present /usr/local/taos/bin/taosd
Sun 2023-01-08 06:57:07 CST 122152 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 10:10:07 CST 362836 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 10:39:07 CST 45410 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 11:08:07 CST 76783 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 12:38:06 CST 107478 0 0 6 truncated /usr/local/taos/bin/taosd
PRD [root#tdengine01 ~]#
Cannot access memory at address 0x7f75ece70128
Cannot access memory at address 0x7f75ece70120
Failed to read a valid object file image from memory.
Core was generated by `/usr/bin/taosd'.
Program terminated with signal SIGABRT, Aborted.
Screenshots
If applicable, add screenshots to help explain your problem.
image
Environment (please complete the following information):
OS:CentOS Linux release 8.2.2004 (Core)
Memory, CPU, current Disk Space
PRD [root#tdengine01 ~]# free -g
total used free shared buff/cache available
Mem: 15 1 3 0 10 13
Swap: 9 0 9
PRD [root#tdengine01 ~]#
PRD [root#tdengine01 ~]# lscpu |grep CPU
CPU op-mode(s): 32-bit, 64-bit
CPU(s): 8
TDengine Version [e.g. 3.0.2.2]
1/07 18:09:54.189952 00068047 UTL apoll url not load
01/07 18:09:54.190014 00068047 UTL load from cfg file /etc/taos//taos.cfg success
01/07 18:09:54.190019 00068047 UTL env file:.env not load
01/07 18:09:54.190024 00068047 UTL load from env variables cfg success
01/07 18:09:54.190058 00068047 UTL global config
01/07 18:09:54.190060 00068047 UTL =================================================================
01/07 18:09:54.190062 00068047 UTL cfg_file firstEp tdengine01:6030
01/07 18:09:54.190064 00068047 UTL default secondEp tdengine01:6030
01/07 18:09:54.190066 00068047 UTL cfg_file fqdn tdengine01
01/07 18:09:54.190068 00068047 UTL default serverPort 6030
01/07 18:09:54.190070 00068047 UTL default tempDir /tmp/
01/07 18:09:54.190072 00068047 UTL default minimalTmpDirGB 1.00
01/07 18:09:54.190076 00068047 UTL default shellActivityTimer 3
01/07 18:09:54.190077 00068047 UTL default compressMsgSize -1
01/07 18:09:54.190079 00068047 UTL default compressColData -1
01/07 18:09:54.190080 00068047 UTL default queryPolicy 1
01/07 18:09:54.190082 00068047 UTL default querySmaOptimize 0
01/07 18:09:54.190084 00068047 UTL default queryPlannerTrace 0
01/07 18:09:54.190085 00068047 UTL default queryNodeChunkSize 32768
01/07 18:09:54.190087 00068047 UTL default queryUseNodeAllocator 1
01/07 18:09:54.190088 00068047 UTL default keepColumnName 0
01/07 18:09:54.190090 00068047 UTL default smlChildTableName
01/07 18:09:54.190091 00068047 UTL default smlTagName _tag_null
01/07 18:09:54.190093 00068047 UTL default smlDataFormat 0
01/07 18:09:54.190094 00068047 UTL default smlBatchSize 10000
01/07 18:09:54.190096 00068047 UTL default maxMemUsedByInsert 1024
01/07 18:09:54.190097 00068047 UTL default useAdapter 0
01/07 18:09:54.190099 00068047 UTL default configDir /etc/taos/
01/07 18:09:54.190100 00068047 UTL default scriptDir /etc/taos/
01/07 18:09:54.190102 00068047 UTL cfg_file logDir /app/log/taos
01/07 18:09:54.190103 00068047 UTL default minimalLogDirGB 1.00
01/07 18:09:54.190105 00068047 UTL default numOfLogLines 10000000
01/07 18:09:54.190107 00068047 UTL default asyncLog 1
01/07 18:09:54.190108 00068047 UTL default logKeepDays 0
01/07 18:09:54.190110 00068047 UTL default debugFlag 0
01/07 18:09:54.190111 00068047 UTL default simDebugFlag 143
01/07 18:09:54.190112 00068047 UTL default tmrDebugFlag 131
01/07 18:09:54.190114 00068047 UTL default uDebugFlag 131
01/07 18:09:54.190115 00068047 UTL default rpcDebugFlag 131
01/07 18:09:54.190116 00068047 UTL default jniDebugFlag 131
01/07 18:09:54.190118 00068047 UTL default qDebugFlag 131
01/07 18:09:54.190119 00068047 UTL default cDebugFlag 131
01/07 18:09:54.190120 00068047 UTL default timezone Asia/Shanghai (CST, +0800)
01/07 18:09:54.190122 00068047 UTL default locale en_US.UTF-8
01/07 18:09:54.190123 00068047 UTL default charset UTF-8
01/07 18:09:54.190125 00068047 UTL default assert 1
01/07 18:09:54.190126 00068047 UTL default enableCoreFile 1
01/07 18:09:54.190128 00068047 UTL default numOfCores 8.00
01/07 18:09:54.190130 00068047 UTL default openMax 524288
01/07 18:09:54.190132 00068047 UTL default streamMax 16
01/07 18:09:54.190133 00068047 UTL default pageSizeKB 4
01/07 18:09:54.190135 00068047 UTL default totalMemoryKB 16267956
01/07 18:09:54.190136 00068047 UTL default os sysname Linux
01/07 18:09:54.190140 00068047 UTL default os nodename tdengine01
01/07 18:09:54.190141 00068047 UTL default os release 4.18.0-193.el8.x86_64
01/07 18:09:54.190143 00068047 UTL default os version Update README.md #1 SMP Fri May 8 10:59:10 UTC 2020
01/07 18:09:54.190144 00068047 UTL default os machine x86_64
01/07 18:09:54.190146 00068047 UTL default version 3.0.2.2
01/07 18:09:54.190147 00068047 UTL default compatible_version 3.0.0.0
01/07 18:09:54.190149 00068047 UTL default gitinfo c09602b
01/07 18:09:54.190150 00068047 UTL default buildinfo Built at 2022-12-28 15:17
Additional Context
Add any other context about the problem here.
RD [root#tdengine01 ~]# coredumpctl list
TIME PID UID GID SIG COREFILE EXE
Sat 2023-01-07 21:02:43 CST 195171 0 0 6 present /usr/local/taos/bin/taosd
Sun 2023-01-08 01:00:38 CST 251379 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 02:40:36 CST 503716 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 03:11:36 CST 88591 0 0 6 present /usr/local/taos/bin/taosd
Sun 2023-01-08 06:57:07 CST 122152 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 10:10:07 CST 362836 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 10:39:07 CST 45410 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 11:08:07 CST 76783 0 0 6 truncated /usr/local/taos/bin/taosd
Sun 2023-01-08 12:38:06 CST 107478 0 0 6 truncated /usr/local/taos/bin/taosd
PRD [root#tdengine01 ~]#
RD [root#tdengine01 ~]# coredumpctl info 107478
PID: 107478 (taosd)
UID: 0 (root)
GID: 0 (root)
Signal: 6 (ABRT)
Timestamp: Sun 2023-01-08 12:38:00 CST (5h 35min ago)
Command Line: /usr/bin/taosd
Executable: /usr/local/taos/bin/taosd
Control Group: /
Slice: -.slice
Boot ID: 2a2d62239b2e4d7782d4e82db53edc91
Machine ID: fc7b99c55f466e3dbf411011f4695719
Hostname: tdengine01
Storage: /var/lib/systemd/coredump/core.taosd.0.2a2d62239b2e4d7782d4e82db53edc91.107478.1673152680000000.lz4 (truncated)
Message: Process 107478 (taosd) of user 0 dumped core.
Stack trace of thread 107542:
#0 0x00007f75ebf0c70f n/a (n/a)
PRD [root#tdengine01 ~]#
RD [root#tdengine01 ~]# coredumpctl gdb 107478
PID: 107478 (taosd)
UID: 0 (root)
GID: 0 (root)
Signal: 6 (ABRT)
Timestamp: Sun 2023-01-08 12:38:00 CST (5h 35min ago)
Command Line: /usr/bin/taosd
Executable: /usr/local/taos/bin/taosd
Control Group: /
Slice: -.slice
Boot ID: 2a2d62239b2e4d7782d4e82db53edc91
Machine ID: fc7b99c55f466e3dbf411011f4695719
Hostname: tdengine01
Storage: /var/lib/systemd/coredump/core.taosd.0.2a2d62239b2e4d7782d4e82db53edc91.107478.1673152680000000.lz4 (truncated)
Message: Process 107478 (taosd) of user 0 dumped core.
Stack trace of thread 107542:
#0 0x00007f75ebf0c70f n/a (n/a)
GNU gdb (GDB) Red Hat Enterprise Linux 8.2-11.el8
Copyright (C) 2018 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 "x86_64-redhat-linux-gnu".
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 /usr/local/taos/bin/taosd...done.
BFD: warning: /var/tmp/coredump-ePvRzI is truncated: expected core file size >= 2273423360, found: 2147483648
[New LWP 107542]
[New LWP 107494]
[New LWP 107482]
[New LWP 107505]
[New LWP 107478]
[New LWP 107486]
[New LWP 107488]
[New LWP 107566]
[New LWP 107500]
[New LWP 107570]
[New LWP 107540]
[New LWP 107569]
[New LWP 107562]
[New LWP 107561]
[New LWP 107498]
[New LWP 107563]
[New LWP 107544]
[New LWP 107553]
[New LWP 107510]
[New LWP 107531]
[New LWP 107554]
[New LWP 107534]
[New LWP 107550]
[New LWP 107549]
[New LWP 107508]
[New LWP 107504]
[New LWP 107523]
[New LWP 107511]
[New LWP 107529]
[New LWP 107532]
[New LWP 107499]
[New LWP 107490]
[New LWP 107527]
[New LWP 107509]
[New LWP 107539]
[New LWP 107502]
[New LWP 107528]
[New LWP 107481]
[New LWP 107533]
[New LWP 107501]
[New LWP 107506]
[New LWP 107530]
[New LWP 107524]
[New LWP 107503]
[New LWP 107564]
[New LWP 107489]
[New LWP 107521]
[New LWP 107522]
[New LWP 107512]
[New LWP 107556]
[New LWP 107571]
[New LWP 107520]
[New LWP 107541]
[New LWP 107526]
[New LWP 107604]
[New LWP 107552]
[New LWP 107507]
[New LWP 107525]
[New LWP 107487]
[New LWP 107538]
[New LWP 107517]
[New LWP 107568]
[New LWP 107518]
[New LWP 107572]
[New LWP 107567]
[New LWP 107551]
[New LWP 107479]
[New LWP 107483]
[New LWP 107543]
[New LWP 107558]
[New LWP 107537]
[New LWP 107559]
[New LWP 107480]
[New LWP 107557]
[New LWP 107535]
[New LWP 108521]
[New LWP 107565]
[New LWP 107560]
[New LWP 107548]
[New LWP 107546]
[New LWP 107547]
[New LWP 107519]
[New LWP 107492]
[New LWP 107493]
[New LWP 107484]
[New LWP 107485]
[New LWP 107555]
[New LWP 107536]
[New LWP 107545]
Cannot access memory at address 0x7f75ece70128
Cannot access memory at address 0x7f75ece70120
Failed to read a valid object file image from memory.
Core was generated by `/usr/bin/taosd'.
Program terminated with signal SIGABRT, Aborted.
#0 0x00007f75ebf0c70f in ?? ()
[Current thread is 1 (LWP 107542)]
(gdb)
I want to know the reason and fix it.

Related

Using Orbbec Embedded S camera from ARM with OpenNI

I have an ARM SoC that I've connected an Embedded S camera to. I can see the camera is connected:
$ lsusb
Bus 001 Device 006: ID 2bc5:050b
Bus 001 Device 007: ID 2bc5:060b
I downloaded OpenNI_2.3.0.63.zip from https://orbbec3d.com/develop/ then copied the OpenNI-Linux-Arm64-2.3.0.63 directory to my device and ran install.sh. Now when I plug in the camera I get:
[ 5887.390778] hub 1-1:1.0: 2 ports detected
[ 5887.879656] usb 1-1.1: New USB device found, idVendor=2bc5, idProduct=050b
[ 5887.886538] usb 1-1.1: New USB device strings: Mfr=2, Product=1, SerialNumber=3
[ 5887.894193] usb 1-1.1: Product: USB 2.0 Camera
[ 5887.898757] usb 1-1.1: Manufacturer: Sonix Technology Co., Ltd.
[ 5887.904814] usb 1-1.1: SerialNumber: SN0001
[ 5888.232284] usb 1-1.2: New USB device found, idVendor=2bc5, idProduct=060b
[ 5888.239161] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 5888.246856] usb 1-1.2: Product: ORBBEC Depth Sensor
[ 5888.251853] usb 1-1.2: Manufacturer: Orbbec(R)
I cross-compiled a simple app:
int main(int argc, char** argv)
{
const char* deviceURI = openni::ANY_DEVICE;
Status result = STATUS_OK;
result = OpenNI::initialize();
cout << "OpenNI::initialize() = " << result << endl;
openni::Array<openni::DeviceInfo> deviceList;
openni::OpenNI::enumerateDevices(&deviceList);
cout << "OpenNI::enumerateDevices() = " << deviceList.getSize() << endl;
for (int i = 0; i < deviceList.getSize(); ++i)
{
cout << "Device " << deviceList[i].getUri() << " already connected" << endl;
}
When I ran it first I got:
error while loading shared libraries: libOpenNI2.so: cannot open shared object file: No such file or director
So I copied libOpenNI2.so to /usr/lib. Now when I run it I get:
OpenNI::initialize() = 1
OpenNI::enumerateDevices() = 0
Why isn't the camera being seen? Is there something else I have to do to get it to work?
I turned on logging using:
OpenNI::setLogMinSeverity(0);
OpenNI::setLogConsoleOutput(true);
and saw:
3774 INFO Log XnLog.cpp 349 New log started on 2019-11-25 09:57:11
3864 INFO Log XnLog.cpp 322 --- Filter Info --- Minimum Severity: VERBOSE
4044 VERBOSE OniContext OniContext.cpp 165 OpenNI 2.3.0 (Build 63)-Linux-Arm (May 13 2019 17:45:57)
4089 VERBOSE OniContext OniContext.cpp 259 Using '/usr/lib/OpenNI2/Drivers' as driver path
4112 VERBOSE OniContext OniContext.cpp 267 Looking for drivers at '/usr/lib/OpenNI2/Drivers'
4167 ERROR OniContext OniContext.cpp 279 Found no drivers matching '/usr/lib/OpenNI2/Drivers/lib*.so'
So I copied the files from OpenNI-Linux-Arm64-2.3.0.63/Redist/OpenNI2/Drivers/ to /usr/lib/OpenNI2/Drivers/. The Readme also says:
*for using with Astra Embedded S/Stereo S, please change the resolution in 'orbbec.ini' to 'Resolution=17' for Depth and IR streams
So I edited this in /usr/lib/OpenNI2/Drivers/orbbec.ini. Now I get:
3924 INFO Log XnLog.cpp 349 New log started on 2019-11-25 10:23:55
4010 INFO Log XnLog.cpp 322 --- Filter Info --- Minimum Severity: VERBOSE
4185 VERBOSE OniContext OniContext.cpp 165 OpenNI 2.3.0 (Build 63)-Linux-Arm (May 13 2019 17:45:57)
4230 VERBOSE OniContext OniContext.cpp 259 Using '/usr/lib/OpenNI2/Drivers' as driver path
4254 VERBOSE OniContext OniContext.cpp 267 Looking for drivers at '/usr/lib/OpenNI2/Drivers'
4547 VERBOSE OniContext OniContext.cpp 309 Loading device driver 'libOniFile.so'...
4588 WARNING xnOS XnLinuxSharedLibs.cpp 107 loading lib from: /usr/lib/OpenNI2/Drivers/libOniFile.so
6199 VERBOSE OniContext OniContext.cpp 309 Loading device driver 'libPSLink.so'...
6240 WARNING xnOS XnLinuxSharedLibs.cpp 107 loading lib from: /usr/lib/OpenNI2/Drivers/libPSLink.so
11412 WARNING DriverHandler OniDriverHandler.cpp 85 LibraryHandler: Couldn't find function oniDriverStreamConvertC2DCoordinates in libPSLink.so. Stopping
11539 WARNING OniContext OniContext.cpp 313 Couldn't use file 'libPSLink.so' as a device driver
11626 VERBOSE OniContext OniContext.cpp 309 Loading device driver 'liborbbec.so'...
11675 WARNING xnOS XnLinuxSharedLibs.cpp 107 loading lib from: /usr/lib/OpenNI2/Drivers/liborbbec.so
15571 INFO Log XnLog.cpp 349 New log started on 2019-11-25 10:23:55
15615 INFO Log XnLog.cpp 322 --- Filter Info --- Minimum Severity: VERBOSE
15645 VERBOSE xnUSB XnLinuxUSB.cpp 383 Initializing USB...
19162 INFO xnUSB XnLinuxUSB.cpp 412 USB is initialized.
OpenNI::initialize() = 0
OpenNI::enumerateDevices() = 0
which is better but still not successful. I then realised that I hadn't reconnected the camera after copying the driver files so I did that and it worked.

New PocketSphinx user: "Segmentation fault: 11" error upon following official getting started guide

I am a new PocketSphinx user. I just followed the official getting started guide
However, I begin having difficulties when I get to this step:
"To test the installation, run pocketsphinx_continuous -inmic yes and check that it recognizes words you speak into your microphone."
I've attached my terminal output that I receive when I type this command, which ultimately results in 'Segmentation fault: 11'
Any help would be greatly appreciated.
Thanks,
Nakul
nakul : ~ 101 $ pocketsphinx_continuous -inmic yes
INFO: pocketsphinx.c(152): Parsed model-specific feature parameters from /usr/local/share/pocketsphinx/model/en-us/en-us/feat.params
Current configuration:
[NAME] [DEFLT] [VALUE]
-agc none none
-agcthresh 2.0 2.000000e+00
-allphone
-allphone_ci no no
-alpha 0.97 9.700000e-01
-ascale 20.0 2.000000e+01
-aw 1 1
-backtrace no no
-beam 1e-48 1.000000e-48
-bestpath yes yes
-bestpathlw 9.5 9.500000e+00
-ceplen 13 13
-cmn live batch
-cmninit 40,3,-1 41.00,-5.29,-0.12,5.09,2.48,-4.07,-1.37,-1.78,-5.08,-2.05,-6.45,-1.42,1.17
-compallsen no no
-debug 0
-dict /usr/local/share/pocketsphinx/model/en-us/cmudict-en-us.dict
-dictcase no no
-dither no no
-doublebw no no
-ds 1 1
-fdict
-feat 1s_c_d_dd 1s_c_d_dd
-featparams
-fillprob 1e-8 1.000000e-08
-frate 100 100
-fsg
-fsgusealtpron yes yes
-fsgusefiller yes yes
-fwdflat yes yes
-fwdflatbeam 1e-64 1.000000e-64
-fwdflatefwid 4 4
-fwdflatlw 8.5 8.500000e+00
-fwdflatsfwin 25 25
-fwdflatwbeam 7e-29 7.000000e-29
-fwdtree yes yes
-hmm /usr/local/share/pocketsphinx/model/en-us/en-us
-input_endian little little
-jsgf
-keyphrase
-kws
-kws_delay 10 10
-kws_plp 1e-1 1.000000e-01
-kws_threshold 1 1.000000e+00
-latsize 5000 5000
-lda
-ldadim 0 0
-lifter 0 22
-lm /usr/local/share/pocketsphinx/model/en-us/en-us.lm.bin
-lmctl
-lmname
-logbase 1.0001 1.000100e+00
-logfn
-logspec no no
-lowerf 133.33334 1.300000e+02
-lpbeam 1e-40 1.000000e-40
-lponlybeam 7e-29 7.000000e-29
-lw 6.5 6.500000e+00
-maxhmmpf 30000 30000
-maxwpf -1 -1
-mdef
-mean
-mfclogdir
-min_endfr 0 0
-mixw
-mixwfloor 0.0000001 1.000000e-07
-mllr
-mmap yes yes
-ncep 13 13
-nfft 512 512
-nfilt 40 25
-nwpen 1.0 1.000000e+00
-pbeam 1e-48 1.000000e-48
-pip 1.0 1.000000e+00
-pl_beam 1e-10 1.000000e-10
-pl_pbeam 1e-10 1.000000e-10
-pl_pip 1.0 1.000000e+00
-pl_weight 3.0 3.000000e+00
-pl_window 5 5
-rawlogdir
-remove_dc no no
-remove_noise yes yes
-remove_silence yes yes
-round_filters yes yes
-samprate 16000 1.600000e+04
-seed -1 -1
-sendump
-senlogdir
-senmgau
-silprob 0.005 5.000000e-03
-smoothspec no no
-svspec 0-12/13-25/26-38
-tmat
-tmatfloor 0.0001 1.000000e-04
-topn 4 4
-topn_beam 0 0
-toprule
-transform legacy dct
-unit_area yes yes
-upperf 6855.4976 6.800000e+03
-uw 1.0 1.000000e+00
-vad_postspeech 50 50
-vad_prespeech 20 20
-vad_startspeech 10 10
-vad_threshold 2.0 2.000000e+00
-var
-varfloor 0.0001 1.000000e-04
-varnorm no no
-verbose no no
-warp_params
-warp_type inverse_linear inverse_linear
-wbeam 7e-29 7.000000e-29
-wip 0.65 6.500000e-01
-wlen 0.025625 2.562500e-02
INFO: feat.c(715): Initializing feature stream to type: '1s_c_d_dd', ceplen=13, CMN='batch', VARNORM='no', AGC='none'
INFO: acmod.c(162): Using subvector specification 0-12/13-25/26-38
INFO: mdef.c(518): Reading model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: mdef.c(531): Found byte-order mark BMDF, assuming this is a binary mdef file
INFO: bin_mdef.c(336): Reading binary model definition: /usr/local/share/pocketsphinx/model/en-us/en-us/mdef
INFO: bin_mdef.c(516): 42 CI-phone, 137053 CD-phone, 3 emitstate/phone, 126 CI-sen, 5126 Sen, 29324 Sen-Seq
INFO: tmat.c(149): Reading HMM transition probability matrices: /usr/local/share/pocketsphinx/model/en-us/en-us/transition_matrices
INFO: acmod.c(113): Attempting to use PTM computation module
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/means
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(127): Reading mixture gaussian parameter: /usr/local/share/pocketsphinx/model/en-us/en-us/variances
INFO: ms_gauden.c(242): 42 codebook, 3 feature, size:
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(244): 128x13
INFO: ms_gauden.c(304): 222 variance values floored
INFO: ptm_mgau.c(476): Loading senones from dump file /usr/local/share/pocketsphinx/model/en-us/en-us/sendump
INFO: ptm_mgau.c(500): BEGIN FILE FORMAT DESCRIPTION
INFO: ptm_mgau.c(563): Rows: 128, Columns: 5126
INFO: ptm_mgau.c(595): Using memory-mapped I/O for senones
INFO: ptm_mgau.c(838): Maximum top-N: 4
INFO: phone_loop_search.c(114): State beam -225 Phone exit beam -225 Insertion penalty 0
INFO: dict.c(320): Allocating 138824 * 32 bytes (4338 KiB) for word entries
INFO: dict.c(333): Reading main dictionary: /usr/local/share/pocketsphinx/model/en-us/cmudict-en-us.dict
INFO: dict.c(213): Dictionary size 134723, allocated 1016 KiB for strings, 1679 KiB for phones
INFO: dict.c(336): 134723 words read
INFO: dict.c(358): Reading filler dictionary: /usr/local/share/pocketsphinx/model/en-us/en-us/noisedict
INFO: dict.c(213): Dictionary size 134728, allocated 0 KiB for strings, 0 KiB for phones
INFO: dict.c(361): 5 words read
INFO: dict2pid.c(396): Building PID tables for dictionary
INFO: dict2pid.c(406): Allocating 42^3 * 2 bytes (144 KiB) for word-initial triphones
INFO: dict2pid.c(132): Allocated 42672 bytes (41 KiB) for word-final triphones
INFO: dict2pid.c(196): Allocated 42672 bytes (41 KiB) for single-phone word triphones
INFO: ngram_model_trie.c(354): Trying to read LM in trie binary format
INFO: ngram_search_fwdtree.c(74): Initializing search tree
INFO: ngram_search_fwdtree.c(101): 791 unique initial diphones
INFO: ngram_search_fwdtree.c(186): Creating search channels
INFO: ngram_search_fwdtree.c(323): Max nonroot chan increased to 152609
INFO: ngram_search_fwdtree.c(333): Created 723 root, 152481 non-root channels, 53 single-phone words
INFO: ngram_search_fwdflat.c(157): fwdflat: min_ef_width = 4, max_sf_win = 25
INFO: continuous.c(307): pocketsphinx_continuous COMPILED ON: Sep 6 2018, AT: 19:28:29
INFO: continuous.c(252): Ready....
Segmentation fault: 11
nakul : ~ 102 $ defaults write com.apple.finder AppleShowAllFiles YES.

PC=0x00000000, corrupt stack in gdb, but FreeRTOS thread is still running fine on STM32

I'm developing a multi threaded application with FreeRTOS on a STM32.
When I try to debug it with OpenOCD and gdb, I can do so with all threads but my main loop.
>>> info threads
Id Target Id Frame
6 Thread 536892936 (cli) vTaskSuspend (xTaskToSuspend=<optimized out>) at /home/user1273684/dev/firmware/module/FreeRTOS/Source/tasks.c:1620
5 Thread 536888728 (wifi_loop) vTaskSuspend (xTaskToSuspend=<optimized out>) at /home/user1273684/dev/firmware/module/FreeRTOS/Source/tasks.c:1620
4 Thread 536884824 (Tmr Svc) xTaskResumeAll () at /home/user1273684/dev/firmware/module/FreeRTOS/Source/tasks.c:2126
3 Thread 536905240 (main_loop) 0x00000000 in ?? ()
2 Thread 536879832 (wifi_watchdog) xTaskResumeAll () at /home/user1273684/dev/firmware/module/FreeRTOS/Source/tasks.c:2126
* 1 Thread 536882960 (IDLE : : Running) prvIdleTask (pvParameters=<optimized out>) at /home/user1273684/dev/firmware/module/FreeRTOS/Source/tasks.c:3145
>>> thread 3
[Switching to thread 3 (Thread 536905240)]
#0 0x00000000 in ?? ()
>>> bt
#0 0x00000000 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
I tried increasing the stack size (vTaskList() says there is plenty of space left, configCHECK_FOR_STACK_OVERFLOW is set to 2 and vApplicationStackOverflowHook() is never triggered) but without any change.
2017-06-20 10:34:34,217 - INFO # cli R 1 922 5
2017-06-20 10:34:34,217 - INFO # IDLE R 0 235 2
2017-06-20 10:34:34,218 - INFO # wifi_watchdog B 1 231 8
2017-06-20 10:34:34,218 - INFO # main_loop B 2 2879 6
2017-06-20 10:34:34,218 - INFO # Tmr Svc S 4 320 3
2017-06-20 10:34:34,218 - INFO # wifi_loop S 3 627 4
What is going on here?

A file is populated with data on Windows but not on Linux

I have made a small service application that writes it's output to several files. The service has to run on both Windows and Linux. Everything is hunky-dory on Windows, but on Linux the files get created, but are all empty.
The following small program shows exactly the same behaviour:
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
f, err := os.OpenFile("test.txt", os.O_APPEND|os.O_CREATE, 0777)
if err != nil {
fmt.Println(err.Error())
return
}
defer f.Close()
w := bufio.NewWriter(f)
_, err = w.Write([]byte("hello"))
if err != nil {
fmt.Println(err.Error())
}
w.Flush()
}
When run, the above code does not seem to output any errors on Linux. As can be seen by the file size of test.txt, it does write content to the file on Windows, while it does not do so on Linux.
Directory on Windows:
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 14.04.2016 10:37 345 main.go
-a---- 14.04.2016 10:45 10 test.txt
-a---- 14.04.2016 10:37 2635264 writetest.exe
Directory on Linux:
drwxrwxr-x 2 localuser localuser 4096 Apr 14 10:55 ./
drwxr-xr-x 8 localuser localuser 4096 Apr 14 10:27 ../
-rw-rw-r-- 1 localuser localuser 345 Apr 14 10:37 main.go
-rwxrwxr-x 1 localuser localuser 0 Apr 14 10:55 test.txt*
What am I missing here?
Change your flag, from os.O_APPEND|os.O_CREATE to os.O_RDWR|os.O_APPEND|os.O_CREATE will work on Linux and Mac OSX.
The key idea is event you want to append the file, you still need to open with Write flag in Linux and Mac OSX.

Segmentation fault as soon the binary launch

How to debug a segmentation fault caused by launching the binary on Linux?
No source code is available for the binary.
How to know the system calls made by the binary which caused the seg fault. Is there any debugging utility that might help?
In addition to what's been suggested you can also do the following:
Run ulimit -c unlimited to enable core dumping, then run your app.
At the point of segfaulting it should do a core dump.
Then you can run gdb your_app core and inside gdb run backtrace. Maybe it's been compiled with debugging symbols so you actually get quite a bit of information out.
Does strace your-program help you? It will print a list of all system calls called by your program.
Sample Output
% strace true
.
2 2 [main] true (2064) **********************************************
83 85 [main] true (2064) Program name: C:\cygwin\bin\true.exe (windows pid 2064)
44 129 [main] true (2064) OS version: Windows NT-6.1
36 165 [main] true (2064) **********************************************
145 310 [main] true (2064) sigprocmask: 0 = sigprocmask (0, 0x6123D468, 0x610FBA10)
183 493 [main] true 2064 open_shared: name shared.5, n 5, shared 0x60FF0000 (wanted 0x60FF0000), h 0x70, *m 6
27 520 [main] true 2064 heap_init: heap base 0x20000000, heap top 0x20000000, heap size 0x18000000 (402653184)
30 550 [main] true 2064 open_shared: name foo, n 1, shared 0x60FE0000 (wanted 0x60FE0000), h 0x68, *m 6
18 568 [main] true 2064 user_info::create: opening user shared for 'foo' at 0x60FE0000
17 585 [main] true 2064 user_info::create: user shared version 6467403B
36 621 [main] true 2064 fhandler_pipe::create: name \\.\dir\cygwin-c5e39b7a9d22bafb-2064-sigwait, size 164, mode PIPE_TYPE_MESSAGE
51 672 [main] true 2064 fhandler_pipe::create: pipe read handle 0x84
16 688 [main] true 2064 fhandler_pipe::create: CreateFile: name \\.\dir\cygwin-c5e39b7a9d22bafb-2064-sigwait
35 723 [main] true 2064 fhandler_pipe::create: pipe write handle 0x88
23 746 [main] true 2064 dll_crt0_0: finished dll_crt0_0 initialization

Resources