'Exception occured [*sic*] in the refresh thread'

Bug #1603713 reported by ALinuxUser
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linux Mint
New
Undecided
Unassigned

Bug Description

Mint Update Manager error (toolbar: view --> information) in Mint 18 (Cinnamon x86; Kernel: x86_64 Linux 4.4.0-31-generic):

++ Starting refresh (including refreshing the APT cache)
    -- Exception occured [*sic*] in the refresh thread: <class 'subprocess.CalledProcessError'>

And Update Manager shows a red cross.

The problem is intermittent.

Updates do appear in the Manager and install without problems. Also, 'apt-get update 'and 'apt-get upgrade' work fine.

description: updated
Revision history for this message
screaming-iron (screaming-iron) wrote :

I am also experiencing this issue on Linux Mint 18 (Cinnamon AMD64, Kernel: x86_64 Linux 4.4.0-21-generic).

The problem seems to be consistent. The initial refresh after system boot seems to complete without issue. However, subsequent auto-refresh attempts fail, yielding the red X, and leaving the following in the log (note that I have shortened my refresh interval to five minutes for troubleshooting purposes):

07.19@14:58 ++ Launching mintUpdate
07.19@14:58 ++ Initial refresh will happen in 10 minutes, 0 hours and 0 days
07.19@14:58 ++ Starting refresh
07.19@14:58 ++ System is up to date
07.19@14:58 ++ Refresh finished
07.19@15:08 ++ MintUpdate is in tray mode, performing initial refresh
07.19@15:08 ++ Auto-refresh will happen in 5 minutes, 0 hours and 0 days
07.19@15:08 ++ Starting refresh (including refreshing the APT cache)
07.19@15:08 -- Exception occured in the refresh thread: <class 'subprocess.CalledProcessError'>

As stated above, manually clicking the refresh button seems to work, as does apt-get update.

In the course of troubleshooting this, I think I may have stumbled upon a work-around. Grasping at straws, I tried disabling IPv6 with NetworkManager. This seemed to resolve the issue. I re-enabled IPv6, and the issue re-appeared once more. From this I referenced the IPv6 configuration of other machines on my network running Mint 17.2 and 17.3 (none of which are having issues of this sort). On the problem computer IPv6 was enabled, but the drop-down box in the "Addresses" field was blank. I changed this to "Automatic" and the auto-refresh cycles have completed for the last several hours without issue.

I will leave this configuration running and update with any changes. I hope this helps.

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

I too had the 'addresses' field not set to 'automatic'. In my case, it was set to 'ignore'. I do not recall setting this, although, prior to updating to Mint 18 from 17.3, I did have IPv6 disabled. I've set the field to automatic, and I'll see what happens.

(By the way, in Network manager, the two options 'networking connections' and 'network settings' still seem transposed to me - i.e., and has long been the case, selecting 'connections' opens what could well be described as 'settings', whereas selecting 'settings' opens what could well be described as 'connections' . . Try it and see!)

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

I am grateful to 'screaming-iron' for the idea - which is to ensure IP6 is enabled - but that idea does not solve the problem on my system. I note that on the web there seem to be a couple of reports, in languages other than English, about this problem.

Revision history for this message
screaming-iron (screaming-iron) wrote :

Thanks for the suggestion; and yes IPv6 is currently set to automatic in "network connections" as well. However my initial relief was not to last. After starting my system today every refresh was once again kicking:

Exception occured in the refresh thread: <class 'subprocess.CalledProcessError'>

Killing and restarting mintUpdate worked for a while, but it was failing again within a few hours. It seems Nicholas's original description of "intermittent" is quite true.

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

I've just accepted an update to MintUpdate. My MintUpdate is now version 5.1.0 - and the problem reported in this thread persists, I am afraid (although admittedly I have not rebooted yet). The only thing that seems to have changed is that the word 'occurred' (in the error message) is now spelt correctly!

Revision history for this message
David Pursehouse (deegeepee) wrote :

Hi. I managed to get past this by changing the preferences in "Edit - Sources" to point to different mirror. Seems that when it is set to default it may be encountering this issue, and by changing to a different mirror it re-acquires a connection. Changed my "Main" source to local (UK) mirror and was fully working again.

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

Here is some more information - namely, what happens when I run mintUpdate from terminal:

~ $ /usr/bin/mintupdate
~ $ mintUpdate: no process found
[sudo] password for nicholas:
Command 'sudo /usr/lib/linuxmint/mintUpdate/checkAPT.py --use-synaptic 58720273 2>/dev/null' returned non-zero exit status 1
-- Exception occurred in the refresh thread: <class 'subprocess.CalledProcessError'>

And I get if I run

sudo /usr/lib/linuxmint/mintUpdate/checkAPT.py --use-synaptic 58720273 2>/dev/null

directly, then a window doing apt-update stuff appears and . . I get no error.

If this a python problem? A permissions problem? Perhaps a terminal configuration problem?

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

Update: it seems to be a permissions problem! For, when I run

sudo /usr/bin/mintupdate

(note the 'sudo') there are no problems.

The following works too (though it does ask me to respecify the update policy, and though I don't understand the difference between mintupdate and mintupdate-launcher)

mintupdate-launcher

I do feel the developers should get on this problem, for it seems fairly fundamental and also - I imagine - not too hard to fix . .

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

I wonder whether this Debian bug-report thread is relevant:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757114

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

The problem seems to have disappeared on my system - but possibly only because a kernel update that I am not installing is showing in the update manager.

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

This is definitely fixed on my system (although I suppose it is possible that the problem will reoccur).

Candidates for things that might have fixed it:

* changing my mirrors;
* installing - and then uninstalling - a program called `apt-fast`;
* fiddling with my ppas;
* some software update (that I obtained from the repos via the terminal).

Revision history for this message
Johan Van Eck (johanhvaneck) wrote :

Thank David Pursehouse (deegeepee)
This solved the issue for me.

Revision history for this message
sigoden (sigoden) wrote :

My solution to this problem:

* run `sudo /usr/bin/mintupdate`, it print:

```
Command '/usr/lib/linuxmint/mintUpdate/checkAPT.py --use-synaptic 54525969 2>/dev/null' returned non-zero exit status 1
-- Exception occurred in the refresh thread: <class 'subprocess.CalledProcessError'>
```

* run `/usr/lib/linuxmint/mintUpdate/checkAPT.py --use-synaptic 54525969`, it print

```
 /usr/lib/linuxmint/mintUpdate/checkAPT.py --use-synaptic 54525969 2
Traceback (most recent call last):
  File "/usr/lib/linuxmint/mintUpdate/checkAPT.py", line 11, in <module>
    from aptdaemon import client
  File "/usr/lib/python3/dist-packages/aptdaemon/client.py", line 43, in <module>
    import defer
ImportError: No module named 'defer'
```

* run `sudo pip3 install defer` fixed it

Revision history for this message
ALinuxUser (buntulongername-new) wrote :

Thanks, sigoden.

I'm no longer having this problem myself. For that reason, and because I am having trouble determining what 'pip install defer' does (https://pip.pypa.io/en/stable/reference/pip_install/ seems to have no information on it), I am hesistant to run it. (I am unsure, also, when to run pip commands with 'sudo' . .)

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.