FS#57398 - [gsmartcontrol] Segfault on launch

Attached to Project: Community Packages
Opened by jerem (jerem1313) - Tuesday, 06 February 2018, 19:35 GMT
Last edited by Jelle van der Waa (jelly) - Sunday, 13 December 2020, 19:06 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jelle van der Waa (jelly)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hi maintainers.

Problem with version 1.1.3-1.
The software starts and closes instantly.
by launching it via the terminal with the command

gsmartcontrol-root -v

I get this

<dump> [app] Application options:
<dump> [app] locale: 1
<dump> [app] version: 0
<dump> [app] hide_tabs: 1
<dump> [app] scan: 1
<dump> [app] arg_add_virtual: [empty]
<dump> [app] arg_add_device: [empty]
<dump> [app] arg_gdk_scale: nan
<dump> [app] arg_gdk_dpi_scale: nan
<dump> [app] LibDebug options:
<dump> [app] levels_enabled: 11111
<dump> [app] debug_colorize: true
<dump> [app] {anonymous}::app_init_config(): Global config file: "/usr/etc/gsmartcontrol.conf"
<dump> [app] {anonymous}::app_init_config(): Local config file: "/root/.config/gsmartcontrol/gsmartcontrol.conf"
<dump> [app] {anonymous}::app_init_config(): Old local config file: "/root/.gsmartcontrolrc"
<info> [rmn] Loading under "/config" from file "/root/.config/gsmartcontrol/gsmartcontrol.conf".
<dump> [rconfig] / [3] /
config [4] /config
gui [3] /config/gui
info_window [3] /config/gui/info_window
default_size_w [3] /config/gui/info_window/default_size_w 975
default_size_h [3] /config/gui/info_window/default_size_h 722
main_window [3] /config/gui/main_window
default_size_w [3] /config/gui/main_window/default_size_w 1 584
default_size_h [3] /config/gui/main_window/default_size_h 823
default_pos_x [3] /config/gui/main_window/default_pos_x 0
default_pos_y [3] /config/gui/main_window/default_pos_y 38
default [4] /default
<info> [rconfig] Setting autosave config file to "/root/.config/gsmartcontrol/gsmartcontrol.conf"
<info> [rconfig] Starting config autosave with 180 sec. interval.
<info> [app] Current C locale: fr_FR.utf8
<info> [app] Current C++ locale: fr_FR.utf8
<dump> [default] ENTER: "Cmdex::execute()"
<info> [app] Cmdex::execute(): Executing "'smartctl' -V".
<dump> [default] EXIT: "Cmdex::execute()"
<dump> [default] ENTER: "Cmdex::stopped_cleanup()"
<dump> [default] ENTER: "Cmdex::unset_stop_timeouts()"
<dump> [default] EXIT: "Cmdex::unset_stop_timeouts()"
<dump> [default] EXIT: "Cmdex::stopped_cleanup()"
<dump> [default] ENTER: "Cmdex::stopped_cleanup()"
<info> [app] StorageDetector::detect(): Starting drive detection.
<info> [app] {anonymous}::detect_drives_linux_proc_partitions(): Detecting drives through partitions file (/proc/partitions by default; set "system/linux_proc_partitions_path" config key to override).
<dump> [app] {anonymous}::read_proc_file(): File contents ("/proc/partitions"):
major minor #blocks name

8 0 732574584 sda
8 1 52428800 sda1
8 2 52428800 sda2
8 3 627715072 sda3
8 16 244198584 sdb
8 17 513024 sdb1
8 18 122558464 sdb2
8 19 121125888 sdb3
11 0 1048575 sr0

