oxidecomputer / oxidecomputer/humility

Assertion failed: refcnt >= 0, file core.c, line 1187, function libusb_unref_device

Open
#459 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

zoot # humility probe
Assertion failed: refcnt >= 0, file core.c, line 1187, function libusb_unref_device
Abort (core dumped)

zoot # pstack core | demangle
core 'core' of 676:     humility probe
 fffffc7feee185ba _lwp_kill () + a
 fffffc7feedac50e raise (6) + 1e
 fffffc7feed85f78 abort () + 58
 fffffc7feed863a2 ???????? ()
 fffffc7fef2db15f libusb_unref_device (3b130c0) + 5d
 fffffc7fef2dac2b libusb_free_device_list (39d3700, 1) + 33
 000000000288ef1a hid_enumerate () + 2fa
 0000000002888416 hidapi::HidApi::get_hid_device_info_vector::h4b96d00b44118d3f () + 56
 0000000002887e6a hidapi::HidApi::new::h063b2b1734428fce () + 3a
 0000000002773da2 probe_rs::probe::cmsisdap::tools::list_cmsisdap_devices::h748ad10f6547c97e () + 112
 0000000002725214 probe_rs::probe::Probe::list_all::he2ce4d6f57169bae () + 24
 00000000021d9877 humility_core::core::get_usb_probe::h1fbdd24ba2cb91be () + 27
 00000000021e345b humility_core::core::attach_to_chip::h02f68a44b9b50cfd () + cdb
 00000000021e3be1 humility_core::core::attach_to_chip::h02f68a44b9b50cfd () + 1461
 00000000021d9c2e humility_core::core::attach::h1e0ef0b014208b4b () + 7e
 0000000002071f64 humility_cmd::attach_live::h7f2eb12b511cf9b1 () + 84
 0000000001620dbf humility_cmd::attach::h62f2d7768e51e4cf () + 6f
 0000000001628bd3 humility::cmd::subcommand::hbf1a3b02f24ec77e () + 483
 000000000162c7cd humility::main::hb11b39981f545e3f () + b1d
 0000000001623426 std::sys_common::backtrace::__rust_begin_short_backtrace::hd98d37e970dea048 () + 6
 0000000001623471 std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h1f216740031e8cea (.llvm.6920345741585721526) () + 11
 00000000029d52a3 std::rt::lang_start_internal::h8e4b16a9f4a17dcc () + 2c3
 000000000162d453 main () + 33
 000000000160dc37 _start_crt () + 87
 000000000160db98 _start () + 18

zoot # humility --version
humility 0.10.39

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with humility probe on the reported environment and inspect the stack from hid_enumerate through hidapi::HidApi::new and probe_rs::probe::cmsisdap::tools::list_cmsisdap_devices. Compare the device-list cleanup around the libusb_free_device_list call; done means probing no longer aborts with the libusb_unref_device assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.