1

Ubuntu 16.04 LTS 4.13.0-39-generic/4.13.0-40-generic/4.13.0-41-generic

If I keep my laptop with Ubuntu (dual boot) on for a long time (like overnight), it suddenly starts giving "insufficient permissions for device" problem. At this point, nothing can be downloaded or saved since all folders and files get a lock-symbol. However, I can use Ubuntu but any changes I make (or files I create) are temporary. This problem is repeatable every time I leave it on overnight.

On rebooting, I am asked to do a manual fsck. The fsck process deletes some inodes. After the fsck process (and another reboot), I find that the disk has been rolled-back to the point before the problem occurred.

The ps -A|grep apt command draws a blank, and the deleting the lock file does not help either.

I have included pictures of what happens when I reboot, and have run fsck on the Ubuntu partition to fix it.

Pic1-Running fsck on Ubuntu partition to fix it after reboot. Pic2-End of fsck on Ubuntu partition. Need to reboot again.

I'm not sure if this is related, but I have had Anaconda-python installed since the beginning, and most of the times I need to run fsck (except this time) I see that a lot of changes are made to only the Anaconda folder's py/pyc files. Could Anaconda be trying to update automatically every 12 hours and locking the file system, or something?

  • I think this is a permission issue when it tries to sleep and spin down the hdd. Are you using xubuntu? – chaskes Jun 01 '18 at 17:35
  • I don't know what is xubuntu. Here are the output of some commands on my system - $ cat /etc/issue: Ubuntu 16.04.4 LTS \n \l

    $ lsb_release -a: No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial

    – user3458431 Jun 01 '18 at 17:49
  • Ok, plus the problem I've seen before and was thinking of prevents sleep entirely, so unless it stays awake overnight it's not that anyway. – chaskes Jun 01 '18 at 17:51
  • Thank you for replying! What do you suggest I do? – user3458431 Jun 01 '18 at 17:53
  • Keep searching the site and wait for more people to see the question. :) – chaskes Jun 01 '18 at 17:54
  • 1
    I too agree with chaskes. Is the drive external? or internal? I've seen drives try and power-save due to inactivity by themselves so errors occur when the OS tells it to do things which it misses [because the drive powered itself down]. The label /dev/sda implies its probably internal though, and I've only seen it on external drives. If internal, I'd suggest checking the health of the drive itself (smartctl) – guiverc Jun 29 '18 at 01:07
  • The drive is internal. The problem occurs based on the kernel version I boot with. It never happened before 4.13.0-39-generic. With 4.13.0-39-generic, 4.13.0-41-generic and 4.13.0-43-generic, it would happen after being on for a long time. With 4.13.0-45-generic, it happens immediately every time. It is definitely a problem in the newer kernel versions, but Ubuntu is trying to ignore the problem for now. 4.13.0-41-generic and 4.13.0-43-generic also had problems with a disappearing Wifi interface for several users. – user3458431 Jun 29 '18 at 12:52
  • Apparently, this problem started occurring in 2016, see the following link: https://askubuntu.com/questions/697190/fsck-error-on-boot-dev-sda6-unexpected-inconsistency-run-fsck-manually – user3458431 Jun 30 '18 at 18:12

1 Answers1

0

I am not sure of the problem here did you try killing things which may have blocked the system somewhere. Try the command "ps -A | grep apt" and then kill according to PID no. at the first of each, just for example there is an output-:

13431 pts/1 ............

13433 pts/1.............

then simply run according to PID number

sudo kill -9 13431

sudo kill -SIGKILL 13431

Jatin-CBS
  • 667
  • Thank you! I will try it out tomorrow morning (after again leaving the laptop on overnight) and revert back here. Good reasoning though, that the package-manager maybe holding a lock on the filesystem. – user3458431 Jun 01 '18 at 18:52
  • hmm you can also try to simply kill the lock directory $ sudo rm /var/lib/dpkg/lock and then sudo dpkg --configure -a but first try with the above solution by simply killing the processes rather then the file – Jatin-CBS Jun 01 '18 at 19:07
  • The "ps -A|grep apt" command did not list any processes. Removing the lock file and configuring with dpkg did not help either. I have edited my initial post to include photos of the fsck process on the Ubuntu partition I used today to fix the system again. – user3458431 Jun 02 '18 at 23:12
  • I have added another thing I had noticed into the initial post, which is: I'm not sure if this is related, but I have had Anaconda-python installed since the beginning, and most of the times I need to run fsck (except this time) I see that a lot of changes are made to only the Anaconda folder's py/pyc files. Could Anaconda be trying to update automatically every 12 hours and locking the filesystem, or something? – user3458431 Jun 02 '18 at 23:21