Bug #9413

Automatic upgrade fails under Windows camouflage mode

Added by emmapeel 2015-05-16 11:46:05 . Updated 2015-07-03 03:38:47 .

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Target version:
Start date:
2015-05-16
Due date:
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Upgrader
Deliverable for:

Description

2 users (Lenovo Ideapad Y500 and Acer Extensa 5620) have reported so far:

After allowing the automatic upgrade and downloaded the upgrade, the upgrader faiils to shutdown the connection and the automatic upgrade fails.

Whisperback logs available, I just found:


<b>Your Tails device is being upgraded...</b>

[...]
For security reasons, the networking is now disabled.
Shutting down network connection
Error while shutting down the network
<b>Failed to shutdown network</b>

For debugging information, see /home/amnesia/.xsession-errors


Error while shutting down the network
<b>Failed to shutdown network</b>

For debugging information, see /home/amnesia/.xsession-errors
exit code: 256

stdout:


stderr:
 at /usr/bin/tails-upgrade-frontend line 22
localuser:tails-upgrade-frontend being removed from access control list

and not sure if related, but I also found some of this:

1431757450563   addons.xpi  ERROR   Failed to move file /home/amnesia/.tor-browser/profile.default/extensions/https-everywhere@eff.org/install.rdf to /home/amnesia/.tor-browser/profile.default/extensions/trash/https-everywhere@eff.org: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.moveTo]"  nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)"  location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: SIO_installFile :: line 299"  data: no] Stack trace: SIO_installFile()@resource://gre/modules/addons/XPIProvider.jsm:299 < SIO_installDirEntry()@resource://gre/modules/addons/XPIProvider.jsm:379 < SIO_installDirectory/<()@resource://gre/modules/addons/XPIProvider.jsm:328 < SIO_installDirectory()@resource://gre/modules/addons/XPIProvider.jsm:335 < SIO_installDirEntry()@resource://gre/modules/addons/XPIProvider.jsm:377 < SIO_move()@resource://gre/modules/addons/XPIProvider.jsm:400 < DirInstallLocation_uninstallAddon()@resource://gre/modules/addons/XPIProvider.jsm:7187 < XPI_processPendingFileChanges/<()@resource://gre/modules/addons/XPIProvider.jsm:2385 < XPI_processPendingFileChanges()@resource://gre/modules/addons/XPIProvider.jsm:2503 < XPI_checkForChanges()@resource://gre/modules/addons/XPIProvider.jsm:3333 < XPI_startup()@resource://gre/modules/addons/XPIProvider.jsm:1884 < AMI_callProviders()@resource://gre/modules/AddonManager.jsm:872 < AMI_startup()@resource://gre/modules/AddonManager.jsm:748 < AMP_startup()@resource://gre/modules/AddonManager.jsm:2321 < AMC_observe()@resource://gre/components/addonManager.js:55 < <file:unknown>
1431757450564   addons.xpi  ERROR   Failure moving /home/amnesia/.tor-browser/profile.default/extensions/https-everywhere@eff.org/install.rdf to /home/amnesia/.tor-browser/profile.default/extensions/trash/https-everywhere@eff.org
1431757450564   addons.xpi  ERROR   Failed to move entry /home/amnesia/.tor-browser/profile.default/extensions/https-everywhere@eff.org/install.rdf: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.moveTo]"  nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)"  location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: SIO_installFile :: line 299"  data: no] Stack trace: SIO_installFile()@resource://gre/modules/addons/XPIProvider.jsm:299 < SIO_installDirEntry()@resource://gre/modules/addons/XPIProvider.jsm:379 < SIO_installDirectory/<()@resource://gre/modules/addons/XPIProvider.jsm:328 < SIO_installDirectory()@resource://gre/modules/addons/XPIProvider.jsm:335 < SIO_installDirEntry()@resource://gre/modules/addons/XPIProvider.jsm:377 < SIO_move()@resource://gre/modules/addons/XPIProvider.jsm:400 < DirInstallLocation_uninstallAddon()@resource://gre/modules/addons/XPIProvider.jsm:7187 < XPI_processPendingFileChanges/<()@resource://gre/modules/addons/XPIProvider.jsm:2385 < XPI_processPendingFileChanges()@resource://gre/modules/addons/XPIProvider.jsm:2503 < XPI_checkForChanges()@resource://gre/modules/addons/XPIProvider.jsm:3333 < XPI_startup()@resource://gre/modules/addons/XPIProvider.jsm:1884 < AMI_callProviders()@resource://gre/modules/AddonManager.jsm:872 < AMI_startup()@resource://gre/modules/AddonManager.jsm:748 < AMP_startup()@resource://gre/modules/AddonManager.jsm:2321 < AMC_observe()@resource://gre/components/addonManager.js:55 < <file:unknown>
1431757450565   addons.xpi  ERROR   Failure moving /home/amnesia/.tor-browser/profile.default/extensions/https-everywhere@eff.org to /home/amnesia/.tor-browser/profile.default/extensions/trash
1431757450565   addons.xpi  ERROR   Failed to uninstall add-on https-everywhere@eff.org in app-profile: [Exception... "Component returned failure code: 0x80520015 (NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.moveTo]"  nsresult: "0x80520015 (NS_ERROR_FILE_ACCESS_DENIED)"  location: "JS frame :: resource://gre/modules/addons/XPIProvider.jsm :: SIO_installFile :: line 299"  data: no] Stack trace: SIO_installFile()@resource://gre/modules/addons/XPIProvider.jsm:299 < SIO_installDirEntry()@resource://gre/modules/addons/XPIProvider.jsm:379 < SIO_installDirectory/<()@resource://gre/modules/addons/XPIProvider.jsm:328 < SIO_installDirectory()@resource://gre/modules/addons/XPIProvider.jsm:335 < SIO_installDirEntry()@resource://gre/modules/addons/XPIProvider.jsm:377 < SIO_move()@resource://gre/modules/addons/XPIProvider.jsm:400 < DirInstallLocation_uninstallAddon()@resource://gre/modules/addons/XPIProvider.jsm:7187 < XPI_processPendingFileChanges/<()@resource://gre/modules/addons/XPIProvider.jsm:2385 < XPI_processPendingFileChanges()@resource://gre/modules/addons/XPIProvider.jsm:2503 < XPI_checkForChanges()@resource://gre/modules/addons/XPIProvider.jsm:3333 < XPI_startup()@resource://gre/modules/addons/XPIProvider.jsm:1884 < AMI_callProviders()@resource://gre/modules/AddonManager.jsm:872 < AMI_startup()@resource://gre/modules/AddonManager.jsm:748 < AMP_startup()@resource://gre/modules/AddonManager.jsm:2321 < AMC_observe()@resource://gre/components/addonManager.js:55 < <file:unknown>