<dump> [default] ENTER: "Cmdex::execute()"
<info> [app] Cmdex::execute(): Executing "'smartctl' --info --health --capabilities '/dev/sda'".
<dump> [default] EXIT: "Cmdex::execute()"
<dump> [default] ENTER: "Cmdex::stopped_cleanup()"
<dump> [default] ENTER: "Cmdex::unset_stop_timeouts()"
<dump> [default] EXIT: "Cmdex::unset_stop_timeouts()"
<dump> [default] EXIT: "Cmdex::stopped_cleanup()"
<info> [app] Added drive /dev/sda.
<dump> [default] ENTER: "Cmdex::execute()"
<info> [app] Cmdex::execute(): Executing "'smartctl' --info --health --capabilities '/dev/sdb'".
<dump> [default] EXIT: "Cmdex::execute()"
<dump> [default] ENTER: "Cmdex::stopped_cleanup()"
<dump> [default] ENTER: "Cmdex::unset_stop_timeouts()"
<dump> [default] EXIT: "Cmdex::unset_stop_timeouts()"
<dump> [default] EXIT: "Cmdex::stopped_cleanup()"
<info> [app] Added drive /dev/sdb.
<dump> [default] ENTER: "Cmdex::execute()"
<info> [app] Cmdex::execute(): Executing "'smartctl' --info --health --capabilities '/dev/sr0'".
<dump> [default] EXIT: "Cmdex::execute()"
<dump> [default] ENTER: "Cmdex::stopped_cleanup()"
<dump> [default] ENTER: "Cmdex::unset_stop_timeouts()"
<dump> [default] EXIT: "Cmdex::unset_stop_timeouts()"
<warn> [hz] Warning: exit: Device open failed, or device did not return an IDENTIFY DEVICE structure.
<dump> [default] EXIT: "Cmdex::stopped_cleanup()"
<info> [app] Added drive /dev/sr0.
<dump> [default] ENTER: "Cmdex::stopped_cleanup()"
<info> [app] {anonymous}::detect_drives_linux_3ware(): Detecting drives behind 3ware controller(s)...
<dump> [app] {anonymous}::read_proc_file(): File contents ("/proc/devices"):
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
21 sg
29 fb
81 video4linux
116 alsa
128 ptm
136 pts
180 usb
189 usb_device
226 drm
243 aux
244 hidraw
245 media
246 mei
247 bsg
248 hmm_device
249 watchdog
250 rtc
251 dax
252 dimmctl
253 ndctl
254 gpiochip

Block devices:
8 sd
11 sr
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
259 blkext

<info> [app] {anonymous}::detect_drives_linux_3ware(): No 3ware-specific entries found in devices file.
<info> [app] {anonymous}::detect_drives_linux_areca(): Detecting drives behind Areca controller(s)...
<dump> [app] {anonymous}::read_proc_file(): File contents ("/proc/scsi/scsi"):
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: TOSHIBA MQ01ABD0 Rev: 3M
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: ATA Model: Crucial_CT250MX2 Rev: MU04
Type: Direct-Access ANSI SCSI revision: 05
Host: scsi5 Channel: 00 Id: 00 Lun: 00
Vendor: TSSTcorp Model: CDDVDW SN-208DN Rev: TF01
Type: CD-ROM ANSI SCSI revision: 05

<info> [app] {anonymous}::detect_drives_linux_areca(): No Areca-specific entries found in SCSI file.
<info> [app] {anonymous}::detect_drives_linux_adaptec(): Detecting drives behind Adaptec controller(s)...
<info> [app] {anonymous}::detect_drives_linux_adaptec(): No Adaptec-specific entries found in devices file.
<info> [app] {anonymous}::detect_drives_linux_cciss(): Detecting drives behind HP RAID (CCISS) controller(s)...
<info> [app] {anonymous}::detect_drives_linux_cciss(): No cciss-specific entries found in devices file.
<info> [app] {anonymous}::detect_drives_linux_hpsa(): Detecting drives behind HP RAID (hpsa/hpahcisr) controller(s)...
<dump> [app] {anonymous}::read_proc_file(): File contents ("/proc/scsi/sg/devices"):
0 0 0 0 0 1 31 0 1
1 0 0 0 0 1 31 0 1
5 0 0 0 5 1 1 0 1

