Comment 14 for bug 451289

Revision history for this message
Daniel Riedemann (darie) wrote :

Revision 1376:
First click on Delete I get: error: cannot find size of swap device '/dev/mapper/swap'

##Detailed output:
debug: clean_operation('system'), options = '['memory']'
debug: disabling swap
debug: running cmd ['swapoff', '-a', '-v']
debug: detected swap devices: ['/dev/mapper/swap']
info: wiping swap device '/dev/mapper/swap'
Traceback (most recent call last):
  File "/usr/share/bleachbit/Worker.py", line 89, in execute
    for ret in cmd.execute(self.really_delete):
  File "/usr/share/bleachbit/Command.py", line 108, in execute
    for func_ret in self.func():
  File "/usr/share/bleachbit/Memory.py", line 244, in wipe_memory
    wipe_swap_linux(devices)
  File "/usr/share/bleachbit/Memory.py", line 223, in wipe_swap_linux
    if get_swap_size_linux(device) > 8*1024**3:
  File "/usr/share/bleachbit/Memory.py", line 137, in get_swap_size_linux
    (device, open('/proc/partitions').read()))
RuntimeError: error: cannot find size of swap device '/dev/mapper/swap'
major minor #blocks name

   8 0 625131864 sda
   8 1 134217728 sda1
   8 2 128520 sda2
   8 3 2498107 sda3
   8 4 1 sda4
   8 5 64002928 sda5
   8 6 424280941 sda6
 254 0 64001900 dm-0
 254 1 424279913 dm-1
 254 2 2498107 dm-2

debug: deepscans= {}
debug: searches= {}

##Second click on Delete:
debug: clean_operation('system'), options = '['memory']'
debug: detected swap devices: None
debug: wipe_memory() pid 11021 waiting for child pid 11033
debug: new nice value 19
debug: dropping privileges of pid 11033 to uid 100
debug: physical free: 1320341504 B (1259 MB)
info: allocating 944.00 MB (990077952 B) memory
debug: wiping 944.00 MB I just allocated
warning: child process returned code 11
debug: re-enabling swap
debug: deepscans= {}
debug: searches= {}

Is return code 11 good or bad?
Do you try to get the swap size trough /proc/partitions? Wouldn't be /proc/swaps better and easier for that? (Because of LVM)