Bug 1180851

Summary: missing symbol in libbx_usb_uhci.so
Product: [Fedora] Fedora Reporter: Benjamin <Benjamin>
Component: bochsAssignee: Chris Lalancette <clalancette>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: clalancette, gwync, hanishkvc, honli, mike, pedro.lamarao, pzhukov, samsong8610, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: bochs-2.6.9-2.fc26 bochs-2.6.9-2.fc25 bochs-2.6.9-2.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-12 14:12:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
terminal output of bochs none

Description Benjamin@BGRoberts.id.au 2015-01-11 04:44:28 UTC
Created attachment 978688 [details]
terminal output of bochs

When starting bochs the following panic is thrown:

"Message: dlopen failed for module 'usb_uhci': /usr/lib64/bochs/plugins/libbx_usb_uhci.so: undefined symbol: _ZTV12usb_device_c"


Present in official FC21 2.6.2 package and when built from SRPM

Comment 1 Sam Song 2015-03-19 08:35:54 UTC
Present in 2.6.7 source code installation download from project home.

Comment 2 Pavel Zhukov 2015-08-29 09:54:41 UTC
Confirmed in F22

Comment 3 hanishkvc 2015-11-18 07:27:19 UTC
Also there in F23

Comment 4 hanishkvc 2015-11-18 10:12:00 UTC
Hi,

I have tested with latest svn code, where the same issue was triggered on my machine. So on a casual glance, it seems like there is a dependence on usb_device_c declared in usb_common in usb_uhci, and has RTLD_LAZY resolve only works for functions and not variables, it doesn't help here. So I have changed the sequence of loading wrt usb_uhci and usb_common, so that usb_common gets loaded first. However if for any reason usb_uhci doesn't load and if no other usb controllers are also loaded, then I take care of unloading usb_common, so that the old behaviour wrt usb_common is not changed, even thou location of loading of same is changed by my patch.

And this seems to solve the problem. However currently I am looking at bochs to help with some experimentation with a bootloader, so I haven't explicitly checked the usb logic, after my change, but logically don't see any reason why there should be a problem.


--- iodev/devices.cc	(revision 12882)
+++ iodev/devices.cc	(working copy)
@@ -180,6 +180,7 @@
     PLUG_load_plugin(pci, PLUGTYPE_CORE);
     PLUG_load_plugin(pci2isa, PLUGTYPE_CORE);
 #if BX_SUPPORT_PCIUSB
+    PLUG_load_plugin(usb_common, PLUGTYPE_CORE);
     if (chipset == BX_PCI_CHIPSET_I440FX) {
       // UHCI is a part of the PIIX3, so load / enable it
       if (!PLUG_device_present("usb_uhci")) {
@@ -188,8 +189,10 @@
       SIM->get_param_bool(BXPN_UHCI_ENABLED)->set(1);
     }
     usb_enabled = is_usb_enabled();
-    if (usb_enabled)
-      PLUG_load_plugin(usb_common, PLUGTYPE_CORE);
+    if (!usb_enabled) {
+      PLUG_unload_plugin(usb_common);
+      BX_PANIC(("Bochs has failed to load usb_uhci???"));
+    }
 #endif
     if (chipset == BX_PCI_CHIPSET_I440FX) {
       PLUG_load_plugin(acpi, PLUGTYPE_STANDARD);

Comment 5 Pedro LamarĂ£o 2016-05-06 22:20:52 UTC
I have the same problem with current F24.

Comment 6 Pedro LamarĂ£o 2016-05-06 22:50:08 UTC
Cannot reproduce with version 2.6.8 compiled from source with:
]$ configure --enable-gdb-stub

Comment 7 Honggang LI 2016-09-20 02:02:57 UTC
Issue persists with bochs-2.6.2-10.fc24.x86_64.

Comment 8 Gwyn Ciesla 2016-09-22 16:10:19 UTC
When I build the current SVN checkout with the portion of the above patch that still applies, it fixes the USB issue but still crashes.  If anyone would like to take a look, I've put builds here:

https://fedorapeople.org/~limb/bochs/

Comment 9 Honggang LI 2016-09-23 07:47:59 UTC
(In reply to Jon Ciesla from comment #8)
> When I build the current SVN checkout with the portion of the above patch
> that still applies, it fixes the USB issue but still crashes.  If anyone
> would like to take a look, I've put builds here:
> 
> https://fedorapeople.org/~limb/bochs/

 %install
 rm -rf $RPM_BUILD_ROOT _installed-docs
 make install DESTDIR=$RPM_BUILD_ROOT
 rm -rf $RPM_BUILD_ROOT%{_prefix}/share/bochs/VGABIOS*  <===

As VGABIOS* had been deleted, bochs hang for me. After package up "%{_datadir}/bochs/VGABIOS*", bochs works for me as expected. But bochs-debugger and bochs-gdb failed. Anyway, thanks for the scratch RPMs.

Comment 10 Gwyn Ciesla 2016-12-16 15:27:11 UTC
Updated builds in https://fedorapeople.org/~limb/bochs/

Comment 11 Fedora Update System 2017-05-05 18:26:36 UTC
bochs-2.6.9-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6e54134f4c

Comment 12 Fedora Update System 2017-05-05 18:26:56 UTC
bochs-2.6.9-1.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-1b0a9a2184

Comment 13 Fedora Update System 2017-05-05 18:27:09 UTC
bochs-2.6.9-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-5e9ae14f38

Comment 14 Fedora Update System 2017-05-07 02:00:52 UTC
bochs-2.6.9-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-5e9ae14f38

Comment 15 Fedora Update System 2017-05-07 03:29:51 UTC
bochs-2.6.9-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6e54134f4c

Comment 16 Fedora Update System 2017-05-07 05:07:31 UTC
bochs-2.6.9-1.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-1b0a9a2184

Comment 17 Fedora Update System 2017-05-08 13:28:20 UTC
bochs-2.6.9-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-654016e876

Comment 18 Fedora Update System 2017-05-08 13:28:42 UTC
bochs-2.6.9-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-39519fc6b4

Comment 19 Fedora Update System 2017-05-08 13:28:55 UTC
bochs-2.6.9-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-6a17b108d7

Comment 20 Fedora Update System 2017-05-09 00:46:28 UTC
bochs-2.6.9-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-39519fc6b4

Comment 21 Fedora Update System 2017-05-09 02:38:43 UTC
bochs-2.6.9-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-654016e876

Comment 22 Fedora Update System 2017-05-09 06:01:32 UTC
bochs-2.6.9-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-6a17b108d7

Comment 23 Fedora Update System 2017-05-12 14:12:18 UTC
bochs-2.6.9-2.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2017-05-17 21:02:51 UTC
bochs-2.6.9-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2017-05-18 04:55:41 UTC
bochs-2.6.9-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.