Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Nov 2019 16:39:22 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 241645] sysutils/bsdisks: coredumps when encountering nvme devices
Message-ID:  <bug-241645-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241645

            Bug ID: 241645
           Summary: sysutils/bsdisks: coredumps when encountering nvme
                    devices
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: easy, patch, patch-ready
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: arrowd@FreeBSD.org
          Reporter: cmt@freebsd.org
          Assignee: arrowd@FreeBSD.org
             Flags: maintainer-feedback?(arrowd@FreeBSD.org)

Created attachment 208771
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D208771&action=
=3Dedit
return error if cam_open_spec_device() fails

bsdisks opens devices with cam_open_spec_device() - "opens the pass(4) devi=
ce
that correspinds to the device name ..." as per the man page. nvme disks (n=
vd*)
do not have a pass device as per "camcontrol devlist" on my system.
cam_open_spec_device() returns NULL in that case, which triggers an error
message but is then passed on to other functions, until bsdisks crashes in
camlib; backtrace is:

(gdb) bt
#0  cam_getccb (dev=3D0x0) at /usr/src/lib/libcam/camlib.c:85
#1  0x00000000002622ec in scsiinquiry (device=3D0x0, task_attr=3D32,
    retry_count=3D1, timeout=3D0, result=3D0x7fffdf9fadcc)
    at /wrkdirs/usr/ports/sysutils/bsdisks/work/bsdisks-0.9/camcontrol.c:596
#2  0x00000000002621ec in cam_is_removable (device_path=3D0x80191f818 "nvd0=
")
    at /wrkdirs/usr/ports/sysutils/bsdisks/work/bsdisks-0.9/camcontrol.c:177
#3  0x000000000025932f in CamControlProber::run (this=3D0x80186eb10)
    at
/wrkdirs/usr/ports/sysutils/bsdisks/work/bsdisks-0.9/camcontrolprober.cpp:40
#4  0x0000000800671ffd in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#5  0x000000080066d4a4 in ?? () from /usr/local/lib/qt5/libQt5Core.so.5
#6  0x0000000800e76776 in thread_start (curthread=3D0x801854400)
    at /usr/src/lib/libthr/thread/thr_create.c:292
#7  0x0000000000000000 in ?? ()

Attached patch (to be dropped into files/ - bump PORTREVISION!) catches that
NULL and returns an error, thus making bsdisks survive.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241645-7788>