<info> [app] {anonymous}::detect_drives_linux_hpsa(): No hpsa/hpahcisr-specific entries found in Sg devices file.
<dump> [default] ENTER: "Cmdex::stopped_cleanup()"
<info> [app] Found device: /dev/sda.
<info> [app] Found device: /dev/sdb.
<info> [app] Found device: /dev/sr0.
<info> [app] StorageDetector::detect(): Drive detection finished.
<info> [app] Retrieving basic information about the device...
<dump> [app] Device information for /dev/sda (type: ""):
<dump> [app] Model: TOSHIBA MQ01ABD075
<dump> [app] Detected type: unknown
<dump> [app] SMART status: Enabled
<info> [app] Retrieving basic information about the device...
<dump> [app] Device information for /dev/sdb (type: ""):
<dump> [app] Model: Crucial_CT250MX200SSD1
<dump> [app] Detected type: unknown
<dump> [app] SMART status: Enabled
<info> [app] Retrieving basic information about the device...
<dump> [app] Device information for /dev/sr0 (type: ""):
<dump> [app] Model: CDDVDW SN-208DN
<dump> [app] Detected type: unknown
<dump> [app] SMART status: Unsupported
<dump> [default] ENTER: "Cmdex::stopped_cleanup()"
/usr/sbin/gsmartcontrol-root : ligne 167 : 3149 segmentation error (core dumped)pkexec --disable-internal-agent /usr/sbin/gsmartcontrol "-v"

this line reports a "Warning"
<warn> [hz] Warning: exit: Device open failed, or device did not return an IDENTIFY DEVICE structure.

and in dmesg I have this line
gsmartcontrol [2906]: segfault at 0 ip 0000558c8645147d sp 00007ffdfe64b240 error 4 in gsmartcontrol [558c8638e000 + 1bf000]

Installing version 1.1.0-1 from Archlinux archives solved the problem.
Gsmartcontrol starts without any problem.

I have two hard drives in the machine (a Toshiba HDD, and a Crucial SSD)
The bug is known?

I use ArchLinux Cinnamon kernel lts (completely up to date).

Regards.
This task depends upon

Closed by  Jelle van der Waa (jelly)
Sunday, 13 December 2020, 19:06 GMT
Reason for closing:  Works for me
Comment by Jelle van der Waa (jelly) - Thursday, 08 February 2018, 07:58 GMT
I can't reproduce the issue, are you running testing? What kernel exactly are you using?
Comment by Alexander Shaduri (alex_sh) - Thursday, 08 February 2018, 09:55 GMT
Hi jerem,

Can you please try 1.1.2 to see if it has the same issue (if it's available in Arch)?

Since it's not reproduceable, I don't think it can be fixed without getting a backtrace from you.
https://wiki.archlinux.org/index.php/Debug_-_Getting_Traces

Thanks,
Alexander
Comment by jerem (jerem1313) - Thursday, 08 February 2018, 11:25 GMT
Hi

I'm using kernel 4.14.17-1-lts
Cinnamon 3.6 desktop environment

1) I tried to recompile the Gsmartcontrol 1.1.3-1 package by recovering the sources = compilation failure.

2) recompile following the pkgbuild here
https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/gsmartcontrol
Failure also during compilation (version 1.1.3-1)

3) I installed the gsmarcontrol-svn package available in AUR, failure during compilation, problem in (build)

Error messages when compiling told me that they couldn't find the directories.
usr/bin/gsmartcontrol-root
usr/bin/gsmartcontrol_polkit

But version 1.1.0-1 (recovered in the Archlinux archives) works without any problems.
Alexander, version 1.1.2 is not in the ArchLinux archives.
I'll get the sources here.
https://sourceforge.net/projects/gsmartcontrol/files/1.1.2/gsmartcontrol-1.1.2.tar.bz2/download
and I'm trying this.

and for debugging I've never done it before.
I'll try all this as soon as I have some time for myself (very busy right now)
Comment by jerem (jerem1313) - Thursday, 08 February 2018, 11:52 GMT
compiling version 1.1.2 causes me to make the same error as version 1.1.3, for example a dmesg line.

6386.632082] gsmartcontrol[21086]: segfault at 0 ip 0000564a1f56ba1a sp 00007ffd66e05430 error 4 in gsmartcontrol[564a1f4a9000+1bc000]: segfault at 0 ip 0000564a9000+1bc000

while the compilation of version 1.1.1 runs smoothly, and the software runs smoothly, for proof ;)
https://www.pixenli.com/image/nzjNfRV8

