antfs-cli icon indicating copy to clipboard operation
antfs-cli copied to clipboard

Segmentation fault on start

Open chrissssss opened this issue 12 years ago • 16 comments

Hi! Thanks for your work and I really like your effort to get our favourite Garmin toys working on linux :)

I'm having a problem:

Running the programm says as follows (as root): Tigge-Garmin-Forerunner-610-Extractor-f7dfe71# python garmin.py Speicherzugriffsfehler (Speicherabzug geschrieben)

Garmin.log says: 2012-05-07 20:43:03,950 garmin.ant.base DEBUG USB Find device, vendor 0xfcf, product 0x1008 2012-05-07 20:43:03,964 garmin.ant.base DEBUG USB Config values: 2012-05-07 20:43:04,050 garmin.ant.base DEBUG Config 1 2012-05-07 20:43:04,051 garmin.ant.base DEBUG Interface 0, Alt 0 2012-05-07 20:43:04,051 garmin.ant.base DEBUG Endpoint 129 2012-05-07 20:43:04,052 garmin.ant.base DEBUG Endpoint 1

DMesg says:

[ 58.070295] show_signal_msg: 45 callbacks suppressed [ 58.070298] python[2357]: segfault at 40 ip 00007f1186939f12 sp 00007fffefe2f130 error 4 in libusb-1.0.so.0.1.0[7f1186930000+e000] [ 354.924115] usb 3-1: reset full-speed USB device number 2 using uhci_hcd [ 355.070511] python[2502]: segfault at 40 ip 00007f3d03c25f12 sp 00007fff43067f90 error 4 in libusb-1.0.so.0.1.0[7f3d03c1c000+e000] [ 852.152115] usb 3-1: reset full-speed USB device number 2 using uhci_hcd [ 852.303330] python[2545]: segfault at 40 ip 00007fafa5284f12 sp 00007fff0ba79600 error 4 in libusb-1.0.so.0.1.0[7fafa527b000+e000] [ 924.724355] usb 3-1: USB disconnect, device number 2

PyUSB has been installed with pip, but aside from that: I don't have any clue of python by now, so please be patient with me ;)

The watch is a 310XT with a 0x1008 Garmin Stick, for testing purposes I have also a FR60 with a 0x1004 stick lying around for some days...

Thanks and Regards, Chris

chrissssss avatar May 07 '12 18:05 chrissssss

This is probably a duplicate of issue #1. There are some further instructions in issue #12 on how to resolve this. For a quick solution 'pip install pyusb' should do the trick.

Tigge avatar May 07 '12 19:05 Tigge

Sorry, haven't seen issue #12 before, I'm also on Ubuntu 12.04 64bit. The pip-upgrade did the trick :)

Now I'm up to: ~/Downloads/Tigge-Garmin-Forerunner-610-Extractor-f7dfe71$ sudo python garmin.py Request basic information... Starting system... Open channel... Searching... String length: 16 Unit ID: 3821964278 Product name: Forerunner 310 Downloading index... where it seems to hang ^^

The garmin.log: 2012-05-07 21:34:40,253 garmin.ant.base DEBUG USB Find device, vendor 0xfcf, product 0x1008 2012-05-07 21:34:40,267 garmin.ant.base DEBUG USB Config values: [cut]

2012-05-07 21:35:23,982 garmin.ant.base WARNING <class 'usb.core.USBError'>, (110, 'Operation timed out') ... last message would be repeated indefinitely, I think

chrissssss avatar May 07 '12 19:05 chrissssss

Ah, something seem to have gone wrong somewhere. I should really try to get that error recovery in. Does it work if you try running it a couple of times, or does it always happen at the same time?

Tigge avatar May 07 '12 20:05 Tigge

Doesn't get any better ...

2012-05-07 22:49:21,271 garmin.ant.base DEBUG USB Find device, vendor 0xfcf, product 0x1008 [cut]

chrissssss avatar May 07 '12 21:05 chrissssss

Hm, this is a bit weird -- I should have noticed this earlier. It looks like your watch is set to not pair with new device. There should be a setting for this on your watch. Hopefully this will solve this problem. To my defense I though I had some error checks in place that detected this. If this don't work try to enable initial pairing again and delete your auth file.

Snipped from the Garmin Connect FAQ:

