1

When I run bleachbit as root, I get what looks like swap file errors. I've never seen these before and am wondering if there is a simple way to fix it??

here's the output:

debug: DeepScan.scan: searches= {'/root': [u'^\\.DS_Store$', u'\\.[Bb][Aa][Kk]$', u'[a-zA-Z]{1,4}~$', u'^~wr[a-z][0-9]{4}\\.tmp$', u'^ppt[0-9]{4}\\.tmp$', u'^Thumbs\\.db$', u'^Thumbs\\.db:encryptable$']}
debug: running cmd  ['swapon', '-s']
debug: detected swap devices: None
debug: wipe_memory() pid 10751 waiting for child pid 10764
debug: new nice value 19
debug: physical free: 6.66GB (6656237568 B)
info: allocating and wiping 2.66GB (2662291865 B) of memory
debug: physical free: 3.99GB (3991920640 B)
info: allocating and wiping 1.6GB (1596768256 B) of memory
debug: physical free: 2.39GB (2391945216 B)
info: allocating and wiping 956.8MB (956778086 B) of memory
debug: physical free: 1.44GB (1442086912 B)
info: allocating and wiping 576.8MB (576834764 B) of memory
debug: physical free: 893.4MB (893407232 B)
info: allocating and wiping 357.4MB (357362892 B) of memory
debug: physical free: 562.5MB (562454528 B)
info: allocating and wiping 225MB (224985088 B) of memory
warning: child process returned code 9
debug: re-enabling swap
wrote 2 files and 212277846016 bytes in 690 seconds at 307.47 MB/s
0 bytes and 14030430 inodes available to non-super-user
16576512 bytes and 14030430 inodes available to super-user


debug: DeepScan.scan: searches= {'/root': [u'^\\.DS_Store$', u'\\.[Bb][Aa][Kk]$', u'[a-zA-Z]{1,4}~$', u'^~wr[a-z][0-9]{4}\\.tmp$', u'^ppt[0-9]{4}\\.tmp$', u'^Thumbs\\.db$', u'^Thumbs\\.db:encryptable$']}
debug: running cmd  ['swapon', '-s']
debug: disabling swap
debug: running cmd  ['swapoff', '-a', '-v']
debug: detected swap devices: ['/dev/sda5']
info: wiping swap device '/dev/sda5'
Error in execution of <bleachbit.Command.Function instance at 0x7f44ad7c36c8>
Traceback (most recent call last):
  File "/usr/share/bleachbit/bleachbit/Worker.py", line 84, in execute
    for ret in cmd.execute(self.really_delete):
  File "/usr/share/bleachbit/bleachbit/Command.py", line 134, in execute
    for func_ret in self.func():
  File "/usr/share/bleachbit/bleachbit/Memory.py", line 270, in wipe_memory
    wipe_swap_linux(devices, proc_swaps)
  File "/usr/share/bleachbit/bleachbit/Memory.py", line 248, in wipe_swap_linux
    'swap device %s is larger than expected' % device)
RuntimeError: swap device /dev/sda5 is larger than expected
wrote 2 files and 212279988224 bytes in 806 seconds at 263.36 MB/s
0 bytes and 14030424 inodes available to non-super-user
16535552 bytes and 14030424 inodes available to super-user

2 Answers 2

1

The key line in the log is this error:

swap device /dev/sda5 is larger than expected

BleachBit has some safety protocols to prevent accidentally wiping the wrong partition when it is trying to wipe memory, and in BleachBit version 1.12 the safety limit is 8,589,934,592 bytes (8 gibibytes).

The limit is hard coded, and I doubled it to 16 gibibytes for the next release.

For now you can either:

  1. Uncheck System - Memory to disable cleaning the memory
  2. Edit Memory.py on your system. Change the 8 * 1024 ** 3 to a large value, similar to this patch.
  3. Wait for the next release
0

Are you running it as root? And if you run lsblk in the terminal, how big is the sda5 partition? It says it's "larger than expected"

Try shrinking it down to only twice that of your RAM(If that's the problem)

I've never used BleachBit but those are my only ideas...

2
  • So, if I have 8 gigs of physical RAM, I should set my swap file for 16 Gigs?
    – user251788
    Jun 15, 2016 at 1:15
  • what is the best (safest) way to shrink the swap file without killing my laptop?
    – user251788
    Jun 15, 2016 at 1:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .