Bug 1087086 - lshw seg fault unless use -disable SCSI option
Summary: lshw seg fault unless use -disable SCSI option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: lshw
Version: 24
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Terje Røsten
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-13 23:16 UTC by David Both
Modified: 2017-01-27 06:38 UTC (History)
2 users (show)

Fixed In Version: lshw-B.02.18-2.fc24 lshw-B.02.18-2.fc23 lshw-B.02.18-2.fc22
Clone Of:
Environment:
Last Closed: 2016-05-07 11:52:36 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Complete output of lshw -disable SCSI on affected system (20.61 KB, text/plain)
2014-04-13 23:16 UTC, David Both
no flags Details

Description David Both 2014-04-13 23:16:29 UTC
Created attachment 885971 [details]
Complete output of lshw -disable SCSI on affected system

Description of problem:
When using lshw to locate system hardware information it usually returns the following error: 

[root@david ~]# lshw -class CPU
Segmentation fault (core dumped)

This happens regardless of which class used or if I run lshw without any options. However, if I run the following, it does work without a seg fault:

lshw -class CPU -disable SCSI

Using any or no class with the disable SCSI option allows lshw to return the desired data. I have no true SCSI devices installed in the failing system.

It does appear that this is limited to specific hardware as it does not occur on most of my systems, only one.

Complete lshw output attached.

Version-Release number of selected component (if applicable):
[root@david ~]# lshw -version
B.02.17

How reproducible:
Run lshw without -disable SCSI option.

Steps to Reproduce:
1. Run lshw without -disable SCSI option.
2.
3.

Actual results:
seg fault with core dump

Expected results:
Hardware list


Additional info:
See attachment for a complete list of the hardware.

Comment 1 Fedora End Of Life 2015-05-29 11:33:40 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 David Both 2015-06-02 10:10:52 UTC
Still a problem with F21.

[root@david ~]# lshw
Segmentation fault (core dumped)
[root@david ~]# uname -a
Linux david.both.org 3.19.7-200.fc21.x86_64 #1 SMP Thu May 7 22:00:21 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Comment 3 Terje Røsten 2015-10-12 20:43:47 UTC
Could you provide a backtrace from gdb?