Forerunner 310XT/910XT: To enable pairing, follow these steps:

  1. Press Mode to the Settings page.
  2. Scroll and select Settings.
  3. Scroll and select System.
  4. Scroll and select Data Transfer.
  5. Scroll and select Computer.
  6. Scroll and select Pairing.
  7. Verify Pairing is On.

Tigge avatar May 09 '12 08:05 Tigge

Hi, back again.

After saturday I have a new activity on my FR310 which I would like to download, but I get the following (first tried directly to download with pairing enabled, then tried again after deleting the auth-file.

The following I get: What makes me curirous are the lines "2012-05-14 19:26:57,292" and inbetween the block of usb errors around the line with "2012-05-14 19:26:44,798"

How would it look like if it's working alright? Are there also so much log entries? Is the call "python garmin.py" ever returning? The program gets killed by me after haning long time with "Downloading index file"....

Greetings and bye! Chris

2012-05-14 19:25:35,536 garmin.ant.base DEBUG USB Find device, vendor 0xfcf, product 0x1008 [cut]

chrissssss avatar May 14 '12 18:05 chrissssss

Could you try to post the whole thing on https://gist.github.com/ instead? It seems the Markdown messes up the data. It also makes the bug a bit more easy to follow :). Thanks!

Tigge avatar May 14 '12 20:05 Tigge

Here is another one, I must have deleted the last log by accident...

https://gist.github.com/2704305

chrissssss avatar May 15 '12 19:05 chrissssss

Could you try again with latest version from master, please?

Tigge avatar Nov 06 '12 19:11 Tigge

I am having a similar problem here trying to read data from my garmin 310xt. Gant connects & is reading data, but produces no output.

What I have done so far: (re)installed pyusb ... xxx@tux-peter:~/Scripts/Garmin-Forerunner-610-Extractor-master> sudo pip install --upgrade pyusb Downloading/unpacking pyusb Downloading pyusb-1.0.0a3.zip (56Kb): 56Kb downloaded Running setup.py egg_info for package pyusb

Installing collected packages: pyusb Found existing installation: pyusb 1.0.0a3 Uninstalling pyusb: Successfully uninstalled pyusb Running setup.py install for pyusb

Successfully installed pyusb Cleaning up...

then give it a try ...

xxx@tux-peter:~/Scripts/Garmin-Forerunner-610-Extractor-master> python garmin.py Speicherzugriffsfehler

and the log says:

MainThread 2012-12-04 21:04:43,893 garmin.ant.base.ant DEBUG USB Find device, vendor 0xfcf, product 0x1008 (ant.py:44) MainThread 2012-12-04 21:04:43,919 garmin.ant.base.ant DEBUG USB Config values: (ant.py:51) MainThread 2012-12-04 21:04:43,919 garmin.ant.base.ant DEBUG Config 1 (ant.py:53) MainThread 2012-12-04 21:04:43,919 garmin.ant.base.ant DEBUG Interface 0, Alt 0 (ant.py:55) MainThread 2012-12-04 21:04:43,920 garmin.ant.base.ant DEBUG Endpoint 129 (ant.py:57) MainThread 2012-12-04 21:04:43,920 garmin.ant.base.ant DEBUG Endpoint 1 (ant.py:57) MainThread 2012-12-04 21:04:43,920 garmin.ant.base.ant DEBUG No kernel driver active (ant.py:65)

Is "No kernel driver active" the problem? What can I do to get it working?

Regards, Peter

p-val avatar Dec 04 '12 20:12 p-val

So, Speicherzugriffsfehler seem to mean Segmentation fault in German. The 'No kernel driver active' shouldn't cause this but there is probably crashing somewhere in pyusb/libusb. Does dmesg give you any hints here?

Other than that, you might try to get a backtrace from the crash:

$ gdb python
(gdb) run garmin.py
....
(gdb) backtrace

Also, if you cold post some system information (libusb version, uname -a, etc) that would be great.

Tigge avatar Dec 04 '12 21:12 Tigge

Am Dienstag, 4. Dezember 2012, 13:33:19 schrieb Gustav Tiger:

So, Speicherzugriffsfehler seem to mean Segmentation fault in German. The 'No kernel driver active' shouldn't cause this but there is probably crashing somewhere in pyusb/libusb. Does dmesg give you any hints here? Other than that, you might try to get a backtrace from the crash: $ gdb python (gdb) run garmin.py .... (gdb) backtrace Also, if you cold post some system information (libusb version, uname -a, etc) that would be great. — Reply to this email directly or view it on GitHub.

Hi Gustav, thanks for the quick reply.

Here is some more info:

exec sudo /sbin/modprobe usbserial vendor=0x0fcf product=0x1008 to create ttyUSB0

Version(s) libusb-1_0-0 - USB Library libusb-0_1-4 - libusb-1.0 Compatibility Library for libusb-0.1

uname -a Linux tux-peter 3.1.10-1.16-desktop #1 SMP PREEMPT Wed Jun 27 05:21:40 UTC 2012 (d016078) i686 i686 i386 GNU/Linux

syslog output Dec 5 18:00:49 tux-peter kernel: generic ttyUSB0: generic converter now disconnected from ttyUSB0 Dec 5 18:00:49 tux-peter kernel: usbserial_generic 1-5.3.3.1:1.0: device disconnected Dec 5 18:00:49 tux-peter kernel: usb 1-5.3.3.1: reset full speed USB device number 10 using ehci_hcd Dec 5 18:00:49 tux-peter kernel: python[7226]: segfault at 24 ip b71e61ae sp bfc414f0 error 4 in libusb-1.0.so.0.0.0[b71df000+d000]

exec backtrace: xxx@tux-peter:~/Scripts/Garmin-Forerunner-610-Extractor-master> gdb python GNU gdb (GDB) SUSE (7.3-41.1.2) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i586-suse-linux". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /usr/bin/python...Missing separate debuginfo for /usr/bin/python Try: zypper install -C "debuginfo(build- id)=d1c0466c75a18fd1b8766acdb17f24d07125ce92" (no debugging symbols found)...done.

(gdb) run garmin.py Starting program: /usr/bin/python garmin.py Missing separate debuginfo for /lib/ld-linux.so.2 Try: zypper install -C "debuginfo(build- id)=39c1043d2fcf5b72a2199cfb765d020b1faeb863" Missing separate debuginfo for /usr/lib/libpython2.7.so.1.0 Try: zypper install -C "debuginfo(build- id)=f5d4f2dc62a1acbd38fcc7fe5dc7a87f283c5837" Missing separate debuginfo for /lib/libpthread.so.0 Try: zypper install -C "debuginfo(build- id)=593f40f908f51dd863dc2cf94b9cb76bd0bae3d8" [Thread debugging using libthread_db enabled] Missing separate debuginfo for /lib/libc.so.6 Try: zypper install -C "debuginfo(build- id)=782d835f454ecfa3cdd590574b59c139283cf7ea" Missing separate debuginfo for /lib/libdl.so.2 Try: zypper install -C "debuginfo(build- id)=e836358b9da37bddf9adaa7430eb92a0a0b19d16" Missing separate debuginfo for /lib/libutil.so.1 Try: zypper install -C "debuginfo(build- id)=9d3744ab88fc1d28542d7aa28a7d16950d09b3a1" Missing separate debuginfo for /lib/libm.so.6 Try: zypper install -C "debuginfo(build- id)=4ef73322578ad9d7b9bb042f0d8c31aecbd2c52d" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/array.so Try: zypper install -C "debuginfo(build- id)=9f7874dfbfc8862928d0f549c7e0a40ea623c500" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/time.so Try: zypper install -C "debuginfo(build- id)=81f6ec80b2c61c628c08cff278eaeb7a44216d70" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/cStringIO.so Try: zypper install -C "debuginfo(build- id)=f93800d52d486da47d0d82248867903af4eb19fd" Missing separate debuginfo for /usr/lib/python2.7/lib- dynload/_collections.so Try: zypper install -C "debuginfo(build- id)=35c0fb2ca4e7852c910ba4591592f9e50ee89d3d" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/operator.so Try: zypper install -C "debuginfo(build- id)=c14e75a4a6f5232bc9fc40b2e0d91e3e3cf58ffa" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/itertools.so Try: zypper install -C "debuginfo(build- id)=de4f9187fb66574376f140888e3ceaab1ef88ec5" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/_bisect.so Try: zypper install -C "debuginfo(build- id)=65801f5c355dde5b891c52343587d2b6f174ec00" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/_heapq.so Try: zypper install -C "debuginfo(build- id)=61328efb0d5552249449f1f72e1d88cef277a370" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/_struct.so Try: zypper install -C "debuginfo(build- id)=117be452b2ba85fc429fcab98aece674f5022422" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/_functools.so Try: zypper install -C "debuginfo(build- id)=6faf1321aa4576bc9fcc09828adc271fc9a560fe" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/datetime.so Try: zypper install -C "debuginfo(build- id)=7201d9f75125dca7fcb4e23f92628444e7fd5d40" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/select.so Try: zypper install -C "debuginfo(build- id)=b5a9e5825b7a4765a682341ebabb27fcc0ed7cbd" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/fcntl.so Try: zypper install -C "debuginfo(build- id)=fde8699fc9b1d46b1aa98b4ceaac5395acbe8f31" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/binascii.so Try: zypper install -C "debuginfo(build- id)=d7ec90bfb864f00d4569743d6ed1328d8a1f97de" Missing separate debuginfo for /lib/libz.so.1 Try: zypper install -C "debuginfo(build- id)=7884f082e11153e77b53779f0c1bad4e38befc2d" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/_ctypes.so Try: zypper install -C "debuginfo(build- id)=da5d780aef24a6e97f3356bbef61445a61ec6697" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/math.so Try: zypper install -C "debuginfo(build- id)=109f7b97dd1dcf8f6ec335d786d950c8d4d504ac" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/_hashlib.so Try: zypper install -C "debuginfo(build- id)=8cc79703aefd15310440853a79a7bce33e0a4419" Missing separate debuginfo for /lib/libssl.so.1.0.0 Try: zypper install -C "debuginfo(build- id)=689643096b4761e1540b7d32e37662289a0869e4" Missing separate debuginfo for /lib/libcrypto.so.1.0.0 Try: zypper install -C "debuginfo(build- id)=c7d439e3342b34285afea5d585428c81014dbe45" Missing separate debuginfo for /usr/lib/python2.7/lib-dynload/_random.so Try: zypper install -C "debuginfo(build- id)=f91753af09c226eb2f7bf706d3c764640de3b15c" Detaching after fork from child process 7498. Missing separate debuginfo for /lib/libusb-1.0.so.0 Try: zypper install -C "debuginfo(build- id)=b4c097f5ff398165037687a6e95ac73db59f3ce6" Missing separate debuginfo for /lib/librt.so.1 Try: zypper install -C "debuginfo(build- id)=c1cd870bd6083af5996fbb10104d4b65ffde6fd6"

Program received signal SIGSEGV, Segmentation fault. 0xb7a861ae in ?? () from /lib/libusb-1.0.so.0

backtrace not successful, too much missing ... Here is what's installed containing python: python-kde4-4.9.3-44.1.i586 python-gobject-cairo-3.0.2-2.3.1.i586 python-urlgrabber-3.9.1-2.1.2.noarch python-gobject2-devel-2.28.6-9.1.3.i586 python-bonobo-2.28.1-12.1.2.i586 python-pysqlite-2.6.3-2.2.i586 python-gconf-2.28.1-12.1.2.i586 libxslt-python-1.1.26-15.8.1.i586 python-cupshelpers-1.3.7-2.10.1.noarch python-lxml-2.3-6.1.3.i586 python-usb-1.0.0-3.1.1.noarch python-dateutil-1.5-7.1.2.noarch libboost_python1_44_0-1.44.0-5.1.i586 python-goocanvas-0.14.1-15.1.2.i586 python-gnomecanvas-2.28.1-12.1.2.i586 python-orbit-2.24.0-11.1.2.i586 rpm-python-4.9.1.2-4.1.i586 python-xml-2.7.2-7.17.1.i586 python-SQLAlchemy-0.7.2-2.1.3.i586 python-cairo-1.10.0-3.1.3.i586 libxml2-python-2.7.8+git20110708-3.3.1.i586 python-pip-1.0.2-3.1.2.noarch python-kdebase4-4.9.3-793.1.i586 python-httplib2-0.7.1-3.4.1.noarch python-devel-2.7.2-7.17.1.i586 python-argparse-1.2.1-4.1.2.noarch python-gnomevfs-2.28.1-12.1.2.i586 dbus-1-python-0.83.2-7.1.3.i586 python-matplotlib-1.0.1-11.1.2.i586 python-gtk-devel-2.24.0-3.1.2.i586 python-notify-0.1.1-20.1.2.i586 gimp-plugins-python-2.6.11-28.26.1.i586 python-gobject-3.0.2-2.3.1.i586 libboost_python1_46_1-1.46.1-8.1.3.i586 python-base-2.7.2-7.17.1.i586 python-wxWidgets-lang-2.8.12.1-10.4.1.i586 python-egg-2.25.3-26.1.2.i586 python-satsolver-0.44.5-2.3.2.i586 python-pyudev-0.16.1-14.1.noarch python-vorbis-1.5a-153.1.3.i586 python-gtkspell-2.25.3-26.1.2.i586 python-cairo-devel-1.10.0-3.1.3.i586 python-webkitgtk-1.1.8-6.1.2.i586 python-simplejson-2.2.1-2.1.3.i586 python-gtk-2.24.0-3.1.2.i586 python-distribute-0.6.31-55.1.noarch python-wxWidgets-2.8.12.1-10.4.1.i586 python-numpy-1.6.2-75.1.i586 python-configobj-4.7.2-8.1.1.noarch python-tk-2.7.2-7.17.1.i586 python-gdbm-2.7.2-7.17.1.i586 python-cups-1.9.59-2.1.3.i586 python-gnome-2.28.1-12.1.2.i586 python-qt4-4.9.5-93.3.i586 python-gobject-devel-3.0.2-2.3.1.i586 libpython2_7-1_0-2.7.2-7.17.1.i586 python-vte-0.28.2-4.4.1.i586 python-distutils-extra-2.23-6.1.2.noarch python-gstreamer-0_10-0.10.22-5.2.i586 python-mutagen-1.20-43.1.1.noarch python-xdg-0.19-29.1.noarch python-mlt-0.8.6-4.1.i586 python-tz-2010h-6.1.1.noarch python-pycurl-7.19.0-2.1.3.i586 patterns-openSUSE-devel_python-12.1-25.21.1.i586 python-gobject2-2.28.6-9.1.3.i586 python-Distutils2-1.0a3-3.1.1.noarch python-2.7.2-7.17.1.i586 python-smbc-1.0.11-3.1.3.i586 python-eyeD3-0.6.17-12.1.1.noarch python-imaging-1.1.7-8.1.2.i586 libboost_python1_49_0-1.49.0-82.1.i586 libpyglib-gi-2_0-python0-3.0.2-2.3.1.i586 python-sip-4.14.1-82.1.i586 python-libtorrent-rasterbar-0.15.10-24.5.i586 python-gnomekeyring-2.32.0-11.1.2.i586

Hope this helps us a little bit further.

Regards, Peter

p-val avatar Dec 05 '12 18:12 p-val

Yeah hm, without debug symbols this is going to be tough. Perhaps you could try to install debug symbols for libusb1.0? Also, there is no need to modprobe in usbserial, the extractor will only try to detach that kernel module anyway -- but I don't think that's the problem.

Tigge avatar Dec 05 '12 19:12 Tigge

Perhaps you could try to install debug symbols for libusb1.0?

Yes, I'd like to - but how? Repos & rpmfind negative :(

p-val avatar Dec 06 '12 15:12 p-val

What is this 'zypper install -C "debuginfo(build-id)= b4c097f5ff398165037687a6e95ac73db59f3ce6"' thing that gdb mentions?

On 6 December 2012 16:36, p-val [email protected] wrote:

Perhaps you could try to install debug symbols for libusb1.0?

Yes, I'd like to - but how? Repos & rpmfind negative :(

— Reply to this email directly or view it on GitHubhttps://github.com/Tigge/Garmin-Forerunner-610-Extractor/issues/13#issuecomment-11090050.

Tigge avatar Dec 08 '12 09:12 Tigge

What is this 'zypper install -C "debuginfo(build-id)= b4c097f"' thing that gdb mentions?

It's just a suggestion to install additional debuginfo, where "build-id" could be the version number of gdb?. Tried to run sudo zypper install -C "debuginfo(7.3-41.1.2)=d1c0466c75a18fd1b8766acdb17f24d07125ce92" no luck (none of my repos offers it). I have no idea how to get gdb to work ...

p-val avatar Dec 08 '12 17:12 p-val