Bug#1019952: gnome-disk-utility: segfault in libudisks2.so.0.0.0

2022-10-09 Thread Bernhard Übelacker

Hello piorunz,
I tried to get some more information from your dmesg line and think
the crash takes place in function udisks_drive_ata_get_smart_enabled.

I could not find any crashes related to this function in udisks2
upstream bug tracker, but gnome-disks upstream tracker
contains [56], that might be related.

To be sure it would be good if you could generate a backtrace
of the crash.
For this is might be already sufficient to install systemd-coredump [1].
Then the segfault line should be followed more information
about the crash in the journal.

Kind regards,
Bernhard







[74281.147838] gnome-disks[2098897]: segfault at a0 ip 7f7b10aeefc8 sp
7ffd5bd91c48 error 4 in libudisks2.so.0.0.0[7f7b10adb000+53000]
[74281.147852] Code: e9 0d ce fe ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 53
48 89 fb e8 77 c3 fe ff 48 8b 3b 48 89 c6 e8 bc c0 fe ff 48 89 df 5b <48> 8b 80
a0 00 00 00 ff e0 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44



(gdb) find /b 0x77022960, 0x7707392f, 0xe9, 0x0d, 0xce, 0xfe, 
0xff, 0x66, 0x2e, 0x0f, 0x1f, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 
0x00, 0x53, 0x48, 0x89, 0xfb, 0xe8, 0x77, 0xc3, 0xfe, 0xff, 0x48, 0x8b, 0x3b, 
0x48, 0x89, 0xc6, 0xe8, 0xbc, 0xc0, 0xfe, 0xff, 0x48, 0x89, 0xdf, 0x5b, 0x48, 
0x8b, 0x80, 0xa0, 0x00, 0x00, 0x00, 0xff, 0xe0, 0x66, 0x2e, 0x0f, 0x1f, 0x84, 
0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x44
0x77034f9e 
1 pattern found.
(gdb) b * (0x77034f9e + 42)
Breakpoint 2 at 0x77034fc8: file ./udisks/udisks-generated.c, line 9308.
(gdb) info b
Num Type   Disp Enb AddressWhat
2   breakpoint keep y   0x77034fc8 in 
udisks_drive_ata_get_smart_enabled at ./udisks/udisks-generated.c:9308
(gdb) disassemble /r 0x77034f9e, 0x77034f9e + 62
Dump of assembler code from 0x77034f9e to 0x77034fdc:
   0x77034f9e :e9 0d ce fe 
ff  jmp0x77021db0 
   0x77034fa3:  66 2e 0f 1f 84 00 00 00 00 00   cs nopw 0x0(%rax,%rax,1)
   0x77034fad:  0f 1f 00nopl   (%rax)
   0x77034fb0 :   53  
push   %rbx
   0x77034fb1 :   48 89 fb
mov%rdi,%rbx
   0x77034fb4 :   e8 77 c3 fe ff
  call   0x77021330 
   0x77034fb9 :   48 8b 3b
mov(%rbx),%rdi
   0x77034fbc :  48 89 c6
mov%rax,%rsi
   0x77034fbf :  e8 bc c0 fe ff
  call   0x77021080 
   0x77034fc4 :  48 89 df
mov%rbx,%rdi
   0x77034fc7 :  5b  
pop%rbx
   0x77034fc8 :  48 8b 80 a0 00 00 00mov
0xa0(%rax),%rax   
   0x77034fcf :  ff e0   
jmp*%rax
   0x77034fd1:  66 2e 0f 1f 84 00 00 00 00 00   cs nopw 0x0(%rax,%rax,1)
   0x77034fdb:  0f 1f 44 00 00  nopl   0x0(%rax,%rax,1)
End of assembler dump.

  9305  gboolean
  9306  udisks_drive_ata_get_smart_enabled (UDisksDriveAta *object)
  9307  {
  9308return UDISKS_DRIVE_ATA_GET_IFACE (object)->get_smart_enabled 
(object);
  9309  }


[56] https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/issues/56

[1] https://wiki.debian.org/HowToGetABacktrace



Bug#1019952: gnome-disk-utility: segfault in libudisks2.so.0.0.0

2022-09-16 Thread piorunz
Package: gnome-disk-utility
Version: 43~rc-1
Severity: normal
X-Debbugs-Cc: pior...@gmx.com

Dear Maintainer,

Managed to crash Gnome Disks today. My computer allows to plug and unplug SATA
drives in and out, no problem, just like they were USB drives. I use this
feature all the time when I need it. Debian has no problem with that,
everything is detected in dmesg and it works.

But Gnome Disks has crashed today when I forcibly removed one SATA drive.
Dmesg log:

[74280.712568] ata5: SATA link down (SStatus 0 SControl 300)
[74280.712577] ata5.00: disable device
[74280.712591] ata5.00: detaching (SCSI 4:0:0:0)
[74280.766384] sd 4:0:0:0: [sdb] Synchronizing SCSI cache
[74280.766404] sd 4:0:0:0: [sdb] Synchronize Cache(10) failed: Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[74280.766405] sd 4:0:0:0: [sdb] Stopping disk
[74280.766408] sd 4:0:0:0: [sdb] Start/Stop Unit failed: Result:
hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[74281.147838] gnome-disks[2098897]: segfault at a0 ip 7f7b10aeefc8 sp
7ffd5bd91c48 error 4 in libudisks2.so.0.0.0[7f7b10adb000+53000]
[74281.147852] Code: e9 0d ce fe ff 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 53
48 89 fb e8 77 c3 fe ff 48 8b 3b 48 89 c6 e8 bc c0 fe ff 48 89 df 5b <48> 8b 80
a0 00 00 00 ff e0 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44

I can plug in and out this drive, it always work perfectly, but Disks is
crashing sometimes when I do it. Please look into it, Gnome Disks should
gracefully handle all plugging and unplugging, just like kernel does.


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.19.0-1-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages gnome-disk-utility depends on:
ii  dconf-gsettings-backend [gsettings-backend]  0.40.0-3
ii  libatk1.0-0  2.38.0-1
ii  libc62.34-7
ii  libcairo21.16.0-6
ii  libcanberra-gtk3-0   0.30-10
ii  libdvdread8  6.1.3-1
ii  libgdk-pixbuf-2.0-0  2.42.9+dfsg-1
ii  libglib2.0-0 2.73.3-3
ii  libgtk-3-0   3.24.34-3
ii  libhandy-1-0 1.7.90-1
ii  liblzma5 5.2.5-2.1
ii  libnotify4   0.8.1-1
ii  libpango-1.0-0   1.50.9+ds-1
ii  libpangocairo-1.0-0  1.50.9+ds-1
ii  libpwquality11.4.4-1+b1
ii  libsecret-1-00.20.5-3
ii  libsystemd0  251.4-3
ii  libudisks2-0 2.9.4-3
ii  udisks2  2.9.4-3

gnome-disk-utility recommends no packages.

gnome-disk-utility suggests no packages.

-- no debconf information