Bug #8690

tails-install-iuk's output is not forwarded to the Upgrader error reporting

Added by intrigeri 2015-01-13 17:14:58 . Updated 2018-03-06 16:18:58 .

Status:
Resolved
Priority:
Normal
Assignee:
intrigeri
Category:
Target version:
Start date:
2015-01-13
Due date:
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:

Starter:
Affected tool:
Upgrader
Deliverable for:

Description

It might be that the autodie pragma may not play well with IPC::Run::run and/or IPC::Run::SafeHandles.


Subtasks


Related issues

Related to Tails - Feature #7431: Improve tails-iuk error reporting for developers Resolved 2014-06-21

History

#1 Updated by intrigeri 2015-01-13 17:15:30

  • related to Feature #7431: Improve tails-iuk error reporting for developers added

#2 Updated by intrigeri 2015-01-13 18:10:10

  • Description updated
  • Target version changed from Tails_1.4 to Tails_1.3

#3 Updated by intrigeri 2015-02-10 18:18:22

  • Target version changed from Tails_1.3 to Tails_1.3.2

Won’t manage to rework this in time for 1.3, sorry.

#4 Updated by intrigeri 2015-03-29 15:43:37

  • Target version changed from Tails_1.3.2 to Tails_1.4

#5 Updated by intrigeri 2015-04-09 10:13:50

The way the code is supposed to work, such output should be forwarded by the fatal method, via its debugging_info parameter, to tails-upgrade-frontend’s stdout, that is in /home/amnesia/.xsession-errors. I’ve verified that other output from tails-upgrade-frontend indeed lands in there, including debugging_info (I’ve forced get_upgrade_description to fail, it uses fatal_run_cmd, which successfully run the fatal method, and then in turn the expected debugging info was in .xsession-errors).

AFAICT the install_iuk method uses the exact same code to output debugging info whenever tails-install-iuk fails, so either there’s actually no problem (and the debugging info actually lands in .xession-errors as intended), or the way we run tails-install-iuk fails to capture its output, or something.

#6 Updated by intrigeri 2015-05-09 01:22:38

  • Target version changed from Tails_1.4 to Hole in the Roof

Clearly I won’t have time to complete this in time for 1.4, and anyway it’s too late for the RM to have time to review’n’merge it. Four months ago, I’ve scheduled it to 1.3 so that it’s on my radar, but it was postponed too many times already, so I won’t try giving it an explicit target version another time. This problem is harmless 99.xx% of the time, but for the remaining cases, it makes debugging and bug reporting totally impossible, hence I’m calling it a Hole in the Roof.

#7 Updated by intrigeri 2018-03-06 16:18:58

  • Status changed from Confirmed to Resolved
  • Target version deleted (Hole in the Roof)
  • % Done changed from 0 to 100
  1. Start Tails 3.5 from a USB drive
  2. Wait for the tails-upgrade-frontend.service user service to have completed its job.
  3. Patch /usr/bin/tails-install-iuk to output something and fail: insert say "stdout"; say STDERR "stderr"; exit 1; on the line before use Tails::IUK::Install.
  4. Set TAILS_VERSION="1.0~test" in /etc/os-release
  5. systemctl --user restart tails-upgrade-frontend.service
  6. Wait for the Upgrader to 1. propose upgrading; 2. download the upgrade; 3. try applying the upgrade

I see a “An error occured while installing the upgrade” error dialog and the Journal says:

Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]: Error while installing the upgrade
Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]: <b><b>An error occured while installing the upgrade.</b>\n\nYour Tails device needs to be repaired and might be unable to restart.\n\nPlease follow the instructions at file:///usr/share/doc/tails/website/doc/upgrade/error/install.en.html</b>
Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]: For debugging information, execute the following command: sudo tails-debugging-info
Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]: exit code: 256
Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]: stdout:
Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]: stdout
Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]: stderr:
Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]: stderr
Mar 06 16:17:10 amnesia tails-upgrade-frontend-wrapper[14231]:  at /usr/bin/tails-upgrade-frontend line 19.

… that is, it does include tails-install-iuk’s stdout, stderr and exit code, as intended. So there’s no problem to be solved here :)