swap error upon memory cleansing (generalized occurance of #877568)

Bug #1525853 reported by Richard Pearse
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BleachBit
Fix Released
High
Unassigned

Bug Description

Upon running bleachbit,

Unexpected output:
args='['swapoff', '-a', '-v']'
stdout='swapoff /dev/sda3
'
stderr=''

Swap is, however, successfully turned off:

[ROOT] > swapon --show
12:16 Mon 14-Dec-15 [/home/temp]
[ROOT] >
12:16 Mon 14-Dec-15 [/home/temp]
[ROOT] >

then
12:16 Mon 14-Dec-15 [/home/temp]
[ROOT] > swapon -a
12:16 Mon 14-Dec-15 [/home/temp]
[ROOT] > swapon --show
NAME TYPE SIZE USED PRIO
/dev/sda3 partition 1.9G 0B -1
12:16 Mon 14-Dec-15 [/home/temp]
[ROOT] >

If I then run bleachbit again, with swap on again, exactly the same error occurs.

Linux golden 4.2.0-1-686-pae #1 SMP Debian 4.2.6-3 (2015-12-06) i686 GNU/Linux

Bleachbit installed via apt (aptitude). Newly aptitude update; aptitude dist-upgrade

BleachBit version 1.8
GTK version 2.24.28
local_cleaners_dir = /root/.config/bleachbit/cleaners
locale_dir = /usr/share/locale/
options_dir = /root/.config/bleachbit
personal_cleaners_dir = /root/.config/bleachbit/cleaners
system_cleaners_dir = /usr/share/bleachbit/cleaners
locale.getdefaultlocale = ('en_US', 'UTF-8')
os.getenv('DESKTOP_SESSION') = None
os.getenv('LOGNAME') = root
os.getenv('USER') = root
os.getenv('SUDO_UID') = None
os.path.expanduser('~') = /root
platform.linux_distribution() = ('debian', 'stretch/sid', '')
platform.platform = Linux-4.2.0-1-686-pae-i686-with-debian-stretch-sid
sys.argv = ['/usr/bin/bleachbit']
sys.executable = /usr/bin/python
sys.version = 2.7.10+ (default, Oct 10 2015, 09:11:24)
[GCC 5.2.1 20151028]
__file__ = /usr/share/bleachbit/bleachbit/Diagnostic.pyc

Revision history for this message
Richard Pearse (tech-u) wrote :

btw I am not using cryptoswap or any non-standard swapping setup. all straight out of the box

Andrew Ziem (ahziem1)
Changed in bleachbit:
importance: Undecided → High
milestone: none → 1.10
Revision history for this message
Andrew Ziem (ahziem1) wrote :

Fixed in git commit 5cd9b81.

Thank you for the report, Richard.

Changed in bleachbit:
status: New → Fix Committed
Revision history for this message
Andrew Ziem (ahziem1) wrote :

This should be fixed in http://bleachbit.sourceforge.net/news/bleachbit-193-beta

If you would please test it and post the results here, I would appreciate it.

Changed in bleachbit:
status: Fix Committed → Fix Released
Revision history for this message
Richard Pearse (tech-u) wrote : Re: [Bug 1525853] Re: swap error upon memory cleansing (generalized occurance of #877568)

Will do.

Thanks for looking into this. Great application, bleachbit.

S

 |
> This should be fixed in
> http://bleachbit.sourceforge.net/news/bleachbit-193-beta
>
> If you would please test it and post the results here, I would
> appreciate it.
>
> ** Changed in: bleachbit
> Status: Fix Committed => Fix Released
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1525853
>
> Title:
> swap error upon memory cleansing (generalized occurance of #877568)
>
> Status in BleachBit:
> Fix Released
>
> Bug description:
> Upon running bleachbit,
>
> Unexpected output:
> args='['swapoff', '-a', '-v']'
> stdout='swapoff /dev/sda3
> '
> stderr=''
>
>
> Swap is, however, successfully turned off:
>
> [ROOT] > swapon --show
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] >
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] >
>
>
> then
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] > swapon -a
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] > swapon --show
> NAME TYPE SIZE USED PRIO
> /dev/sda3 partition 1.9G 0B -1
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] >
>
>
> If I then run bleachbit again, with swap on again, exactly the same
> error occurs.
>
>
> Linux golden 4.2.0-1-686-pae #1 SMP Debian 4.2.6-3 (2015-12-06) i686
> GNU/Linux
>
> Bleachbit installed via apt (aptitude). Newly aptitude update;
> aptitude dist-upgrade
>
> BleachBit version 1.8
> GTK version 2.24.28
> local_cleaners_dir = /root/.config/bleachbit/cleaners
> locale_dir = /usr/share/locale/
> options_dir = /root/.config/bleachbit
> personal_cleaners_dir = /root/.config/bleachbit/cleaners
> system_cleaners_dir = /usr/share/bleachbit/cleaners
> locale.getdefaultlocale = ('en_US', 'UTF-8')
> os.getenv('DESKTOP_SESSION') = None
> os.getenv('LOGNAME') = root
> os.getenv('USER') = root
> os.getenv('SUDO_UID') = None
> os.path.expanduser('~') = /root
> platform.linux_distribution() = ('debian', 'stretch/sid', '')
> platform.platform = Linux-4.2.0-1-686-pae-i686-with-debian-stretch-sid
> sys.argv = ['/usr/bin/bleachbit']
> sys.executable = /usr/bin/python
> sys.version = 2.7.10+ (default, Oct 10 2015, 09:11:24)
> [GCC 5.2.1 20151028]
> __file__ = /usr/share/bleachbit/bleachbit/Diagnostic.pyc
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/bleachbit/+bug/1525853/+subscriptions

