Infrequent segfault in osctoshmdata
How to reproduce
- On switcher develop circa
3fdd0e16c8c8f6fbc21219add9c3ffd3278e61e1
- Send osc to port 10000 (or whatever port). I was using this xonsh script:
while True:
oscsend localhost 10000 /sample/address iTfs 1 3.14 hello
from time import sleep; sleep(0.01)
- Start an osc source with the right port.
Backtrace : ```Core was generated by `/usr/bin/python3 /home/sat/code/switcher/wrappers/switcherio/server.py'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f744499d82c in shmdata::Writer::alloc_size (this=0x60) at /home/sat/code/shmdata/shmdata/writer.cpp:153 153 size_t Writer::alloc_size() const { return alloc_size_; } [Current thread is 1 (Thread 0x7f740d7fa700 (LWP 1760590))] (gdb) bt #0 0x00007f744499d82c in shmdata::Writer::alloc_size (this=0x60) at /home/sat/code/shmdata/shmdata/writer.cpp:153 #1 (closed) 0x00007f74413d30ea in switcher::shmdata::Writer::writer<unsigned long (shmdata::Writer::*)() const, &(shmdata::Writer::alloc_size() const), , 0>() (this=0x0) at /home/sat/code/switcher/switcher/shmdata/writer.hpp:47 #2 0x00007f74413d0904 in switcher::quiddities::OscToShmdata::osc_handler (path=0x7f73f4000d00 "/sample/address", m=0x7f73f4000b90, user_data=0x319a860) at /home/sat/code/switcher/plugins/osc/osc-to-shmdata.cpp:105 #3 0x00007f74413b6619 in ?? () from /lib/x86_64-linux-gnu/liblo.so.7 #4 0x00007f74413b88f7 in ?? () from /lib/x86_64-linux-gnu/liblo.so.7 #5 (closed) 0x00007f74413b8c6e in lo_server_recv () from /lib/x86_64-linux-gnu/liblo.so.7 #6 (closed) 0x00007f74413b8eed in lo_servers_recv_noblock () from /lib/x86_64-linux-gnu/liblo.so.7 #7 (closed) 0x00007f74413b8f53 in lo_server_recv_noblock () from /lib/x86_64-linux-gnu/liblo.so.7 #8 (closed) 0x00007f74413bab6e in ?? () from /lib/x86_64-linux-gnu/liblo.so.7 #9 (closed) 0x00007f7447f49609 in start_thread (arg=) at pthread_create.c:477 #10 (closed) 0x00007f7448083353 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 (gdb)
Remarks by JM :
this=0x60 pointeur null, likely the Writer on est sûrs que le callback liblo se fait bien cancel avant la suppression du writer?