gsmartcontrol immediately crashes while running smartctl

Bug #1789454 reported by Diego Bersanetti
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gsmartcontrol (Debian)
Fix Released
Unknown
gsmartcontrol (Ubuntu)
Fix Released
High
Unassigned

Bug Description

As soon as it starts, gsmartcontrol runs smartctl in order to get the information about the disks and it crashes immediately with a segmentation fault

Tags: patch
Revision history for this message
Diego Bersanetti (diegobersanetti) wrote :
Revision history for this message
T.Lewis (luthercymru2) wrote :

As of Nov 2019, I'm getting the same crash bug, ran it through gdb and it crashes in the same place.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gsmartcontrol (Ubuntu):
status: New → Confirmed
Revision history for this message
gdp77 (gdp77) wrote :
Download full text (5.7 KiB)

It was working fine for me a couple of months ago. Not it crashes with a segmentation fault.

---------------------------------------------------------------------------------
george@george-Ryzen:~$ gsmartcontrol
<warn> [hz] Warning: exit: Device open failed, or device did not return an IDENTIFY DEVICE structure.
<warn> [app] SmartctlParser::parse_full(): No ATA sections could be parsed. Returning.
<warn> [hz] Warning: exit: Device open failed, or device did not return an IDENTIFY DEVICE structure.
<warn> [app] SmartctlParser::parse_full(): No ATA sections could be parsed. Returning.
<warn> [hz] Warning: exit: Device open failed, or device did not return an IDENTIFY DEVICE structure.
<warn> [app] SmartctlParser::parse_full(): No ATA sections could be parsed. Returning.
<warn> [hz] Warning: exit: Device open failed, or device did not return an IDENTIFY DEVICE structure.
<warn> [app] SmartctlParser::parse_full(): No ATA sections could be parsed. Returning.
<warn> [hz] Warning: exit: Device open failed, or device did not return an IDENTIFY DEVICE structure.
Segmentation fault (core dumped)

----------------------------------------------------------------------------

Also using sudo:

george@george-Ryzen:~$ sudo gsmartcontrol
<warn> [hz] Warning: exit: Device open failed, or device did not return an IDENTIFY DEVICE structure.
Segmentation fault

----------------------------------------------------------------------------

smartctl is working OK:

