<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>225879</bug_id>
          
          <creation_ts>2008-06-11 11:55 0000</creation_ts>
          <short_desc>dev-libs/libusb-0.1.12 fails to detect device remove and goes into infintive cycle</short_desc>
          <delta_ts>2008-06-25 03:25:50 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Unspecified</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>roma1390@gmail.com</reporter>
          <assigned_to>robbat2@gentoo.org</assigned_to>
          <cc>dsd@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>roma1390@gmail.com</who>
            <bug_when>2008-06-11 11:55:55 0000</bug_when>
            <thetext>libusb-0.1.12 on usb_bulk_read or usb_bulk_write goes into infinitive when user removes usb device (or device firmware reset device itself).

strace from program which called usb_bulk_read with timeout 1000

9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)
9388  14:00:31 ioctl(11, USBDEVFS_REAPURBNDELAY, 0xbf84af08) = -1 ENODEV (No such device)
9388  14:00:31 select(12, NULL, [], NULL, {0, 1000}) = 0 (Timeout)


Reproducible: Always

Steps to Reproduce:</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>roma1390@gmail.com</who>
            <bug_when>2008-06-11 11:57:22 0000</bug_when>
            <thetext>Created an attachment (id=156339)
patch

This patch fixes described problem</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>robbat2@gentoo.org</who>
            <bug_when>2008-06-25 03:25:50 0000</bug_when>
            <thetext>dsd: for your edification as upstream


incvs.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>156339</attachid>
            <date>2008-06-11 11:57 0000</date>
            <desc>patch</desc>
            <filename>libusb-0.1.12.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">ZGlmZiAtTmF1ciBsaWJ1c2ItMC4xLjEyL2xpbnV4LmMgbGlidXNiLTAuMS4xMi1uZXcvbGludXgu
YwotLS0gbGlidXNiLTAuMS4xMi9saW51eC5jCTIwMDYtMDMtMDQgMDQ6NTI6NDYuMDAwMDAwMDAw
ICswMjAwCisrKyBsaWJ1c2ItMC4xLjEyLW5ldy9saW51eC5jCTIwMDgtMDYtMTEgMTQ6MjI6MjAu
MDAwMDAwMDAwICswMzAwCkBAIC0yMjAsNiArMjIwLDEzIEBACiAgICAgd2FpdGluZyA9IDE7CiAg
ICAgY29udGV4dCA9IE5VTEw7CiAgICAgd2hpbGUgKCF1cmIudXNlcmNvbnRleHQgJiYgKChyZXQg
PSBpb2N0bChkZXYtPmZkLCBJT0NUTF9VU0JfUkVBUFVSQk5ERUxBWSwgJmNvbnRleHQpKSA9PSAt
MSkgJiYgd2FpdGluZykgeworICAgICAgaWYgKHJldCA9PSAtMSkKKyAgICAgIHsKKyAgICAgIAlp
ZiAoZXJybm8gPT0gRU5PREVWKQorCXsKKwkgIHJldHVybiAtRU5PREVWOworCX0KKyAgICAgIH0K
ICAgICAgIHR2LnR2X3NlYyA9IDA7CiAgICAgICB0di50dl91c2VjID0gMTAwMDsgLy8gMSBtc2Vj
CiAgICAgICBzZWxlY3QoZGV2LT5mZCArIDEsIE5VTEwsICZ3cml0ZWZkcywgTlVMTCwgJnR2KTsg
Ly9zdWIgc2Vjb25kIHdhaXQK
</data>        

          </attachment>
    </bug>

</bugzilla>