Updater.sh: "Press return to continue, CTRL+C to abort" - unable to abort

Hello,
updater.sh offers me to abort update process in the beginning, but it is not possible:
root@omnia:~# updater.sh
WARN:Script revision-specific not found, but ignoring its absence as requested
WARN:Script serial-specific not found, but ignoring its absence as requested
WARN:Requested package luci-i18n-ddns-en that is missing, ignoring as requested.
INFO:Queue install of opkg-trans/turris/59.3.3-1
INFO:Queue install of updater-ng/turris/59.3.3-1
Press return to continue, CTRL+C to abort
^C^C^C^C^C^C^C^C^C^C^C^C
^C^C^C

2 Likes

For me is this also not working, had to go to anther shell and kill the two processes. =(

*Bump
I had same issue yesterday on my TO with os 3.9.1
All I did was add transmission-web package into user list of updater and run updater.sh then I got into same message and had to kill it from 2nd session.

1 Like

In code just after this “Press return…” message is unlink and then message “Executing preupdate hooks…”. So I don’t think that updater hangs. I would suspect that for some reason the ssh terminal is not communicating with router. And because of that updater just waits for input.

What ssh client are you using? Did you had a stable connection to router? Haven’t you been for example restarting network?

Also another option of course is that you have something wrong with your root filesystem and unlink just hangs for some reason in kernel but then you would see some kernel error in dmesg and had more problems then just hanging updater.

I have used the ssh client from ubuntu (from windows WSL)
The connection has been stable - after kill from 2nd session I have been able to work in 1st session again without reconnect (I have killed only updater process, not whole terminal)

Additional information - I’m having enabled function delayed update in Foris.

I still have logs (/var/log/messages) from that time, maybe it can be useful - I have found nothing at all.

2017-12-27T00:22:23+01:00 warning updater[19041]: requests.lua:452 (func): Script file:///usr/share/updater/localrepo/localrepo.lua not found, but ignoring its absence as requested
2017-12-27T00:22:25+01:00 warning updater[19041]: planner.lua:344 (pkg_plan): Requested package luci-i18n-ddns-en that is missing, ignoring as requested.
2017-12-27T00:22:25+01:00 warning updater[19041]: planner.lua:344 (pkg_plan): Requested package foris-netmetr-plugin-l10n-cs that is missing, ignoring as requested.
2017-12-27T00:22:25+01:00 warning updater[19041]: planner.lua:344 (pkg_plan): Requested package foris-netmetr-plugin-l10n-de that is missing, ignoring as requested.
2017-12-27T00:22:25+01:00 info updater[19041]: updater.lua:100 (Globals): Queue install of transmission-web/turris/2.92-3
```

You can send messages and also dmesg output my way. But I don’t think that anything will be there.

Does it happens all the time? Or is it just a one time thing? It never happened to me, but of course I am not using ubuntu on windows so it might be problem with something there.

You can run updater with debug output updater.sh -e DBG (or trace by replacing DBG with TRACE). But once again I don’t think that you will see anything there. If there is no “Executing preupdate hooks…” message then it hangs either on unlink or on getchar. Either way it shouldn’t be happening so I suspect client from it.

I have checked now, yes its happening again.
And I think I can give you point where to look.

As I have mentioned I am using option “Update approval needed” in Foris.
Next step I have added some useless package into /etc/updater/conf.d/user.lua like this Install "mc"
Then I have run updater.sh and got again stuck.
So I have checked whats in the htop - there saying something about timeout and /usr/share/need_aproval file.


Ok - clear message - something with approvals - I went into Foris, check the “Automatic installation”, save and run updater again and without problem this time.

I think the problem is only in the cli, because when the update is performed fully from Foris web interface there is no problem at all even with “Update approval needed”

I know that you have approvals. That is only option you could get that approval message in cli. Approvals from foris works differently. And if it’s systematical then I suspect that there is something between application, ssh client, and windows terminal happening.

In cli the --ask-approval is not added and common --batch is dropped that causes updater to ask user for approval on terminal. And I know exactly where it would have to hang and I am telling you that it’s most unlikely that it hangs there. If you want I can even given you exact lines. That is why I am telling you that there is most probably something weird happening in terminal emulation as nobody I know encountered this problem (but we are all using linux terminal emulation). I would suspect some problem with updater.sh and windows end of the lines or some combination but it’s weird. Can you try to do the same with putty?

Putty same result
VMware machine Ubuntu same result

Edit: give me half hour and I will test it on Fedora laptop I have at home.

Ok then there is probably really something weir happening with application ti self. Can you then please run it with trace level and record output? Also can you please send me its version?

updater.sh -e TRACE
pkgupdate --version

Version is:
root@turris:~# pkgupdate --version pkgupdate 60.0.5

Log I have sent you on email as its too large to upload on pastebin or put here on forum.

Can you run pkgupdate directly? Just run pkgupdate and that is all (of course with something to approve).

Also please check for me what timeout you have timeout --version.

root@turris:~# timeout --version
timeout (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Padraig Brady.
root@turris:~# pkgupdate
WARN:Script file:///usr/share/updater/localrepo/localrepo.lua not found, but ignoring its absence as requested
WARN:Requested package luci-i18n-ddns-en that is missing, ignoring as requested.
WARN:Requested package foris-netmetr-plugin-l10n-cs that is missing, ignoring as requested.
WARN:Requested package foris-netmetr-plugin-l10n-de that is missing, ignoring as requested.
INFO:Queue install of mc/turris/4.8.17-3
Press return to continue, CTRL+C to abort

INFO:Executing preupdate hooks...
INFO:Subprogram output: /etc/updater/hook_preupdate/05_schnapps.sh:
Snapshot number 28 created

INFO:End of subprogram output
INFO:Unpacking download packages
INFO:Checking for file collisions between packages
INFO:Running pre-install scripts and merging packages to root file system
INFO:Running post-install and post-rm scripts
INFO:Removing packages and leftover files
INFO:Cleaning up control files
INFO:Executing postupdate hooks...
INFO:Subprogram output: /etc/updater/hook_postupdate/05_schnapps.sh:
Snapshot number 29 created

INFO:End of subprogram output

So there have to be some problem in approval unlink or in updater.sh. To check that approvals file is really not one to blame could you please do the same and run first pkgupdate --ask-approval=/usr/share/updater/need_approval --batch to generate approval file and then again without --batch to simulation situation where unlink have to happen. If that pauses then please repeat again without first command (so remove mc, as I suspect you are doing this, and run only pkgupdate --ask-approval=/usr/share/updater/need_approval). What this simulates is run where approval file is generated and when there is not. If in both cases it passes then it’s clear that problem is in updater.sh and most probably in ptimeout function.

Looks good for pkgupdate

root@turris:~# opkg remove mc
Removing package mc from root...
WARNING: You probably just removed a package that was installed as part of a user list or the basic system. This package will return durring the next updater run. We suggest you disable the user list instead.
root@turris:~# pkgupdate --ask-approval=/usr/share/updater/need_approval --batch
WARN:Script file:///usr/share/updater/localrepo/localrepo.lua not found, but ignoring its absence as requested
WARN:Requested package luci-i18n-ddns-en that is missing, ignoring as requested.
WARN:Requested package foris-netmetr-plugin-l10n-cs that is missing, ignoring as requested.
WARN:Requested package foris-netmetr-plugin-l10n-de that is missing, ignoring as requested.
INFO:Queue install of mc/turris/4.8.17-3
root@turris:~# pkgupdate --ask-approval=/usr/share/updater/need_approval
WARN:Script file:///usr/share/updater/localrepo/localrepo.lua not found, but ignoring its absence as requested
WARN:Requested package luci-i18n-ddns-en that is missing, ignoring as requested.
WARN:Requested package foris-netmetr-plugin-l10n-cs that is missing, ignoring as requested.
WARN:Requested package foris-netmetr-plugin-l10n-de that is missing, ignoring as requested.
INFO:Queue install of mc/turris/4.8.17-3
Press return to continue, CTRL+C to abort

INFO:Executing preupdate hooks...
INFO:Subprogram output: /etc/updater/hook_preupdate/05_schnapps.sh:
Snapshot number 30 created

INFO:End of subprogram output
INFO:Unpacking download packages
INFO:Checking for file collisions between packages
INFO:Running pre-install scripts and merging packages to root file system
INFO:Running post-install and post-rm scripts
INFO:Removing packages and leftover files
INFO:Cleaning up control files
INFO:Executing postupdate hooks...
INFO:Subprogram output: /etc/updater/hook_postupdate/05_schnapps.sh:
Snapshot number 31 created

INFO:End of subprogram output
root@turris:~# opkg remove mc
Removing package mc from root...
WARNING: You probably just removed a package that was installed as part of a user list or the basic system. This package will return durring the next updater run. We suggest you disable the user list instead.
root@turris:~# pkgupdate --ask-approval=/usr/share/updater/need_approval
WARN:Script file:///usr/share/updater/localrepo/localrepo.lua not found, but ignoring its absence as requested
WARN:Requested package luci-i18n-ddns-en that is missing, ignoring as requested.
WARN:Requested package foris-netmetr-plugin-l10n-cs that is missing, ignoring as requested.
WARN:Requested package foris-netmetr-plugin-l10n-de that is missing, ignoring as requested.
INFO:Queue install of mc/turris/4.8.17-3
Press return to continue, CTRL+C to abort

INFO:Executing preupdate hooks...
INFO:Subprogram output: /etc/updater/hook_preupdate/05_schnapps.sh:
Snapshot number 32 created

INFO:End of subprogram output
INFO:Unpacking download packages
INFO:Checking for file collisions between packages
INFO:Running pre-install scripts and merging packages to root file system
INFO:Running post-install and post-rm scripts
INFO:Removing packages and leftover files
INFO:Cleaning up control files
INFO:Executing postupdate hooks...
INFO:Subprogram output: /etc/updater/hook_postupdate/05_schnapps.sh:
Snapshot number 33 created

INFO:End of subprogram output
root@turris:~# 

Ok then it’s caused by updater.sh for sure. Could you please check for me that you have package coreutils-timeout installed? There seems to be missing --foreground option in updater.sh.

Edit: I finally managed to reproduce it. Thank you for you assistance. For completeness there is an issue for it: https://gitlab.labs.nic.cz/turris/updater/issues/241

3 Likes