george@george-Ryzen:~$ sudo smartctl -a /dev/sda
smartctl 6.6 2016-05-31 r4324 [x86_64-linux-5.3.0-28-generic] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model: Samsung SSD 860 EVO 500GB
Serial Number: S3Z2NB0K172360E
LU WWN Device Id: 5 002538 e400c377f
Firmware Version: RVT01B6Q
User Capacity: 500.107.862.016 bytes [500 GB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: Unknown(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Fri Feb 7 23:06:50 2020 EET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
     was never started.
     Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
     without error or no self-test has ever
     been run.
Total time to complete Offline
data collection: ( 0) seconds.
Offline data collection
capabilities: (0x53) SMART execute Offline immediate.
     Auto Offline data collection on/off support.
     Suspend Offline collection upon new
     command.
     No Offline surface scan supported.
     Self-test supported.
     No Conveyance Self-test supported.
     Selective Self-test supported.
SMART capabilities: (0x0003) Saves ...

Read more...

Revision history for this message
Oliver (ok23) wrote (last edit ):

Version 1.1.3 crashes for me, too (access violation). The crash happens when scanning is performed. If launched from command line with parameter --no-scan, it does not crash. However, you cannot do anything useful. When you start a manual scan, it crashes immediately. Also, smartctl works fine...

Revision history for this message
Vlad Orlov (monsta) wrote :

Guys, if you can still reproduce this crash in Ubuntu 20.04 and later, please tell your version of Ubuntu and the desktop environment you have.

The desktop environment itself isn't the cause for the crash, it's just that some desktops in some Ubuntu versions trigger the crash and some don't. It's needed just for reproducing the crash.

Revision history for this message
Oliver (ok23) wrote :

I do not have Ubuntu as such. I have Linux Mint (I know, now comes the standard answer "tell this your distro", but Mint draws this directly from Ubuntu repos.

My Mint is 20.1 (Tara), the repo is Ubuntu (archive.ubuntu.com/ubuntu), Bionic. Drawn from Universe, version is 1.1.3-1, which is currently listed as the latest.

My desktop is Cinnamon (3.8.9-tara), running on x11 (Xorg 1.19.6). If you want more inxi info, just tell me.

Thanks

Revision history for this message
Oliver (ok23) wrote :

And some add'l info: These crashes only occur since I got version 1.1.3, which I got when I upgraded from Sonya to Tara. I cannot reproduce which version of gsmartcontrol was present on Sonya. But I do see that the command line version (smartctl 7.0 2018-12-30 r4883) doesn't crash, and I can launch gsmartcontrol from command line, where it doesn't crash when started with --no-scan, but then of course it doesn't scan. When gsmartcontrol is launched successfully this way, it immediately crashes when a scan gets manually invoked.

Revision history for this message
Vlad Orlov (monsta) wrote :

Ah, I hoped it would be some Ubuntu release, to make a test case for SRU. [1]
So far, I can reproduce it either in Mint 20.3 (with MATE 1.26) or in Ubuntu MATE 20.04 with Fresh MATE PPA added [2] (again, for MATE 1.26). Not sure if a PPA would be allowed for SRU testing, though I can try.

[1] https://wiki.ubuntu.com/StableReleaseUpdates#SRU_Bug_Template
[2] https://launchpad.net/~ubuntu-mate-dev/+archive/ubuntu/fresh-mate

Revision history for this message
Oliver (ok23) wrote :

Sorry to disappoint you :-)

But I am grateful you did not respond with the standard "tell it to your own distro", thanks!

But since you can reproduce with 20.3 MATE as the desktop, this means it's not about Cinnamon...

Revision history for this message
Vlad Orlov (monsta) wrote :

The desktop environment only matters for triggering the crash: it's a random crash, it's been happening for years in various distros with various desktops. It's already fixed in GSmartControl upstream.

https://github.com/ashaduri/gsmartcontrol/issues/13
https://github.com/ashaduri/gsmartcontrol/commit/939914a5ab31cad3e73ad8105b46245bd7abe88f

Revision history for this message
Vlad Orlov (monsta) wrote :
Revision history for this message
Vlad Orlov (monsta) wrote :

[Impact]

GSmartControl segfaults on start while scanning devices, making
the app useless. According to the upstream author, it happens due to
using some incomplete data while rendering the icons (the device scan
triggers that process).

The patch from the upstream commit fixes it, so it would be nice
to add it to the stable release.

[Test Plan]

1. Have Ubuntu MATE 20.04.
2. Add the official PPA for MATE 1.26 - ppa:ubuntu-mate-dev/fresh-mate.
3. Update the packages that are built from src:mate-desktop and
src:mate-settings-daemon to 1.26. These are enough for reproducing.
Usually these should be mate-desktop, mate-desktop-common, libmate-desktop-2-17,
gir1.2-matedesktop-2.0, mate-settings-daemon, mate-settings-daemon-common.
4. Log out and log in back.
5. Start GSmartControl.

[Where problems could occur]

In theory, if the logic to protect against using incomplete data happens
to be over-protective in some situation, there might be some missing icons
or menu items in the UI.

Vlad Orlov (monsta)
tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for working on this, has this been fixed in releases later than Ubuntu 20.04?

Changed in gsmartcontrol (Ubuntu):
importance: Undecided → High
Revision history for this message
Vlad Orlov (monsta) wrote :

No, they all have the same version as in Focal, 1.1.3-2build1.

However, I've uploaded the patch to Debian bug report, and today the patched version was uploaded to Debian Unstable. So it will be synced to Jammy sooner or later.

https://bugs.debian.org/942427

Changed in gsmartcontrol (Debian):
status: Unknown → Fix Released
Revision history for this message
Vlad Orlov (monsta) wrote :

Well, looks like the patched version is synced from Debian to Jammy by now.

Stephen Kitt (steve-sk2)
Changed in gsmartcontrol (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.