Revision history for this message
Richard Pearse (tech-u) wrote :
Download full text (7.6 KiB)

Unfortunately the error is still there.
- bleachbit_1.9.2_all_debian8.deb : error still there
- bleachbit-1.9.3.tar.gz: system hangs

(1)
--- update to bleachbit_1.9.2_all_debian8.deb

While not 1.9.3, is offered when one chooses 1.9.3 and was updated 7
hours ago

dpkg -i bleachbit_1.9.2_all_debian8.deb

--- error (with your debug statements)

                      :
                      :
debug: deepscan dict= [{'regex': u'^\\.DS_Store$', 'nregex': '',
'cache': False, 'command': u'delete', 'path': '/root'}, {'regex':
u'\\.[Bb][Aa][Kk]$', 'nregex': '', 'cache': False, 'command': u'delete',
'path': '/root'}, {'regex': u'[a-zA-Z]{1,4}~$', 'nregex': '', 'cache':
False, 'command': u'delete', 'path': '/root'}, {'regex':
u'^~wr[a-z][0-9]{4}\\.tmp$', 'nregex': '', 'cache': False, 'command':
u'delete', 'path': '/root'}, {'regex': u'^ppt[0-9]{4}\\.tmp$', 'nregex':
'', 'cache': False, 'command': u'delete', 'path': '/root'}, {'regex':
u'^Thumbs\\.db$', 'nregex': '', 'cache': False, 'command': u'delete',
'path': '/root'}, {'regex': u'^Thumbs\\.db:encryptable$', 'nregex': '',
'cache': False, 'command': u'delete', 'path': '/root'}]
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']
Traceback (most recent call last):
  File "/usr/share/bleachbit/Worker.py", line 84, in execute
    for ret in cmd.execute(self.really_delete):
  File "/usr/share/bleachbit/Command.py", line 130, in execute
    for func_ret in self.func():
  File "/usr/share/bleachbit/Memory.py", line 266, in wipe_memory
    devices = disable_swap_linux()
  File "/usr/share/bleachbit/Memory.py", line 88, in disable_swap_linux
    % {'args': str(args), 'stdout': stdout, 'stderr': stderr})
RuntimeError: Unexpected output:
args='['swapoff', '-a', '-v']'
stdout='swapoff /dev/sda3
'
stderr=''
                                            <dies here>

(2)
--- update to bleachbit-1.9.3.tar.gz

cd bleachbit-1.9.3/
python bleachbit.py

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$']}
Error in execution of <bleachbit.Command.Function instance at
0xb5b2a7ac>
Traceback (most recent call last):
  File
  "/home/bench/system/toInstall/bleachbit/bleachbit-1.9.3/bleachbit/Worker.py",
  line 84, in execute
    for ret in cmd.execute(self.really_delete):
  File
  "/home/bench/system/toInstall/bleachbit/bleachbit-1.9.3/bleachbit/Command.py",
  line 131, in execute
    func_ret = self.func()
  File
  "/home/bench/system/toInstall/bleachbit/bleachbit-1.9.3/bleachbit/Unix.py",
  line 360, in apt_autoclean
    raise RuntimeError(line)
RuntimeError: E: The value 'stretch' is invalid for APT::Default-Release
as such a release is not available in the sources
Error in execution of <bleachbit.Command.Function instance at
0xb0bcbf2c>
Traceback (most recent call last):
  File
  "/home/bench/system/toInstall/bleachbit/ble...

Read more...

Revision history for this message
Andrew Ziem (ahziem1) wrote :

The .deb packages for 1.9.3 are now available
http://bleachbit.sourceforge.net/news/bleachbit-193-beta

But I see you figured out how to run it anyway.

I wonder whether running the the APT commands directly would give the same error "The value 'stretch' is invalid." If you think this is a bug in BleachBit, please do open another bug ticket.

In my testing the following command takes about 15 seconds to clean memory on my not-so-fast laptop with 6GB of RAM.

time python bleachbit.py --clean system.memory

On your system does it seem the swap is really disabled? While I run the cleaning command, I also run the "top" command to watch the swap disappear.

Revision history for this message
Richard Pearse (tech-u) wrote :
Download full text (4.5 KiB)

Yay, great work, the swap error is solved. Thanks

On your other question, yes, if I ran the apt commands directly I would
get the same error:
     "The value 'stretch' is invalid for APT::Default-Release as such a
     release is not available in the sources"

This is the error I get when I run bleachbit twice in a row (that
includes a cleaning of the apt archives).

Error in execution of <bleachbit.Command.Function instance at
0xb5970dac>
Traceback (most recent call last):
  File "/usr/share/bleachbit/Worker.py", line 84, in execute
    for ret in cmd.execute(self.really_delete):
  File "/usr/share/bleachbit/Command.py", line 131, in execute
    func_ret = self.func()
  File "/usr/share/bleachbit/Unix.py", line 360, in apt_autoclean
    raise RuntimeError(line)
RuntimeError: E: The value 'stretch' is invalid for APT::Default-Release
as such a release is not available in the sources
Error in execution of <bleachbit.Command.Function instance at
0xb57f862c>
Traceback (most recent call last):
  File "/usr/share/bleachbit/Worker.py", line 84, in execute
    for ret in cmd.execute(self.really_delete):
  File "/usr/share/bleachbit/Command.py", line 131, in execute
    func_ret = self.func()
  File "/usr/share/bleachbit/Unix.py", line 390, in apt_autoremove
    raise RuntimeError(line)
RuntimeError: E: The value 'stretch' is invalid for APT::Default-Release
as such a release is not available in the sources
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']

 |
> The .deb packages for 1.9.3 are now available
> http://bleachbit.sourceforge.net/news/bleachbit-193-beta
>
> But I see you figured out how to run it anyway.
>
>
> I wonder whether running the the APT commands directly would give the
> same error "The value 'stretch' is invalid." If you think this is a bug
> in BleachBit, please do open another bug ticket.
>
>
> In my testing the following command takes about 15 seconds to clean
> memory on my not-so-fast laptop with 6GB of RAM.
>
> time python bleachbit.py --clean system.memory
>
> On your system does it seem the swap is really disabled? While I run
> the cleaning command, I also run the "top" command to watch the swap
> disappear.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1525853
>
> Title:
> swap error upon memory cleansing (generalized occurance of #877568)
>
> Status in BleachBit:
> Fix Released
>
> Bug description:
> Upon running bleachbit,
>
> Unexpected output:
> args='['swapoff', '-a', '-v']'
> stdout='swapoff /dev/sda3
> '
> stderr=''
>
>
> Swap is, however, successfully turned off:
>
> [ROOT] > swapon --show
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] >
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] >
>
>
> then
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] > swapon -a
> 12:16 Mon 14-Dec-15 [/home/temp]
> [ROOT] > swapon --show
> NAME TYPE SIZE USED PRIO
> /dev/sda3 partit...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.