EarthScope / slinktool

Other
18 stars 15 forks source link

Segmentation fault with branch 4.4 #12

Closed jschaeff closed 1 year ago

jschaeff commented 1 year ago

Trying the new release 4.4 on Debian 11.

I don't go very far:

(gdb) r
Starting program: /home/schaeffj/sources/slinktool-4.4/slinktool -vvv -l /home/schaeffj/work/slinktool_PF -SDS /home/schaeffj/work rtserve.resif.fr
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
slinktool version: 4.4
Reading stream list from /home/schaeffj/work/slinktool_PF
Read 2 streams from /home/schaeffj/work/slinktool_PF
verbose:    3
pingonly:   0
'dumpfile' not defined
'archformat' not defined
sdsdir: /home/schaeffj/work
'buddir' not defined
'statefile' not defined
sladdr: rtserve.resif.fr
'slconn->begin_time' not defined
'slconn->end_time' not defined
slconn->dialup: 0
slconn->multistation:   1
'slconn->info' not defined
keepalive:  0
nettimeout: 600
netdelay:   30
slconn->protocol_ver:   0.000000
slconn->link:   -1
'streams' array:
Sta - net: PF
Sta - sta: MAID
Sta - selectors: HHZ
Sta - seqnum: -1
'timestamp' not defined
Sta - net: PF
Sta - sta: MAT
Sta - selectors: HHE
Sta - seqnum: -1
'timestamp' not defined
[rtserve.resif.fr] using system socket timeouts
[rtserve.resif.fr] network socket opened
[rtserve.resif.fr] sending: HELLO
[rtserve.resif.fr] connected to: SeedLink v3.1 (2020.075 RingServer) 
[rtserve.resif.fr] capabilities: SLPROTO:3.1 CAP EXTREPLY NSWILDCARD BATCH WS:13
[rtserve.resif.fr] organization: RESIF Ring Server | https://seismology.resif.fr | sismo-help@resif.fr
[rtserve.resif.fr] sending: CAPABILITIES SLPROTO:3.1 CAP EXTREPLY NSWILDCARD BATCH
[rtserve.resif.fr] capabilities OK 
[PF_MAID] sending: STATION MAID PF
[PF_MAID] station is OK 
[PF_MAID] sending: SELECT HHZ
[PF_MAID] selector HHZ is OK {Station specific}
[PF_MAID] 1 selector(s) accepted
[PF_MAID] requesting next available data
[PF_MAID] DATA/FETCH/TIME command is OK 
[PF_MAT] sending: STATION MAT PF
[PF_MAT] station is OK 
[PF_MAT] sending: SELECT HHE
[PF_MAT] selector HHE is OK {Station specific}
[PF_MAT] 1 selector(s) accepted
[PF_MAT] requesting next available data
[PF_MAT] DATA/FETCH/TIME command is OK 
[rtserve.resif.fr] 2 station(s) accepted
[rtserve.resif.fr] sending: END
2023.051.10:51:18.0, seq 10190138, Received Data blockette
error: record header/quality indicator unrecognized: 
Program received signal SIGSEGV, Segmentation fault.
0x0000555555556b21 in ds_streamproc ()
(gdb) bt
#0  0x0000555555556b21 in ds_streamproc ()
#1  0x0000555555557bf2 in sds_streamproc ()
#2  0x00005555555591e9 in packet_handler ()
#3  0x0000555555558b62 in main ()

The content of the selection file is:

PF MAID HHZ
PF MAT HHE

I also tried other networks and I get the same error.

No problem with slinktool 4.3

phil-rt commented 1 year ago

I see similar problems, depending on the command line used and the first packet received.

The problem seems to be with the libslink library change. If I recompile the 4.4.x code but with the libslink library from v4.3, things appear to work properly. (More testing needed to fully verify.)

chad-earthscope commented 1 year ago

Thanks @jschaeff and @phil-rt. That was a weird one. Fixed in the v4.5.0 release: https://github.com/EarthScope/slinktool/releases/tag/v4.5.0