strix-technica / ADSB-tools

Tools for ADS-B analysis, especially on the Raspberry Pi
GNU General Public License v2.0
9 stars 4 forks source link

adsb-msg-dist random crashes #3

Open bive242 opened 6 years ago

bive242 commented 6 years ago

Really helpful plugin, but it randomly crashes on my RPI. The logfile contains the following lines: Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "/usr/local/share/munin/plugins/adsb_msg_dist", line 163, in input_thread_entrypoint msgs.put( Message( d ) ) File "/usr/local/share/munin/plugins/adsb_msg_dist", line 66, in __init__ self.ts = datetime.datetime.strptime( d['g_date'] + d['g_time'] + '000', KeyError: 'g_date' This happens a couple of times per day (1-3 times).

strix-technica commented 5 years ago

Wow, this got overlooked for a long time.

I'd need to see a sample of some of the input data to diagnose what's going on, but it looks like it's not getting the expected data from the SBS emulation port from dump1090. Possibly a bug in dump1090, a misconfiguration or an unexpected message generated by a variant of dump1090 I haven't tested.

All I can say is that my instance doesn't do it. Without instrumenting your particular instance, I'm afraid I can't be of much more help. If you want to hack the code a bit to dump messages and send them to me, I can try and figure out why this is happening.