bladeRF icon indicating copy to clipboard operation
bladeRF copied to clipboard

libbladeRF_test_ctrl -t threads gets somewhat deadlocked on bladerf2

Open rtucker opened this issue 6 years ago • 0 comments

It appears that bladerf_set_bandwidth() sits and does nothing for a very long time, and also the test fails to enable the RX/TX sections.

I'm suspecting there's bad interactions involving multiple simultaneous state changes on the RFIC.

[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:1296] bladerf2_initialize: complete
test_threads: Running full-duplex stream with multiple control threads...
  Printing output from test_frequency for status...
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 0
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/usb.c:106] Changing to USB alt setting 1
  Started test_gain thread...
  Started test_bandwidth thread...
  Started test_correction thread...
  Started test_frequency thread...
test_frequency: Testing RX...
test_frequency: RX range: 70000000 to 6000000000
test_frequency: Performing RX frequency sweep...
[VERBOSE @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:392] nios_config_read: Read 0x00000000
[ERROR @ host/libraries/libbladeRF/src/backend/usb/nios_access.c:81] Failed to receive NIOS II response: Operation timed out
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:1881] bladerf2_enable_module: TX1 ch_en=0 ch_pend=0 dir_en=0 dir_pend=0 be_clr=0 reg=0xf8000001->0xf8000001 nsec=1542650734869673314 (delta: 1542650734869673314)
[DEBUG @ host/libraries/libbladeRF/src/board/bladerf2/bladerf2.c:1892] bladerf2_enable_module: reg value unchanged? (f8000001)
[Thread 1]
#0  0x00007fb8025d0d2d in __GI___pthread_timedjoin_ex (threadid=140428254467840, thread_return=0x0, abstime=0x0, block=<optimized out>) at pthread_join_common.c:89
#1  0x0000563f0a7a97d3 in test_threads ()
#2  0x0000563f0a7a536d in main ()

[Switching to thread 2 (Thread 0x7fb801b98700 (LWP 16325))]
#0  0x00007fb8022ebbf9 in __GI___poll (fds=0x7fb801b97ec0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fb801fce6ff in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#2  0x00007fb8025cf6db in start_thread (arg=0x7fb801b98700) at pthread_create.c:463
#3  0x00007fb8022f888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

[Switching to thread 3 (Thread 0x7fb801397700 (LWP 16328))]
#0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007fb8025d2023 in __GI___pthread_mutex_lock (mutex=0x563f0aa46390) at ../nptl/pthread_mutex_lock.c:78
#2  0x00007fb802806144 in bladerf_sync_config () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#3  0x0000563f0a7a8ffb in stream_task ()
#4  0x00007fb8025cf6db in start_thread (arg=0x7fb801397700) at pthread_create.c:463
#5  0x00007fb8022f888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

[Switching to thread 4 (Thread 0x7fb800395700 (LWP 16330))]
#0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007fb8025d2023 in __GI___pthread_mutex_lock (mutex=0x563f0aa46390) at ../nptl/pthread_mutex_lock.c:78
#2  0x00007fb8028058ba in bladerf_set_gain_stage () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#3  0x0000563f0a7a73a0 in test_gain ()
#4  0x0000563f0a7a8f6f in run_test_fn ()
#5  0x00007fb8025cf6db in start_thread (arg=0x7fb800395700) at pthread_create.c:463
#6  0x00007fb8022f888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

[Switching to thread 5 (Thread 0x7fb7ffb94700 (LWP 16331))]
#0  0x00007fb8022ebbf9 in __GI___poll (fds=0x563f0aa601e0, nfds=3, timeout=60000) at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007fb801fc81cd in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#2  0x00007fb801fc9130 in libusb_handle_events_timeout_completed () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#3  0x00007fb801fc9280 in libusb_handle_events_completed () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#4  0x00007fb801fc9b99 in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#5  0x00007fb801fc9c9d in ?? () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#6  0x00007fb801fca03f in libusb_bulk_transfer () from /lib/x86_64-linux-gnu/libusb-1.0.so.0
#7  0x00007fb8028285dc in lusb_bulk_transfer () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#8  0x00007fb802820cfd in nios_ad9361_spi_read () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#9  0x00007fb802835e8b in spi_read () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#10 0x00007fb80282a423 in ad9361_spi_readm () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#11 0x00007fb80282a479 in __ad9361_spi_readf () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#12 0x00007fb80282a4d6 in ad9361_check_cal_done.isra () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#13 0x00007fb80282c158 in __ad9361_tx_quad_calib () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#14 0x00007fb80282c8e1 in ad9361_tx_quad_calib () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#15 0x00007fb80282f03a in ad9361_update_rf_bandwidth () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#16 0x00007fb802819db8 in bladerf2_set_bandwidth () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#17 0x00007fb802805ac2 in bladerf_set_bandwidth () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#18 0x0000563f0a7a5f7d in test_bandwidth ()
#19 0x0000563f0a7a8f6f in run_test_fn ()
#20 0x00007fb8025cf6db in start_thread (arg=0x7fb7ffb94700) at pthread_create.c:463
#21 0x00007fb8022f888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

[Switching to thread 6 (Thread 0x7fb7feb92700 (LWP 16333))]
#0  __lll_lock_wait () at ../sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:135
#1  0x00007fb8025d2023 in __GI___pthread_mutex_lock (mutex=0x563f0aa46390) at ../nptl/pthread_mutex_lock.c:78
#2  0x00007fb802805b41 in bladerf_set_frequency () from /home/rtucker/dev/bladeRF/build/host/output/libbladeRF.so.2
#3  0x0000563f0a7a6b21 in test_frequency ()
#4  0x0000563f0a7a8f6f in run_test_fn ()
#5  0x00007fb8025cf6db in start_thread (arg=0x7fb7feb92700) at pthread_create.c:463
#6  0x00007fb8022f888f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

rtucker avatar Nov 19 '18 18:11 rtucker