"Task cannot be monitored or controlled" alert is unhelpful and scary

Bug #441686 reported by Matthew Paul Thomas on 2009-10-03
This bug affects 19 people
Affects Status Importance Assigned to Milestone
aptdaemon (Ubuntu)
Sebastian Heinlein

Bug Description

Binary package hint: aptdaemon

While trying to install an application in the Ubuntu Software Center, an error alert appeared with this wording:

    Task cannot be monitored or controlled

    The connection to the daemon was lost.
    Most likely the background daemon crashed
    \/ Details
    It seems that the daemon died.

                                  ( OK )

xprop suggests that this alert belongs to software-center, but bug 438797 shows the same alert also appearing with update-manager, so I guess the alert is produced by aptdaemon. (If not, please move this report.) This bug report is not about any particular case when the alert appears, it is about the alert itself.

The alert does not satisfy any of the requirements of a good error message: it does not say what went wrong, it does not explain why it went wrong, and it does not say how to fix or work around the problem. It also uses the words "daemon", "crashed", and "died", none of which should appear in interfaces intended for ordinary people.

<https://wiki.ubuntu.com/SoftwarePackageOperations#unknown-error>: "If the operation fails because of any other error, an error alert should appear with primary text ‘Sorry, “{title of item}” can’t be {installed/reinstalledupdated/removed} because an unknown error occurred.”"

Matthew Paul Thomas (mpt) wrote :
Sebastian Heinlein (glatzor) wrote :

1. The Python aptdaemon client which is used by software-store and update-manager monitors the daemon. In the case of a crashed aptdaemon the client progress doesn't hang forever waiting for new signals from the daemon, but instead raises this error.

Actually we don't know very much about a possible error cause - only that the daemon unexpectedly disappeared from the D-Bus - this is the communication bus which is used to transfer information between the root running aptdaemon and the client on the user's desktop session.

2.In most cases we should know the purpose of the transaction - there is only a very rare cornor case in which we don't know anything about the transaction.But how should we make use of this and not make the life of translators harder?

3. The error is produced by the client, see 1

4. This is a serious error - or design oversight, see comment on #438797. Automatically requeuing the transaction could in most cases only reproduce the error.

Changed in aptdaemon (Ubuntu):
status: New → Confirmed
Sebastian Heinlein (glatzor) wrote :

I will be more strict about messages in aptdaemon in the future. In the past I have been lax about the quality of the message - the primary goal was to get a working system. But it is always hard to find the time to reword the messages afterwards and in most cases never happens.

Crusty Barnacle (calipengo) wrote :

This issue apparently still exists in Natty: [[http://askubuntu.com/questions/35355/task-manager-produces-a-strange-error-message | askUbuntu - Update Manager produces a strange error message]]

Tom Francis (tfrancis) wrote :

The question in the above comment has been "voluntarily removed by its author", but I too am seeing the problem.

I am running Natty (upgraded through the last few releases I think). I just ran update manager and got this dialog. On my system, the GUI is frozen as a result. I am able to move the mouse, but nothing on the screen responds to a mouse click. The clock is also not updating. The system is not frozen as I am able to ssh in to try to diagnose the problem.

I'm leaving it with the error up for a few mins if anyone wants me to check anything.

Tom Francis (tfrancis) wrote :

I should have added that I already killed the update-manager process, but nothing changed on the screen. Update Manager is still visible with the dialog in front of it.

Robert Roth (evfool) on 2011-07-06
Changed in aptdaemon (Ubuntu):
importance: Undecided → Low
Juan Pablo (juanps90) wrote :

"It seems that the daemon died" just popped up while using update-manager.

Running ubuntu-11.10-amd64.

Timo Laru (timo-laru) wrote :

Got this error message followed by "No packages installed" message few minutes after apt-get installing some packages (Ubuntu 11.04 x86_64). The packages seem to work just fine, no signs of failure in /var/log/dpkg.log nor /var/log/apt/history.log.

Changed in aptdaemon (Ubuntu):
assignee: nobody → Matthew Paul Thomas (mpt)
Matthew Paul Thomas (mpt) wrote :

I tried to reproduce this bug by starting a package installation, and then entering at a terminal

    sudo pkill -SEGV aptd

Doing that, I didn't get the "Task cannot be monitored or controlled" alert at all. Instead I got these two Apport alerts: one "internal error" for aptd itself, and one "The application Ubuntu Software Center has closed unexpectedly" (an example of bug 1033902).

How can I trigger the "Task cannot be monitored or controlled" alert reliably?

It's possible those two Apport alerts may be combined into one or even zero (merged with a later alert). So I think it may still be appropriate for the Python aptdaemon client to be responsible for showing an error message in this situation. If it is, what can we suggest as ways to solve the problem?

Sebastian Heinlein (glatzor) wrote :

1. If aptdaemon dies because of SEGV we want to know it. So it is ok to get the apport report for aptdaemon.

2. It is not ok that s-c crashses too. It should show the "task cannot be monitoried ..." error dialog. I will have a look at it. SIGKILL could also do the job to kill aptdaemon.

3. You only get the "task cannot be monitoried ..." message if we don't have a clue: Aptdaemon just vanished (on the Dbus). Normally you should get the aptdaemon apport report. But the apport dialog only talks about a system service and not about e.g. a failed application installation. AFAIK it is possible to modify the apport message: e.g. "Update installtion failed". But you cannot rely only on the apport notification to notify the user that he or her action failed.

Sebastian Heinlein (glatzor) wrote :

If a patient has too many fatal diagnosis to remember, we just say he is seriously ill. Perhaps we should say to the user: "something strange happened on your computer"

Sebastian Heinlein (glatzor) wrote :

I tried to reproduce it. And all works fine: Software-center ignores the error (ERROR_DAEMON_DIED) silently and a crash report is created. The only problem is that the user doesn't get a notification about the failed transaction. The progress bar just vanishes and the install button re-appears.

Matthew Paul Thomas (mpt) wrote :

This just showed up on Reddit. <http://www.reddit.com/r/Ubuntu/comments/17cdb1/poor_little_fella/>

It's true that we can't rely on Apport to show a message that's understandably related to the task, or even to show a message at all.

So, Sebastian, the question is: Could we rely on python-aptdaemon.gtk3widgets to show an understandable message? Instead of saying "Task cannot be monitored or controlled", could it say 'Sorry, “Thunderbird Arabic language pack” can’t be updated because an unknown error occurred', or 'Sorry, "Abiword Word Processor” can’t be removed because an unknown error occurred', or 'Sorry, “Polly” can’t be installed because an unknown error occurred', etc?

If so, then let's do that. If not, then let's leave reporting of task errors up to the calling program (USC, Software Updater, etc), and abolish this alert altogether.

Sebastian Heinlein (glatzor) wrote :

We could add this functionality to either gtk3widgets or all the clients. Depends a little on the direction we want to take with software-center/unity.

Matthew Paul Thomas (mpt) wrote :
Changed in aptdaemon (Ubuntu):
status: Confirmed → Triaged
description: updated
Changed in aptdaemon (Ubuntu):
assignee: Matthew Paul Thomas (mpt) → Sebastian Heinlein (glatzor)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers