9

I have Lubuntu 16.10 installed on my disk mounted as /.

The problem is that the CUPS log file( /var/log/cups/error.log) grows all the time until I no have free space left on the disk...

So when I delete that file, the space on disk freed up again

I already tried:

  • fsck
  • disk usage analyzer
  • every apt-cleaning/autocleaning, and dependencies fixing.

How should I proceed?

du -sxh:

9,0G    .

Model: ATA ST3160815AS (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type      File system     Flags
 1      32,3kB  50,3GB  50,3GB  primary   ext4            boot
 2      50,3GB  160GB   110GB   extended
 5      50,3GB  158GB   108GB   logical   ext4
 6      158GB   160GB   2136MB  logical   linux-swap(v1)

parted --list && sudo df -h:

Model: ATA ST3160815AS (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system  Flags
 1      32,3kB  50,3GB  50,3GB  primary  ext4         boot
 2      50,3GB  160GB   110GB   primary  ext4


Filesystem      Size  Used Avail Use% Mounted on
udev            985M     0  985M   0% /dev
tmpfs           201M  6,3M  195M   4% /run
/dev/sda1        46G   43G  709M  99% /
tmpfs          1003M  188K 1003M   1% /dev/shm
tmpfs           5,0M  4,0K  5,0M   1% /run/lock
tmpfs          1003M     0 1003M   0% /sys/fs/cgroup
tmpfs           201M   36K  201M   1% /run/user/1000
/dev/sda2       101G   60M   96G   1% /media/aram/
David Foerster
  • 36,264
  • 56
  • 94
  • 147
  • Welcome to Ask Ubuntu! :-) What is the output of parted --list? Please [edit] your question to put this crucial info there instead of here in the comments where it's less visible. – Fabby Oct 12 '16 at 16:16
  • And what is in the log ? Fix the problem / error and your log will not get filled. – Panther Oct 12 '16 at 16:30
  • Thank you so much! In the same time my CPU is loaded 50% (Have duo-core 2.2Ghz) when lubuntu just works without any software. Looks like its something happening there with error-logging – Aram Martirosyan Oct 12 '16 at 16:33
  • I can't read that log already, because I've deleted it. It was about 30GB, and now file not exists and space still running low – Aram Martirosyan Oct 12 '16 at 16:34
  • I was tried that way also: remove access from foldre /var/log/cups, than give access again and error.log was appearing there. And now in that way its not works, can't get that log, and from disk analyzer info that only 6.5 GB is busy with software – Aram Martirosyan Oct 12 '16 at 16:39
  • deleted one partition, space running low – Aram Martirosyan Oct 12 '16 at 16:56
  • The core issue is that your main partition, /dev/sda1 where all your data, applications, etc., is at 97% usage. You may wish to go through your /home/ directory and remove files, or remove log files that're huge, etc. – Thomas Ward Oct 12 '16 at 17:05
  • Yes, I removed already every junk from there. – Aram Martirosyan Oct 12 '16 at 17:09
  • Now I just not able to locate that log file which I was deleted before. Its not appears in the same directory,. – Aram Martirosyan Oct 12 '16 at 17:10
  • This has nothing to do with the /home directory. The log file grows so quickly it will fill any available space. – laugh salutes Monica C Oct 16 '16 at 12:16

2 Answers2

5

I had the same problem. The log files grows very quickly and after a few hours it consumes all available space in /. At this point things start going really bad. Also the cups process hogs the CPU (100% in one core - that explains the 50% you see in a dual-cure).

Deleting the file at this point doesn't seem to help immediately. I guess the file is still in use by the cups process and it won't free the disk space... but after a reboot I got some free disk space and had time do investigate /var/log/cups/error_log.

Here's what I found in the first few lines

E [16/Oct/2016:09:48:02 +0300] MFCJ625DW: File \"/usr/lib/cups/filter/brother_lpdwrapper_mfcj625dw\" has insecure permissions (0100775/uid=0/gid=0).
E [16/Oct/2016:09:48:02 +0300] MFCJ625DW: Directory \"/usr/lib/cups/filter\" has insecure permissions (040775/uid=0/gid=0).
E [16/Oct/2016:09:48:02 +0300] MFCJ625DW: File \"/usr/lib/cups/filter/brother_lpdwrapper_mfcj625dw\" has insecure permissions (0100775/uid=0/gid=0).
E [16/Oct/2016:09:48:02 +0300] MFCJ625DW: Directory \"/usr/lib/cups/filter\" has insecure permissions (040775/uid=0/gid=0).
E [16/Oct/2016:09:48:03 +0300] Directory \"/usr/lib/cups/notifier\" has insecure permissions (040775/uid=0/gid=0).
W [16/Oct/2016:09:48:03 +0300] Notifier for subscription 1879 (dbus://) went away, retrying!
E [16/Oct/2016:09:48:03 +0300] Directory \"/usr/lib/cups/notifier\" has insecure permissions (040775/uid=0/gid=0).
W [16/Oct/2016:09:48:03 +0300] Notifier for subscription 1879 (dbus://) went away, retrying!
W [16/Oct/2016:09:48:03 +0300] Notifier for subscription 1879 (dbus://) went away, retrying!

And then the last warning is repeated over and over again... over 45000 times per second! (No wonder the disk is filled after a short time)


Assuming you have a similar problem, note that the thing cups keeps complaining about is very simple to fix:

Directory \"/usr/lib/cups/notifier\" has insecure permissions (040775/uid=0/gid=0).

Once you change the permissions with sudo chmod 755 /usr/lib/cups/notifier, the file should stop growing. (while you are at it, fix the other files it complains about).

0

This command doesn't help me

    sudo chmod 755 /usr/lib/cups/notifier

because I didn't have a permission problem like

    Directory \"/usr/lib/cups/notifier\" has insecure permissions (040775/uid=0/gid=0)

My error_log was filled with lines like

    D [21/Aug/2019:15:23:48 +0300] [Client 2249] Read: status=100
    D [21/Aug/2019:15:23:48 +0300] [Client 1232] Read: status=100
    D [21/Aug/2019:15:23:48 +0300] [Client 2249] Read: status=100
    D [21/Aug/2019:15:23:48 +0300] [Client 1232] Read: status=100

So, a simple reboot did the trick

    sudo service cups restart