Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On OSX, device updating fails after some time #35

Closed
colinrgodsey opened this issue Apr 23, 2014 · 3 comments
Closed

On OSX, device updating fails after some time #35

colinrgodsey opened this issue Apr 23, 2014 · 3 comments

Comments

@colinrgodsey
Copy link

In regards to my post on the board: https://groups.google.com/forum/#!topic/usb4java/qrcz4H9n_jY

More information is provided there, but basically on OSX after running the software for a while (with some device failures and reinits happening every hour). After a while the device list seems to stop getting updated, and i cannot open an interface to the device. Oddly enough, when walking the device tree at this point, it is never updated. Unplugging the old device, plugging in a new one, etc. still returns the same list of devices. I'm still getting callbacks from control requests, but obviously with no device it does nothing. Trying to send data, I get a failure that it cant find the interface. This sometimes results in a segfault (attached).

Moving the software over to linux, everything works fine. I may try compiling my own OSX native driver and see if that helps.

@colinrgodsey
Copy link
Author

Stack: [0x000000010edbf000,0x000000010eebf000], sp=0x000000010eebe520, free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [libusb4java.dylib+0xb320] libusb_cancel_transfer+0xe0
C [libusb4java.dylib+0x11a35] libusb_hotplug_deregister_callback+0x4c95
C [libusb4java.dylib+0xbed5] libusb_handle_events_timeout_completed+0x675
C [libusb4java.dylib+0xbaa9] libusb_handle_events_timeout_completed+0x249
C [libusb4java.dylib+0xc066] libusb_handle_events_completed+0x26
C [libusb4java.dylib+0xc82b] libusb_control_transfer+0x23b
C [libusb4java.dylib+0xc6ec] libusb_control_transfer+0xfc
C [libusb4java.dylib+0x339d] Java_org_usb4java_LibUsb_controlTransfer+0x9d
j org.usb4java.LibUsb.controlTransfer(Lorg/usb4java/DeviceHandle;BBSSLjava/nio/ByteBuffer;J)I+0
j org.usb4java.javax.AbstractIrpQueue.processControlIrp(Ljavax/usb/UsbControlIrp;)V+80
j org.usb4java.javax.ControlIrpQueue.processIrp(Ljavax/usb/UsbControlIrp;)V+2
j org.usb4java.javax.ControlIrpQueue.processIrp(Ljavax/usb/UsbIrp;)V+5
j org.usb4java.javax.AbstractIrpQueue.process()V+31
J java.lang.Thread.run()V
V [libjvm.dylib+0x288afb]
V [libjvm.dylib+0x288fd8]
V [libjvm.dylib+0x289112]
V [libjvm.dylib+0x2bfa8c]
V [libjvm.dylib+0x478694]
V [libjvm.dylib+0x479b7a]
V [libjvm.dylib+0x3b5595]
C [libsystem_pthread.dylib+0x1899] _pthread_body+0x8a
C [libsystem_pthread.dylib+0x172a] _pthread_struct_init+0x0
C [libsystem_pthread.dylib+0x5fc9] thread_start+0xd

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.usb4java.LibUsb.controlTransfer(Lorg/usb4java/DeviceHandle;BBSSLjava/nio/ByteBuffer;J)I+0
j org.usb4java.javax.AbstractIrpQueue.processControlIrp(Ljavax/usb/UsbControlIrp;)V+80
j org.usb4java.javax.ControlIrpQueue.processIrp(Ljavax/usb/UsbControlIrp;)V+2
j org.usb4java.javax.ControlIrpQueue.processIrp(Ljavax/usb/UsbIrp;)V+5
j org.usb4java.javax.AbstractIrpQueue.process()V+31
J java.lang.Thread.run()V
v ~StubRoutines::call_stub

@colinrgodsey colinrgodsey changed the title On OSX device updating fails after some time On OSX, device updating fails after some time Apr 23, 2014
@kayahr
Copy link
Member

kayahr commented Apr 24, 2014

This sounds more like a problem in libusb. If you have some C experience maybe you can try to reproduce this problem with a small C program which directly uses libusb?

@colinrgodsey
Copy link
Author

hmm, actually I'm going to close this. There's a few more things I need to weed out. I'm going to try a new native driver build from my mac, and im going to try another mac. I just remembered I'm on a hackintosh, so I wouldn't be surprised if that's feeding into this.

I can also use the original device software (cgminer, in C, uses libusb directly) on this machine and see if that fails too. I think I may have been a little pre-emptive creating this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants