Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update October 26 2023 loops itself #29

Open
hansw-nlo opened this issue Oct 26, 2023 · 28 comments · May be fixed by ghostbsd/update-station#61
Open

update October 26 2023 loops itself #29

hansw-nlo opened this issue Oct 26, 2023 · 28 comments · May be fixed by ghostbsd/update-station#61
Assignees
Labels
bug Something isn't working

Comments

@hansw-nlo
Copy link

Version

23.10.1

Explain the issue and what happens

Once updating begins it will loop on 2 occasions. First issue is after the linux subsytem is updaten. I fixed that by removing those packages. After that it updates everything and starts over again. I solved this by stopping the update once it was finished and rebooting the system, the update manager then shows there are no new packages.

It is very weird behavior and I have

Explain how to reproduce the bug?

...

What is the Expected behavior (if applicable)

No response

Additional context (if applicable)

No response

@hansw-nlo hansw-nlo added the bug Something isn't working label Oct 26, 2023
@q-pa
Copy link

q-pa commented Oct 28, 2023

I can confirm this bug. Happend on ine of my three systems. I thought it was a problem with running out of free space but after stopping the update process and rebooting the machine everything was alright. I only had to delete/reinstall telegram-desktop for some out of date dependency.

@hansw-nlo
Copy link
Author

I think it is a very important issue. No response in 2 days. I will plan a switch to freebsd soon

@ericbsd
Copy link
Member

ericbsd commented Oct 28, 2023

Was the update list empty?

Also, which desktop was it, MATE or XFCE?

I ask the latter question because XFCE had problems with the last upgrade.

I'm sorry for not getting back to you sooner. I have been sick with COVID for almost two weeks.

@ericbsd ericbsd transferred this issue from ghostbsd/ghostbsd-src Oct 28, 2023
@ericbsd
Copy link
Member

ericbsd commented Oct 28, 2023

I moved the issue to the proper issue tracker.

@ericbsd ericbsd moved this from New to Todo in Development Management Oct 28, 2023
@q-pa
Copy link

q-pa commented Oct 28, 2023

First of all: Get well soon!!

I have MATE. Where can I find any logs covering updates? I always forget, because it (almost) always works.

@ericbsd
Copy link
Member

ericbsd commented Oct 29, 2023

If there was an issue in will ~/update.failed.

@q-pa
Copy link

q-pa commented Oct 29, 2023

No update.failed file.

@hansw-nlo
Copy link
Author

I can only state I removed Linux support first, that one did restart the updates. But there are more places. In the end I simply looked at where it restarted the process and simply stopped it with a reboot, that helped but I somehow feel bad running an os after such problems.

@ericbsd ericbsd changed the title update Oktober 26 2023 loops itself update October 26 2023 loops itself Nov 7, 2023
@ericbsd
Copy link
Member

ericbsd commented Feb 10, 2024

I have investigated the loop issue and it must be the self-repair. If a package fails to upgrade because of a package that won't upgrade, Update Station uninstall it, reinstall it, and restart the upgrade.

I will investigate further.

@q-pa
Copy link

q-pa commented Feb 17, 2024

In relation to issue #95 do you advise to update to 24.01.1 using pkg to be able to see which package causes the problem?

@ericbsd
Copy link
Member

ericbsd commented Feb 17, 2024

@q-pa yes

@ericbsd
Copy link
Member

ericbsd commented Mar 9, 2024

I think I should remove the self-heal code and revisit that in the future.

@tim-pearce
Copy link

I am having problems with this on my laptop with the upgrade to 24.01.1.
It worked with my two desktops (after getting update-station working #143
I noticed it it restarts after a random number of updates.
I ran pkg upgrade -f and it's still random sometime less than 200 of 1400 or so but sometimes over 1000.
Each time it fails it is chown or chmod complaining about a bad file descriptor. The file in question looks like a temporary file (sensible name dot bunch of random characters).
I tried deleting sshpass, which was one of those.
Ran pkg upgrade -f a number of times till it got all the way up to ports and it froze.
Reboot and no networking.
Am now trying again from a BE and deinstalling ports and sshpass first.

@tim-pearce
Copy link

It took a few tries. Still got the error but eventually it got through all the updates.
The other thing I did is I had it plugged into an ethernet cable. The other two PCs are desktop - non-wireless.

@tim-pearce
Copy link

It seems pkg upgrade -f only upgrades 23.10.1
After doing that update-station still wanted to do a major version upgrade.
I tried again and then realised I should follow the instructions :-
sudo env ABI=FreeBSD:14:amd64 IGNORE_OSVERSION=yes pkg-static bootstrap -f
sudo env ABI=FreeBSD:14:amd64 pkg-static upgrade -f
I opened Firefox to get those instructions and it took a long time then the system killed it along with the running pkg.
It seems to be a memory problem but the laptop has more ram than the other two PCs! (12288MiB vs 10240MiB and 4096MiB).

My final solution was to go back to the last good BE but not login to the GUI. Instead I went to a console.
Tried as root but it didn't seem to be able to reach the ghostBSD server! (I think root uses bash shell but I use fish - don't know why that might make a difference)
Tried as myself using sudo as above and everything just worked.