Subtasks


History

#1 Updated by intrigeri 2015-05-17 10:36:27

  • Assignee set to emmapeel
  • Target version set to Tails_1.4.1
  • QA Check set to Info Needed

> Whisperback logs available,

Please forward them to me, and then reassign this ticket to me + drop Info Needed. Thanks!

Tentatively flagging for next release, even though I doubt I’ll have time to resolve it unless the fix is pretty easy.

#2 Updated by emmapeel 2015-05-17 11:13:40

  • Assignee changed from emmapeel to intrigeri
  • QA Check deleted (Info Needed)

forwarded

#3 Updated by intrigeri 2015-05-19 11:43:46

  • Subject changed from Automatic upgrade to Tails 1.4 fails to some users when "failed to shutdown network" to Automatic upgrade fails under Windows camouflage mode
  • Status changed from New to Confirmed
  • Type of work changed from Research to Code

Thanks to the logs emmapeel sent me, I noticed that both bug reporters have Windows Camouflage mode enabled. The thing is, we don’t start Vidalia in that mode, tails-shutdown-network runs under set -e, and the first command it runs is pkill -SIGKILL vidalia. So, it seems to me that incremental upgrades can’t possibly work in Windows Camouflage mode. Ooops.

Solution: tails-shutdown-network should not treat a failure at killing Vidalia as a fatal error, and probably same for stopping the tor, networking and network-manager services: the only thing we really care about is blocking network access with iptables, that we do later in that script.

#4 Updated by emmapeel 2015-05-19 12:17:53

I think all reports we’ve got of this have Windows camouflage (there were two more reports after the ones reported) good catch!

#5 Updated by intrigeri 2015-06-11 21:05:40

  • Status changed from Confirmed to In Progress
  • Assignee changed from intrigeri to anonym
  • % Done changed from 0 to 50

anonym, I’ve pushed one commit (00e0c41) to the iuk Git repo. I was bold enough to push directly to the master branch… and to skip testing it entirely. OMG, what a nasty person I am today! I’m surprising myself.

If you agree with me that this change is so trivial it has <0.001% of chances to break anything, then please mark this ticket as fix committed, and we’ll be done with it. Otherwise, just reassign to me and I’ll patch tails-shutdown-network live in Tails 1.3.2, and from there will test incremental upgrades (both with Windows Camouflage, to ensure the bug is fixed; and without, to ensure there’s no regression in the general case).

#6 Updated by anonym 2015-06-12 11:29:39

  • Status changed from In Progress to Fix committed
  • Assignee deleted (anonym)
  • % Done changed from 50 to 100

intrigeri wrote:
> anonym, I’ve pushed one commit (00e0c41) to the iuk Git repo. I was bold enough to push directly to the master branch… and to skip testing it entirely. OMG, what a nasty person I am today! I’m surprising myself.

:)

> If you agree with me that this change is so trivial it has <0.001% of chances to break anything, then please mark this ticket as fix committed, and we’ll be done with it.

The change looks perfectly reasonable and safe.

#7 Updated by BitingBird 2015-06-13 12:47:17

  • QA Check set to Pass

#8 Updated by intrigeri 2015-07-03 03:38:47

  • Status changed from Fix committed to Resolved