SIGSEGV in libps3000a.so.1

Post your Linux discussions here
Post Reply
wo_gue@hotmail.com
Newbie
Posts: 0
Joined: Mon Feb 04, 2013 10:24 pm

SIGSEGV in libps3000a.so.1

Post by wo_gue@hotmail.com »

Hi,

I compiled the driver demo PS3000Acon.c without any issues, having installed libusbpico_1.0-1_i386.deb and ps3000alinux_1.1-1_i386.deb.
Connecting to the hardware works fine, but when trying to capture any data I get a SIGSEGV.

------------
cat /etc/debian_version
wheezy/sid
------------
libc6 2.15-0ubuntu10.3
-----------

Here's the output from the debugger, having loaded the coredump:
--------------------------------

Code: Select all

Program terminated with signal 11, Segmentation fault.
#0  0xf760b8d8 in ?? () from /usr/lib/libps3000a.so.1
(gdb) bt
#0  0xf760b8d8 in ?? () from /usr/lib/libps3000a.so.1
#1  0xf75fb195 in ?? () from /usr/lib/libps3000a.so.1
#2  0xf75ee6f8 in ?? () from /usr/lib/libps3000a.so.1
#3  0xf75ead65 in ?? () from /usr/lib/libps3000a.so.1
#4  0xf760b36f in ?? () from /usr/lib/libps3000a.so.1
#5  0xf73e9d4c in start_thread () from /lib/i386-linux-gnu/libpthread.so.0
#6  0xf74ecd3e in clone () from /lib/i386-linux-gnu/libc.so.6
----------------------------------

Here is the output from strace:
----------------------------------

Code: Select all

write(1, "Waiting for trigger...Press a ke"..., 43) = 43
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, SNDCTL_TMR_START or TCSETS, {B38400 opost isig -icanon -echo ...}) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, 0xfff12584) = 0
+++ killed by SIGSEGV (core dumped) +++
------------------------------------

The compiler command I used to compile:
------------------------------------
gcc -ggdb -Wall -O1 -m32 PS3000Acon.c -oPS3000Acon -lps3000a -lusb_pico-1.0
------------------------------------

How can I fix this ?

Thanks for any help,
Wolfgang

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: SIGSEGV in libps3000a.so.1

Post by Martyn »

Which device are you running ?
Martyn
Technical Support Manager

wo_gue@hotmail.com
Newbie
Posts: 0
Joined: Mon Feb 04, 2013 10:24 pm

Re: SIGSEGV in libps3000a.so.1

Post by wo_gue@hotmail.com »

3204A

wo_gue@hotmail.com
Newbie
Posts: 0
Joined: Mon Feb 04, 2013 10:24 pm

Re: SIGSEGV in libps3000a.so.1

Post by wo_gue@hotmail.com »

Even if I compile and run on a Ubuntu 11.04 Vbox VM I get a SIGSEGV.
BTW, this needs some tweaking, because ps3000alinux_1.1-1_i386.deb requires a libstdc++ newer than the one provided by Ubuntu 11.04, to install.

wo_gue@hotmail.com
Newbie
Posts: 0
Joined: Mon Feb 04, 2013 10:24 pm

Re: SIGSEGV in libps3000a.so.1

Post by wo_gue@hotmail.com »

Since obviously there will not be a quick fix for this issue, can you please provide me with some details with which versions of linux, gcc, libstdc++ I can compile and run, not running into any issues ?

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: SIGSEGV in libps3000a.so.1

Post by Martyn »

Ubuntu 11.04 upwards with 4.7.2, I now have the tools in place to rebuild the drivers and access to the source so I will update in the next couple of weeks

Virtual Box may be an issue, we never managed to get it to work successfully although VMWare would, I will be working on a dedicated Linux PC
Martyn
Technical Support Manager

notserpe
Newbie
Posts: 0
Joined: Thu Apr 25, 2013 3:46 pm

Re: SIGSEGV in libps3000a.so.1

Post by notserpe »

I have the same problem under 64-bit fedora, down to a near identical backtrace:

Code: Select all

#0  0xf7e858d8 in ?? () from /usr/local/lib/libps3000a.so.1
#1  0xf7e75195 in ?? () from /usr/local/lib/libps3000a.so.1
#2  0xf7e686f8 in ?? () from /usr/local/lib/libps3000a.so.1
#3  0xf7e64d65 in ?? () from /usr/local/lib/libps3000a.so.1
#4  0xf7e8536f in ?? () from /usr/local/lib/libps3000a.so.1
#5  0x4ed49adf in start_thread () from /lib/libpthread.so.0
#6  0x4ec4f42e in clone () from /lib/libc.so.6
And strace:

Code: Select all

write(1, "Waiting for trigger...Press a ke"..., 43Waiting for trigger...Press a key to abort
) = 43
ioctl(9, USBDEVFS_SUBMITURB or USBDEVFS_SUBMITURB32, 0x8f2b3c8) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLOUT}], 3, 60000) = 1 ([{fd=9, revents=POLLOUT}])
ioctl(9, USBDEVFS_REAPURBNDELAY or USBDEVFS_REAPURBNDELAY32, 0xffffffffffb6f4ac) = 0
timerfd_settime(5, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
ioctl(9, USBDEVFS_SUBMITURB or USBDEVFS_SUBMITURB32, 0x8f2b3c8) = 0
poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=9, events=POLLOUT}], 3, 60000) = 1 ([{fd=9, revents=POLLOUT}])
ioctl(9, USBDEVFS_REAPURBNDELAY or USBDEVFS_REAPURBNDELAY32, 0xffffffffffb6f4ac) = 0
timerfd_settime(5, 0, {it_interval={0, 0}, it_value={0, 0}}, NULL) = 0
futex(0x8f17164, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x8f17160, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x8f17120, FUTEX_WAKE_PRIVATE, 1) = 1
????( 
+++ killed by SIGSEGV (core dumped) +++
Segmentation fault (core dumped)
marginally more interesting ltrace output:

Code: Select all

ps3000aSetDataBuffers(1, 0, 0x81f42f0, 0x81f92f8) = 0
malloc(20480)                                    = 0x81fe300
malloc(20480)                                    = 0x8203308
ps3000aSetDataBuffers(1, 1, 0x81fe300, 0x8203308) = 0
puts("Waiting for trigger...Press a ke"...Waiting for trigger...Press a key to abort
)      = 43
ps3000aRunStreaming(1, 0xff9327a8, 3, 0 
+++ killed by SIGSEGV +++
clearly a library bug exercised on ubuntu and fedora 64-bit

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: SIGSEGV in libps3000a.so.1

Post by Martyn »

Thanks for the information, we will be rebuilding these shortly. We just needed to complete the product release of our variable resolution scope which has delayed availability of development resource.
Martyn
Technical Support Manager

wo_gue@hotmail.com
Newbie
Posts: 0
Joined: Mon Feb 04, 2013 10:24 pm

Re: SIGSEGV in libps3000a.so.1

Post by wo_gue@hotmail.com »

Any news on the new drivers ?

Martyn
Site Admin
Site Admin
Posts: 4491
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: SIGSEGV in libps3000a.so.1

Post by Martyn »

Drivers have been produced and are in final test. We will be releasing these through a new repository shortly.
Martyn
Technical Support Manager

Post Reply