I don't understand what's wrong..
an dependencie problem with Cinnamon 3.6 maybe??
because with Cinnamon 3.4 it worked very well, and on Debian Sid with Cinnamon 3.4 and gsmartcontrol 1.1.3 everything works fine...
Comment by Alexander Shaduri (alex_sh) - Thursday, 08 February 2018, 12:08 GMT
Generally, I'm against using gsmartcontrol-svn, and I urge the packager maintainers to remove this package. It's not intended for public usage at all, it may not compile or work, it may screw up your data, etc... The SVN version is in the middle of active refactoring/rewrite right now, so nothing is guaranteed at all.

The difference between 1.1.1 and 1.1.2 is HiDPI support. I suspect it has something to do with the rendering of drive icons. Could be something in gtk/gtkmm.
Unfortunately, without a backtrace I can't do anything. It's not an urgent issue (I've had no other reports of this problem so far), so whenever you have time...

Thanks, I appreciate your help,
Alexander
Comment by Jelle van der Waa (jelly) - Thursday, 08 February 2018, 12:16 GMT
Ah HiDPI, I have no such hardware so can't really test it. As for gsmartcontrol-svn, we don't have this package in our repositories.
Comment by jerem (jerem1313) - Wednesday, 14 February 2018, 10:40 GMT
hi maintainers

On my ArchLinux, I have Cinnamon and Mate, and for some unknown reason, Gsmartcontrol (version 1.1.3-1) works very well with the Mate environment...
And after a Cinnamon downgrade in version 3.4, Gsmartcontrol (1.1.3-1) works very well...

So the problem doesn't come from Gsmartcontrol but from Cinnamon, so what exactly is the problem??
I don't really know... I'm gonna have to look a little bit.
Comment by Edênis Freindorfer Azevedo (denisfa) - Thursday, 26 April 2018, 21:38 GMT
Hey, I was having the same problem as you. I am running xfce4-git from AUR packages (because GTK3) and, since 1.1.2, gsmartcontrol was not working.

My workaround was creating the file "$XDG_CONFIG_HOME/gtk-3.0/settings.ini" like suggested by "https://wiki.archlinux.org/index.php/GTK+#Basic_theme_configuration":

cat <<EOF > $XDG_CONFIG_HOME/gtk-3.0/settings.ini
[Settings]
gtk-icon-theme-name = Adwaita
gtk-theme-name = Adwaita
gtk-font-name = DejaVu Sans 11
EOF

I logout, login and gsmartcontrol was working again. Hope this helps anyone.
Comment by Walter Bishop (kaymio) - Sunday, 24 February 2019, 08:53 GMT
Here another output of a crash under Cinnamon 4.0.9 with Kernel 4.20.11-zen2 Here are the full specs of my computer https://8n1.org/14623/79a7

and here is the output of gsmartcontrol-root -v https://8n1.org/14622/b61a

Hope I could help to solve this issue.
Comment by Alexander Shaduri (alex_sh) - Sunday, 24 February 2019, 09:18 GMT
GSmartControl developer here.

I did get another similar crash report from a Manjaro/GNOME user.
No reports from users of other distros.
Makes me think this is something Arch-specific.
It looks like it's related to GtkIconView (which, by the way, seems to use deprecated gdk API internally, for some reason).

I can't promise anything, but I'll try to set up Arch in a VM in coming weeks and test it. Maybe I'll get lucky and be able to reproduce the crash.
Comment by Walter Bishop (kaymio) - Sunday, 24 February 2019, 09:38 GMT
It works for me under Manjaro with KDE Plasma 5.15 with a X session.

Hope you can fix gsmartcontrol. It's a very nice tool.
Comment by Jelle van der Waa (jelly) - Sunday, 24 February 2019, 10:58 GMT
Please note that Manjaro is a separate distro and not supported on this bugtracker. I have not faced the issue with i3 yet.
Comment by Walter Bishop (kaymio) - Sunday, 24 February 2019, 11:02 GMT
It works for me under Manjaro with KDE Plasma 5.15 with a X session.

Hope you can fix gsmartcontrol. It's a very nice tool.
Comment by mattia (nTia89) - Sunday, 13 December 2020, 17:13 GMT
I cannot reproduce the issue with latest software as of 2020-12-13 and GNOME

Loading...