Linux Lite Forums

Hardware - Support => Hard Drives and SSDs => Topic started by: ian_r_h on November 19, 2018, 06:04:31 AM

Title: System freeze on ejecting USB stick
Post by: ian_r_h on November 19, 2018, 06:04:31 AM
Hi, all,

Just a heads up at the moment, and a bare bones description until I can spend a bit more time explaining the problem and researching it.  This is on a production laptop, so until I can update my test laptop you can understand my reluctance to test it again!  But I'll research online and go through the log files.

Basic description of problem:  (After a file copy operation in Thunar) Upon ejecting a USB stick using the left menu column eject icon in Thunar, the mouse cursor changes to busy and then system immediately goes into complete freeze requiring a hard reset.  After boot, the last file written to the hard drive manually (in this case a text file containing verification SHA256 values I calculated on the USB stick file copies) is 0 bytes in size.  Causes no known problems in the linux build on the laptop and does not corrupt the files on the USB stick.

Problem occurs immediately following update from 20181019 4.4.0-136-generic # 162 to OS below (both LL3.8).  However one USB stick had ejected fine after a copy FROM usb (i.e., without writing to the USB stick) - so the issue may be restricted to a specific make and size or to write to usb operations.

OS version:  (LL3.8) Linux linux01 4.4.0-140-generic #166-Ubuntu SMP Wed Nov 14 20:09:47 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Thunar version:  1.6.11
Unaffected USB stick (read from only):  KINGSTON DataTraveller G4 64GB (brand new).
Affected USB sticks (two separate ones after write to, but having performed flawlessly for over 30 cycles each):  KINGSTON DataTraveller G4 16GB.

Not tested ejecting USB stick from terminal or partition drives menu option.

Having booted the laptop after each freeze with the USB stick still physically connected and manually re-verifying the SHA256 values of the files on both the HD and USB (which were correct), the USB stick ejected without problem from Thunar - which suggests to me the issue is related to copying files from HD to USB via Thunar.

Haven't tried copying files from HD to USB stick from terminal.

Thanks for reading.
Title: Re: System freeze on ejecting USB stick
Post by: ian_r_h on November 19, 2018, 06:05:36 AM
Should add that I am NOT running linux from the ejected USB stick(s)  :)

It is a standard build on HD, booted from HD - except that the HD is encrypted.  Laptop has performed flawlessly for over a year.
Title: Re: System freeze on ejecting USB stick
Post by: ian_r_h on November 19, 2018, 06:06:33 AM
Also, does not affect ejecting DVDs from Thunar in the same fashion, after burning files to DVD via Xfburn.
Title: Re: System freeze on ejecting USB stick
Post by: ian_r_h on November 19, 2018, 06:07:31 AM
Version is 3 point 8 - which the original post seems to have converted to  8) oddly.
Title: Re: System freeze on ejecting USB stick
Post by: ian_r_h on November 24, 2018, 07:37:01 AM
This seems to be a problem that comes up from time to time in Linux, dating back at least a couple of years.  Which is not to say that the underlying cause is necessarily related.  But it does suggest a few things to try to begin with.  Since I have two production laptops I use in monthly rotation and the alternate is just over a month out of date, I can fail over to that if needs be.  So I will try the suggestions, one by one, on the problematic and up-to-date laptop:-

1.  Use a terminal and the umount /dev/sdxx command, where sdxx is the ID for the USB stick.  If it freezes, then it rules out Thunar and/or X as the culprit.
2.  Next, try dismounting the USB stick in Start/System/Partition Drives (I can't recall the app's name).  If it doesn't freeze then it may suggest Thunar, rather than X, is the culprit.

If at either point there is a system freeze, try opening a virtual console (CTRL-ALT-F1 ?).  Also, if X is suspected, try restarting X (CTRL-ALT-BACKSPACE ?).

3.  Also, but I would need expert help here, try LEFT-SHIFT during boot an selecting the previous kernel and see if it still freezes using Thunar as normal, and then try "kernel bisection search" - whatever that is!

Onwards...
Title: Re: System freeze on ejecting USB stick
Post by: ian_r_h on November 27, 2018, 05:25:10 AM
More info, that I cannot find any obvious errors in the syslog for the affected times - only thing mildly of note is that there are no log entries between the system freeze time and the hard restart time.  But that was only a couple of minutes.

Onwards...
Title: Re: System freeze on ejecting USB stick
Post by: ian_r_h on December 08, 2018, 07:22:40 AM
Hi, all,

I seem to be hitting another Linux Learning Curve(!), and need to ask for a bit of help, please.

From what I've read it looks like I should try the following:-


But I need a bit of help with some of this please.

The Ubuntu keyboard shortcut to restart X is CTRL-ALT-BACKSPACE.  However, this is disabled by default in Ubuntu but re-enabled in Gnome in the keyboard settings:-


It's butting up against my terminal command knowledge at that point.

Thanks,
Ian  :)
Title: Re: System freeze on ejecting USB stick
Post by: firenice03 on December 08, 2018, 10:09:21 AM
Quote
But I need a bit of help with some of this please.The Ubuntu keyboard shortcut to restart X is CTRL-ALT-BACKSPACE.  However, this is disabled by default in Ubuntu but re-enabled in Gnome in the keyboard settings:-
  • Is CTRL-ALT-BACKSPACE enabled or disabled in LL3.8?
  • There seems to be no setting I can find in the keyboard settings in LL/XFCE to enable the shortcut if it is disabled, in which case how can I enable or how do I assign a shortcut?
  • How could I try restarting X should I be able to open a virtual console?

So not 100% these are exactly what you're needing but may give aid till others arrive :) 

- If you're in terminal; the reboot command will initiate a system reboot..
- Using the command startx should initiate the gui from a tty session; Ctrl Alt F7 should as well, whereas Ctrl Alt F1-F6 are other tty's


Code: [Select]
reboot
startx
Title: Re: System freeze on ejecting USB stick
Post by: ian_r_h on December 09, 2018, 04:17:06 AM
Thank you.  :)
Title: Re: System freeze on ejecting USB stick
Post by: ian_r_h on December 14, 2018, 07:53:48 AM
I have run sensors on the affected laptop.

The typical temperature in idle-ish operation is about 46C, and in typically the most pushed it gets (here, when compressing to .tar.gz) is about 50C.  These look normal to me, based on Windows experience anyway.

I also booted the LL3.8 DVD and ran the memtest utility.  Assuming it is correct to do so without changing any parameters (and noting it gives the impression of testing only 32bit patterns), then it reported no errors.

I've now swapped the affected laptop over to backup, and updated my other laptop and moved that into operational use - something I do monthly.

This means, Christmas notwithstanding, I can safely test the USB on the affected laptop without risking live data.  It also means that I can see whether the same fault now develops on the in-cycle laptop now it too has been updated, which has near-identical or identical specs.