Bug 1050 - VXI interface not closing if device is offline
Summary: VXI interface not closing if device is offline
Status: CONFIRMED
Alias: None
Product: libsigrok
Classification: Unclassified
Component: Common: SCPI handling code (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-14 21:33 CEST by Soeren Apel
Modified: 2017-10-14 21:33 CEST (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Soeren Apel 2017-10-14 21:33:06 CEST
How to reproduce:
1) Run PV
2) Connect to a VXI device
3) Turn off/disconnect the VXI device
4) Quit PV

Expected behavior:
PV terminates

Observed behavior:
The Qt GUI closes but PV itself does not terminate. Hitting CTRL-C shows where it's stuck:

Thread 1 (Thread 0xb4457740 (LWP 15682)):
#0  0xb7fdd9f2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1  0xb69b57eb in poll () from /lib/libc.so.6
#2  0xb69e81bf in readtcp () from /lib/libc.so.6
#3  0xb69e2221 in fill_input_buf () from /lib/libc.so.6
#4  0xb69e23a5 in get_input_bytes () from /lib/libc.so.6
#5  0xb69e2448 in set_input_fragment () from /lib/libc.so.6
#6  0xb69e249f in xdrrec_getbytes () from /lib/libc.so.6
#7  0xb69e2575 in xdrrec_getlong () from /lib/libc.so.6
#8  0xb69ec338 in xdr_u_long () from /lib/libc.so.6
#9  0xb69e1128 in xdr_replymsg () from /lib/libc.so.6
#10 0xb69e7f88 in clnttcp_call () from /lib/libc.so.6
#11 0xb7db0e59 in destroy_link_1 (argp=0x89d8afc, clnt=0x8a33530) at src/scpi/vxi_clnt.c:214
#12 0xb7db052b in scpi_vxi_close (scpi=0x8a19410) at src/scpi/scpi_vxi.c:202
#13 0xb7dae88b in sr_scpi_close (scpi=0x8a19410) at src/scpi/scpi.c:376
#14 0xb7d982d0 in sr_dev_close (sdi=0x8a19688) at src/device.c:628
#15 0xb7e8e4db in sigrok::Device::close (this=0x8a1e660) at bindings/cxx/classes.cpp:639
#16 0x082cc808 in pv::devices::HardwareDevice::close (this=0x89581c8) at /home/abraxa/repositories/sigrok/pulseview/pv/devices/hardwaredevice.cpp:122