LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-09-2024, 02:02 AM   #1
jwoithe
Member
 
Registered: Oct 2019
Posts: 75

Rep: Reputation: 99
Slackware 15.0: Fix for system crash caused by running "rescan-scsi-bus -r"


Running "rescan-scsi-bus -r" on a Slackware 15 system will immediately crash the system except if root is on an NVMe device (and even then, most other disk devices will become inaccessible). Due to a change in the format of the output produced by the "sg_inq" command, rescan-scsi-bus treats every SCSI or SCSI-like disk as if they were no longer present. Therefore if the "-r" option is supplied, every disk will be removed from the system. For most people this will include the root filesystem. The end result is a system which can no longer access its own disks. A hard reset is the only way to recover.

The problem has been fixed upstream in the sg3_utils project. See https://github.com/doug-gilbert/sg3_utils/pull/10 for the details and the patch.

I believe it is appropriate to address this issue in Slackware 15. As things stand, almost anyone who runs rescan-scsi-bus with the "-r" option will immediately crash their system - a result that is almost certainly not expected or desired. Slackware 15 currently ships sg3_utils 1.47. Shifting to version 1.48 (which includes the patch) is probably not feasible because it will result in a shared library version change, which would then force the rebuilding of other packages (sdparm, udisks and so on). It may therefore be necessary to cherrypick the patch from the above pull request and apply it to sg3_utils 1.47. It applies cleanly.

The problem does not affect current because it already has sg3_utils 1.48.
 
Old 05-09-2024, 05:56 PM   #2
jwoithe
Member
 
Registered: Oct 2019
Posts: 75

Original Poster
Rep: Reputation: 99
The bugfix patch has subsequently been included in the sg3_utils-1.47-x86_64-2_slack15.0.txz package update for 64-bit and 32-bit Slackware 15.0 (see ChangeLog entry dated Thu May 9 19:26:51 UTC 2024). Thanks Pat!
 
1 members found this post helpful.
Old 05-09-2024, 05:56 PM   #3
jwoithe
Member
 
Registered: Oct 2019
Posts: 75

Original Poster
Rep: Reputation: 99
The bugfix patch has subsequently been included in the sg3_utils-1.47-x86_64-2_slack15.0.txz package update for 64-bit and 32-bit Slackware 15.0 (see ChangeLog entry dated Thu May 9 19:26:51 UTC 2024). Thanks Pat!
 
1 members found this post helpful.
Old 05-14-2024, 05:46 PM   #4
ikocher
LQ Newbie
 
Registered: Jul 2022
Posts: 2

Rep: Reputation: 0
This bug also affects the installer.

For the last 2 days I have been trying to install Slackware15 on a Dell R720 with a PERC H710P mini, via iDRAC with /usb-and-pxe-installers/usbboot.img as virtual media, and when /var/lib/pkgtools/setup/setup.80.make-bootdisk runs after initial install, it trashes all SCSI devices.
I even tried to run it just after installer loads without running `setup`, same issue. Only reboot takes you out of this issue.
I tried --forcerescan aqnd --forceremove, and sda and sdb still do not come back.
The virtual media on sdc works OK after running rescan-scsi-bus.


In the end to be able to successfuly install:
1. run setup as usual
2. wait until a/pkgtools-15.0-noarch-42 is installed
3. `vi /mnt/var/lib/pkgtools/setup/setup.80.make-bootdisk`
3.1. comment the line where " /sbin/rescan-scsi-bus -l 1>$RDIR 2>$RDIR" is.
4. mv /sbin/rescan-scsi-bus /sbin/rescan-scsi-bus.no
4.1. call me paranoid


PERC H710P mini is reported in lspci as:
02:00.0 RAID bus controller: Broadcom / LSI MegaRAID SAS 2208 [Thunderbolt] (rev 05)
 
  


Reply

Tags
slackware 15.0



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PCI - Remove/Rescan vs. Rescan khhyle Linux - Kernel 1 04-28-2017 08:51 AM
PCI - Remove/Rescan vs. Rescan khhyle Linux - Hardware 1 04-27-2017 03:50 PM
Rescan SCSI bus in RHEL 5.8 RHCE_ran Linux - Enterprise 6 04-07-2015 09:43 AM
rescan-scsi-bus -l davimint Linux - Hardware 1 04-23-2007 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration