OpenBSD: crashing

Alan Corey alancorey at yahoo.com
Wed Apr 17 04:14:48 UTC 2013


This is with a version of rtl-sdr I got by git last night and OpenBSD 5.2 (current release).  5.2 has some pthreads fixing so I waited until I bought another computer and loaded it.  Are the crashes related to threads?  I don't know, but possibly.  It didn't work with OpenBSD 5.0 either.

rtl_fm crashes and uses threads                      
rtl_adsb crashes and uses threads                    
rtl_tcp doesn't crash, uses threads, actually stops on ctrl-c
rtl_test doesn't crash, doesn't use threads, won't stop
rtl_eeprom doesn't crash, doesn't use threads, ends normally


I'm not real practiced using gdb but I tried looking at a couple of core files, here's a run of  rtl_fm:

rtl_fm -f 162550000 -N - | play -t raw -r 24k -e signed-integer -b 16 -c 1
-V1 -

-: (raw)

  Encoding: Signed PCM
  Channels: 1 @ 16-bit
Samplerate: 24000Hz
Replaygain: off
  Duration: unknown

In:0.00% 00:00:00.00 [00:00:00.00] Out:0     [      |      ]        Clip:0
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000013

Using device 0: ezcap USB 2.0 DVB-T/DAB/FM dongle
Found Rafael Micro R820T tuner
Oversampling input by: 42x.
Oversampling output by: 1x.
Buffer size: 8.13ms
Tuned to 162802000 Hz.
Sampling at 1008000 Hz.
Output at 24000 Hz.
Exact sample rate is: 1008000.009613 Hz
Tuner gain set to automatic.
In:0.00% 00:00:00.00 [00:00:00.00] Out:0     [      |      ]        Clip:0
Done.
Abort (core dumped)


d530# gdb -c rtl_fm.core /usr/local/bin/rtl_fm
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-unknown-openbsd5.2"...
Core was generated by `rtl_fm'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/lib/libpthread.so.16.0...done.
Loaded symbols for /usr/lib/libpthread.so.16.0
Reading symbols from /usr/lib/libm.so.7.0...done.
Loaded symbols for /usr/lib/libm.so.7.0
Reading symbols from /usr/local/lib/librtlsdr.so.0.0...done.
Loaded symbols for /usr/local/lib/librtlsdr.so.0.0
Reading symbols from /usr/local/lib/libusb-1.0.so.1.0...done.
Loaded symbols for /usr/local/lib/libusb-1.0.so.1.0
Symbols already loaded for /usr/lib/libpthread.so.16.0
Reading symbols from /usr/lib/libc.so.65.0...done.
Loaded symbols for /usr/lib/libc.so.65.0
Loaded symbols for /usr/libexec/ld.so
#0  0x0abbd98d in kill () from /usr/lib/libc.so.65.0
(gdb) bt
#0  0x0abbd98d in kill () from /usr/lib/libc.so.65.0
#1  0x0ac29545 in abort () at /usr/src/lib/libc/stdlib/abort.c:68
#2  0x005e9298 in pthread_mutex_unlock (mutexp=0x3c003d8c)
    at /usr/src/lib/librthread/rthread_sync.c:218
#3  0x1c00266e in full_demod (fm=0xcfa2de5c)
    at /usr/src/misc/osmocom/2013-04-15/rtl-sdr/src/rtl_fm.c:583
#4  0x1c0028ff in demod_thread_fn (arg=0xcfa2de5c)
    at /usr/src/misc/osmocom/2013-04-15/rtl-sdr/src/rtl_fm.c:641
#5  0x005ebc2e in _rthread_start (v=0x84da4c00)
    at /usr/src/lib/librthread/rthread.c:111
#6  0x0aba62e9 in __tfork_thread () from /usr/lib/libc.so.65.0


The backtrace (bt) shows that it dies trying to do a mutex_unlock (I think).  rtl_tcp also does a mutex_unlock and it doesn't crash.  I'm probably reading it wrong for all I know.  I don't know what's causing the signal 6 either.

I'd also like to get the -lrt of of the cmake files.  OpenBSD doesn't use or have lrt, it works without.  I can edit it out and compile, but every time I run cmake again, I have to edit the files again.

  Alan

 
-----
Radio Astronomy - the ultimate DX
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/osmocom-sdr/attachments/20130416/ad36dbd9/attachment.html>


More information about the osmocom-sdr mailing list