Comment 4 David Both 2015-10-12 21:02:45 UTC
(In reply to Terje Røsten from comment #3)
> Could you provide a backtrace from gdb?

I will be happy to if you can provide me a binary compiled with debugging flags. My current version is B.02.17.

Thanks!

Comment 5 Terje Røsten 2015-10-13 21:01:46 UTC
Running the following command:

 debuginfo-install lshw 

should resolve that. 

If you need more background information, please read:

 https://fedoraproject.org/wiki/StackTraces

Thanks!

Comment 6 David Both 2015-10-13 21:12:16 UTC
Here is the result:

(gdb) run
Starting program: /usr/sbin/lshw 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
SCSI                      
Program received signal SIGSEGV, Segmentation fault.
__memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:245
245             vmovdqu -0x80(%rsi,%rdx), %xmm5
Missing separate debuginfos, use: debuginfo-install sqlite-3.8.10.2-1.fc21.x86_64
(gdb) thread apply all bt full

Thread 1 (Thread 0x7ffff7fcf740 (LWP 18973)):
#0  __memcpy_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:245
No locals.
#1  0x00007ffff76ab120 in copy (__n=4294967291, __s2=0x7fffffffdbd4 ' ' <repeats 48 times>, __s1=0x7ffef0376028 "")
    at /usr/src/debug/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/char_traits.h:275
No locals.
#2  _M_copy (__n=4294967291, __s=0x7fffffffdbd4 ' ' <repeats 48 times>, __d=0x7ffef0376028 "")
    at /usr/src/debug/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:361
No locals.
#3  _S_copy_chars (__k2=<optimized out>, __k1=0x7fffffffdbd4 ' ' <repeats 48 times>, __p=0x7ffef0376028 "")
    at /usr/src/debug/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:409
No locals.
#4  std::string::_S_construct<char const*> (__beg=0x7fffffffdbd4 ' ' <repeats 48 times>, __end=<optimized out>, __a=...)
    at /usr/src/debug/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.tcc:140
        __dnew = 4294967291
        __r = 0x7ffef0376010
        __a = <optimized out>
        __end = <optimized out>
        __beg = 0x7fffffffdbd4 ' ' <repeats 48 times>
#5  0x00007ffff76ab19c in _S_construct_aux<char const*> (__a=..., __end=<optimized out>, __beg=<optimized out>)
    at /usr/src/debug/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:1743
No locals.
#6  _S_construct<char const*> (__a=..., __end=<optimized out>, __beg=<optimized out>)
    at /usr/src/debug/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.h:1764
No locals.
#7  std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string (this=0x7fffffffda10, __s=<optimized out>, __n=<optimized out>, __a=...)
    at /usr/src/debug/gcc-4.9.2-20150212/obj-x86_64-redhat-linux/x86_64-redhat-linux/libstdc++-v3/include/bits/basic_string.tcc:207
No locals.
#8  0x0000000000461830 in do_inquiry (node=..., sg_fd=3) at scsi.cc:486
        rsp_buff = "\000\200\000\373", ' ' <repeats 48 times>, '\000' <repeats 203 times>
        k = 30536
        len = <optimized out>
        ansiversion = 6
#9  scan_sg (n=...) at scsi.cc:738
        device = {This = 0xb79540}
        m_id = {host_no = 24, channel = 0, scsi_id = 0, lun = 0, scsi_type = 0, h_cmd_per_lun = 1, d_queue_depth = 1, unused1 = 0, unused2 = 0}
        businfo = "scsi@24"
        parent = 0x785df0
        emulated = 1
        ghostdeventry = <optimized out>
        j = 7
        entries = {gl_pathc = 9, gl_pathv = 0xb82320, gl_offs = 0, gl_flags = 256, gl_closedir = 0x0, gl_readdir = 0x7ffff70d938b <__GI_glob+315>, gl_opendir = 0xffff8000000024d1, 
          gl_lstat = 0x7fffffffdb2f, gl_stat = 0x0}
        sg = <optimized out>
        fd = 3
        slot_name = "1-4.1.1:1.0", '\000' <repeats 52 times>
        host = "scsi24"
#10 0x0000000000464403 in scan_scsi (n=...) at scsi.cc:900
No locals.
#11 0x000000000041b736 in scan_system (system=...) at main.cc:121
        computer = {This = 0x6c5f90}
        hostname = "david.both.org\000\000\300\337\377\377\377\177\000\000\247d@\000\000\000\000\000\b\000\000\000\000\000\000\000 \261j\367\377\177\000\000X\375k\000\000\000\000\000\000\376\347˽\220\032g{\337\377\377\377\177\000\000\000\000\000\000\000\000\000"
#12 0x0000000000404b61 in main (argc=1, argv=0x7fffffffe0e8) at lshw.cc:225
        computer = {This = 0x6c5d60}
(gdb)

Comment 7 Fedora End Of Life 2015-11-04 15:20:15 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Jan Kurik 2016-02-24 15:35:13 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 9 Fedora Update System 2016-04-25 18:43:12 UTC
lshw-B.02.18-2.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-bb9b5111be

Comment 10 Fedora Update System 2016-04-25 18:43:29 UTC
lshw-B.02.18-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-b3724ab759

Comment 11 Fedora Update System 2016-04-25 18:43:38 UTC
lshw-B.02.18-2.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2016-8b4bf68744

Comment 12 Fedora Update System 2016-04-26 16:22:57 UTC
lshw-B.02.18-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-2016-b3724ab759

Comment 13 Fedora Update System 2016-04-27 01:21:24 UTC
lshw-B.02.18-2.fc23 has been pushed to the Fedora 23 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-2016-bb9b5111be

Comment 14 Fedora Update System 2016-04-27 01:21:48 UTC
lshw-B.02.18-2.fc22 has been pushed to the Fedora 22 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-2016-8b4bf68744

Comment 15 Fedora Update System 2016-05-07 11:52:29 UTC
lshw-B.02.18-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 16 Fedora Update System 2016-05-07 21:51:18 UTC
lshw-B.02.18-2.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2016-05-16 14:55:18 UTC
lshw-B.02.18-2.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 18 David Both 2016-08-21 01:20:56 UTC
This bug has been resolved on the computer on which I was having problems. Currently running 4.6.6-300.fc24.x86_64 and version is B.02.17 of lshw. 

Thank you for thee fix!

Comment 19 Allan 2017-01-27 06:38:16 UTC
hello, I just experienced this bug so I'm posting here instead of making a new bug report. 
I have installed lshw.i686 B.02.18-5.fc25 

the command lshw orks from the normal user but gives limited information. however when run as root i get the error 

Segmentation fault

This is on my laptop running fedora 25 workstation 32bit.


Note You need to log in before you can comment on or make changes to this bug.