@ericbsd
Copy link
Member

ericbsd commented May 21, 2024

It should be better with some of the latest versions of Update Station; I realize that with a forced upgrade, the selfheal would try to reinstall everything on each package fix.

To fix that once and for all, I think we need to identify all packages that depend on the kernel version and force upgrades only for those that depend on kernel version changes.

@tim-pearce
Copy link

It would be easier to identify all those that don't depend on the kernel version. You could use such a list before it is complete whereas you would have to wait for the list of those that do depend to be complete.

@ericbsd
Copy link
Member

ericbsd commented Sep 2, 2024

I think I finally figured out the problem. I am working on a fix.

@ericbsd ericbsd self-assigned this Sep 2, 2024
@ghostbsd-bot ghostbsd-bot moved this from ToDo to In Progress in Development Management Sep 2, 2024
@q-pa
Copy link

q-pa commented Sep 3, 2024

As requested via Telegram please find attached a video of the loop going into another round.

@q-pa
Copy link

q-pa commented Sep 3, 2024

OK, video is too big... So I will send it in Telegram

ericbsd added a commit to ghostbsd/update-station that referenced this issue Sep 20, 2024
I remove the force upgrade everything this was casing self-heal to loop.

This fix is related to ghostbsd/issues#29
@ericbsd
Copy link
Member

ericbsd commented Sep 20, 2024

I have made a change, but I can't test it right now. It will remove the force upgrade. Everything loops with the self-heal.

@q-pa
Copy link

q-pa commented Sep 20, 2024

Very cool, really looking forward to it. Unfortunately, I can't test anything myself until end of next week earliest, because I am not near my machines.

@q-pa
Copy link

q-pa commented Sep 30, 2024

Is this part of the latest updates? Because I would be able again to test it.

@ericbsd
Copy link
Member

ericbsd commented Nov 4, 2024

I have one part completed, but I need more testing.

@q-pa
Copy link

q-pa commented Nov 6, 2024

Meanwhile, I managed to update all my three systems from 24.04.2 (pkg-base) to 24.07.3 by following these steps:

  1. create backup BE
  2. boot live USB system
  3. set up internet connection (wire preferably)
  4. sudo zpool import -> check that original zroot pool is available
  5. check whether /mnt exists,otherwise sudo mkdir /mnt
  6. sudo zpool import -fR /mnt zroot
  7. zfs list (check)
  8. zfs mount
  9. ls -1la /mnt (complete system available?)
  10. zpool get bootfs shows current BE
  11. sudo zfs mount zroot/ROOT/...current BE...
  12. don't know if that is necessary but for all datasets listed with "zfs mount" I did:
    sudo zfs unmount ...
    sudo zfs mount ...
  13. make sure the whole system is mounted under /mnt
  14. sudo pkg-static -r /mnt install -y -r GhostBSD-base -g "GhostBSD-*"
  15. sudo zfs unmount -f zroot/ROOT/...current BE
  16. sudo zpool export zroot
  17. reboot and remove live system USB drive
  18. maybe one needs to update the EFI files afterwards...

@ericbsd
Copy link
Member

ericbsd commented Feb 1, 2025

So, I have good news. Pkg now correctly supports upgrading kernel changes, and I can clean all the complex codes to upgrade them properly.

@ericbsd
Copy link
Member

ericbsd commented Feb 2, 2025

It looks good so far. The problem will likely be solved once and for all.

@q-pa
Copy link

q-pa commented Feb 2, 2025

Good to hear! I only had problems when updating from 24.04 to 24.07, though. Later updates just worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

4 participants