Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Don't update from within a Desktop Environment?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Sun Oct 23, 2016 10:30 pm    Post subject: Reply with quote

I'm half way through a 400-package emerge upgrade on xfce4-terminal in xfce4.

I'm starting to see breakage already :D

My firefox window is not showing scrollbar decorations anymore, but the emerge is still going. I would expect it to finish but no guarantees about the state of the machine then...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Aiken
Apprentice
Apprentice


Joined: 22 Jan 2003
Posts: 239
Location: Toowoomba/Australia

PostPosted: Sun Oct 23, 2016 10:31 pm    Post subject: Reply with quote

When updating kde I make sure no on is logged in before doing anything. A few times on multiple machines where kde has been updated while someone was logged in there were configuration problems next time they logged in that were not a problem on machines where no user was logged in. Apart from that I generally don't care but will not update kde from within kde any more.

Now I make sure no one is logged in and maybe stop X so they can not log in until kde is updated. The danger with stopping X is when you get users who can not handle things looking different and their response to things looking different is to cycle the power.
_________________
Beware the grue.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Sun Oct 23, 2016 10:38 pm    Post subject: Reply with quote

Those machine need a "DO NOT TOUCH MACHINE" warning with an explicit "DO NOT POWER CYCLE MACHINE" :)
(I'm pretty sure touching implies power cycling, but some people don't think so...)
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Mon Oct 24, 2016 12:54 am    Post subject: Reply with quote

Logicien wrote:
Hu wrote:
Logicien wrote:
When I press Ctrl+c in the terminal where Emerge run, there is nothing it can do to not die.
This is also wrong. It is very easy to install a handler for SIGINT, and many programs do so for legitimate reasons. Once installed, a SIGINT handler can ignore a ^C or allow the program to perform some cleanup, then exit. As far as I know, emerge does not install such a handler, but that does not mean it is impossible.

Here you judge me "wrong" on a feature that Emerge do not have.
You said that there is nothing it (emerge) can do to not die. I interpreted your statement to claim that it was impossible for emerge to block ^C, even if an expert coder wanted to modify it to do so. While it is correct that, as currently written, emerge has no user-accessible capability to block ^C, it is not correct that there is nothing emerge could possibly do to block it, assuming the right relatively trivial patch. In particular, Python already installs a signal handler so that it can translate SIGINT into KeyboardInterrupt. Portage could easily install its own handler to take some other action. That is why I said it is wrong to say that there is nothing it can do to not die.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Mon Oct 24, 2016 3:02 am    Post subject: Reply with quote

You like to interpret what I say the way you want. When I say 'there is nothing it can do to not die', I am talking about Emerge like it is now and not an hypothetic modified Emerge. Try to understand what I say instead of make me tell what you want.
_________________
Paul
Back to top
View user's profile Send private message
allistarM
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2004
Posts: 138

PostPosted: Mon Oct 24, 2016 8:06 pm    Post subject: Reply with quote

If I'm doing a large update (e.g. kde changes, chrome, libreoffice, webkit) I always do then in a "screen" session so that if the main desktop dies I can always drop to a shell. I always update while I'm using the computer and the only issue I've experienced is with KDE upgrades where some application launchers no longer work until I re-log back in. I tend to "eix-sync" then "emerge -uDNpvt @world" a couple of times a week. It's very rare for this to cause issues with my running session, and this is on both my work and home computers.
Back to top
View user's profile Send private message
ChrisJumper
Advocate
Advocate


Joined: 12 Mar 2005
Posts: 2389
Location: Germany

PostPosted: Wed Oct 26, 2016 12:22 am    Post subject: Reply with quote

And i supposed to use gentoo, that the installation will tell you the way it works. In the best way you know with the age of your system, what packages have what usage. For some worst case, and i joined gentoo when the X11-Server was "hard for a newbie to configure", i use another second minimal DE like Fluxbox.

Or if that failed, i reboot inside a Live-Linux, and Chroot into my system. As i did with the installation from another Linux-Live Disk. That sense of well-being made feel me safe with gentoo.

Its like: I nearly always know what i have to do with the System and even if i affected by some strange issues. I know people to ask or find a solution due to the Linux open source Community. Yes its not like i have a support ticked and some paid crew try to solve it. For 95 of 100 Issues i love this System.

Back to Topic:

Screen is nice, but how can i solve, that if i return to a screen session, that i got more then some Lines on the End? Often, in the case of a Bug i just saw the stupid rest, without the actual error Point and cant scroll up.

About the dynamic linked libs: I thought that when i start the process, it collect all dynamic libs, load them and start the execution. The Firefox for example just shouldn't be restart during the update process. If it don't crash, and that application was open before you start the update. It should be untouched and safe.
Back to top
View user's profile Send private message
russK
l33t
l33t


Joined: 27 Jun 2006
Posts: 665

PostPosted: Wed Oct 26, 2016 2:11 am    Post subject: Reply with quote

ChrisJumper wrote:
About the dynamic linked libs: I thought that when i start the process, it collect all dynamic libs, load them and start the execution. The Firefox for example just shouldn't be restart during the update process. If it don't crash, and that application was open before you start the update. It should be untouched and safe.


Run your favorite application with 'strace' and you can see yes it opens many .so files. Now imagine a desktop environment has many applications and libraries that are happy together. If you are running a desktop environment while these files are being removed and replaced by emerge / portage, it should not be surprising that things can go awry. If you are doing a major upgrade, then they are all being replaced. I believe typically in linux, when a process has a file open, and then another process removes the file from the filesystem, that file usually stays on the storage and does not disappear until the running process closes the file. So the application may work fine while it still lives, but if it wants to open or re-open files that it expects to exist but are no longer, then well ... all bets are of IMHO. I'm sure it can be even more complicated in practice depending on the package. Best to log out of a desktop environment when doing a major upgrade.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Wed Oct 26, 2016 2:16 am    Post subject: Reply with quote

Dynamic libraries can also be linked upon demand and not at startup, so you can change functionality of programs without actually quitting the program. Example of such is Apache that can load modules by a config file. This type of program is extremely sensitive to getting the rug pulled out from underneath.

This isn't the only example of problematic code, pretty much anything that's user configurable without restarting is vulnerable. Window manager environments like FVWM are virtually immune due to requiring restarts to reload the configuration (though FVWM does has dynamically loaded modules that will break if the version suddenly changes from underneath.) However even Gnome3 with its "extensions" can cause problems too if the software writer did not clearly mark which versions their extensions are good for, and can cause hot breakage when emerging while running Gnome.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
devilheart
l33t
l33t


Joined: 17 Mar 2005
Posts: 848
Location: Villach, Austria

PostPosted: Wed Oct 26, 2016 5:02 pm    Post subject: Reply with quote

ChrisJumper wrote:
About the dynamic linked libs: I thought that when i start the process, it collect all dynamic libs, load them and start the execution. The Firefox for example just shouldn't be restart during the update process. If it don't crash, and that application was open before you start the update. It should be untouched and safe.
Yes, but remember that you can load a library after a program has started using dlopen() and the related functions. Many plugins are loaded this way and the main executable has no knowledge of this libraries during its loading phase
Back to top
View user's profile Send private message
Aiken
Apprentice
Apprentice


Joined: 22 Jan 2003
Posts: 239
Location: Toowoomba/Australia

PostPosted: Fri Oct 28, 2016 10:49 pm    Post subject: Reply with quote

eccerr0r wrote:
Those machine need a "DO NOT TOUCH MACHINE" warning with an explicit "DO NOT POWER CYCLE MACHINE" :)
(I'm pretty sure touching implies power cycling, but some people don't think so...)


You could be right about needing a sign. Yesterday did my usual stop X so no one can log in which normally is enough. Kde upgrade which took a bit longer than expected and a new kernel just in time for them to turn the machine off because it did not have a X based login screen. Was in the process of trying to find why lightdm was not starting when I got the computer is shutting down message. So no working computer for them yesterday and I have been told I have to fix it today. This person has been told multiple times "If the screen does not look normal DO NOT cycle the power and DO NOT turn off. All bets are off if there is smoke or flame."

As well as kde I'll go with firefox and thunderbird can be a problem. I have had issues with both of them running while being upgraded. After that with libreoffice and wine I wait until they are not being used "just in case". This is 3 desktops and 3 laptops. All the compiling is on a build server so usually the down time on the desktops is not too bad. Depending on what has been upgraded and how long since the last reboot I have rebooted servers to make sure they come up cleanly. Have had issues where services restarted ok at upgrade time but enough had changed where the machine would not come up cleanly at the next reboot.

I don't regard this as just a DE issue but upgrades in general.
_________________
Beware the grue.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Fri Oct 28, 2016 11:59 pm    Post subject: Reply with quote

For the Firefox/Thunderbird issues, there is a decent partial mitigation. My experience with them has been that updating the supporting packages is safe, it is only the main package that can break running instances. Based on that observation, I have made it standard practice to emerge --buildpkgonly www-client/firefox, then exit Firefox instances, then emerge --usepkgonly www-client/firefox, then start the new Firefox. This allows me to use old Firefox while I wait for new Firefox to build, and avoids the risk that I might not get Firefox closed before a regular emerge www-client/firefox would install it. It lets me keep Firefox open except for the fairly short window of time when Portage is actively copying the new Firefox to the live filesystem.
Back to top
View user's profile Send private message
Aiken
Apprentice
Apprentice


Joined: 22 Jan 2003
Posts: 239
Location: Toowoomba/Australia

PostPosted: Sat Oct 29, 2016 12:11 am    Post subject: Reply with quote

Same effect I get using a build server. At least with firefox and thunderbird a binary install is quick enough easy to ask someone if they can stop those 2 programs for a minute.
_________________
Beware the grue.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Sat Oct 29, 2016 1:52 am    Post subject: Reply with quote

How do you get it to work when you don't know exactly when firefox will be built?

I suppose you can put a temporary mask, but all the libs will need to be updated and live before firefox gets built ... and these libs also can cause issues with half baked installs.

(Yeah, me, I just roll the dice and have another machine I'm not updating ready just in case.... :D)
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21489

PostPosted: Sat Oct 29, 2016 4:11 am    Post subject: Reply with quote

I know exactly when Firefox will be built because I check emerge --pretend output first and arrange to build everything that is not Firefox, then go back and build Firefox separately. I recall very few cases where updating a supporting library caused problems, and in all those cases, the problems were minor. Usually, something rendered strangely until Firefox was restarted. In contrast, updating www-client/firefox while Firefox was open has caused major problems. In one case, Firefox became so broken that File->Quit ceased to function, so I could not exit the program.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9645
Location: almost Mile High in the USA

PostPosted: Sat Oct 29, 2016 4:54 am    Post subject: Reply with quote

Harder to tell when it will build if you have many screenfuls of packages that need to update. I usually end up masking everything but the current version of firefox before emerging it anyway just so that I can clean up the disk before starting the build.

I don't recall having problems updating firefox while it's running, probably since I readily restart it when needed (with the killall command ready). It's the DE's that have caused the most problems.
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum