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

rpm-ostree ignores CTRL-C while downloading rpm-md or rpms #897

Open
dustymabe opened this issue Jul 26, 2017 · 9 comments
Open

rpm-ostree ignores CTRL-C while downloading rpm-md or rpms #897

dustymabe opened this issue Jul 26, 2017 · 9 comments
Labels

Comments

@dustymabe
Copy link
Member

Basically I am in the middle of a transaction that is taking longer than expected and I try to CTRL-C and I see where it says cancelling transaction but then keeps going printing status updates to the screen about download progress.

After some time it finally finishes with error: Operation was cancelled.

I've been told this is because librepo takes over SIGINT and causes this behavior.

# rpm -q rpm-ostree ostree
rpm-ostree-2017.6-3.fc26.x86_64
ostree-2017.8-3.fc26.x86_64
@cgwalters
Copy link
Member

Blog I did on this topic a while ago: https://blog.verbum.org/2013/12/03/cancelling-computation-gcancellable-or-sigint-versus-threads-versus-exceptions/

The problem isn't that librepo takes over SIGINT (it doesn't by default, but dnf enables it), it's that it doesn't have a good way to cancel things besides SIGINT since it doesn't hook into GCancellable.

Ultimately I think what we need to do is make the transaction a subprocess, and not a thread. Then cancel = kill -9. It'd also solve the memory leak issues that caused me to start on #606

@cgwalters cgwalters added the bug label Jul 27, 2017
cgwalters added a commit to cgwalters/rpm-ostree that referenced this issue Aug 24, 2017
While we have cancellation issues¹, let's help the
user understand that we heard them the first time.

¹ <coreos#897>
rh-atomic-bot pushed a commit that referenced this issue Aug 24, 2017
While we have cancellation issues¹, let's help the
user understand that we heard them the first time.

¹ <#897>

Closes: #948
Approved by: jlebon
rh-atomic-bot pushed a commit that referenced this issue Aug 24, 2017
While we have cancellation issues¹, let's help the
user understand that we heard them the first time.

¹ <#897>

Closes: #948
Approved by: jlebon
rh-atomic-bot pushed a commit that referenced this issue Aug 24, 2017
While we have cancellation issues¹, let's help the
user understand that we heard them the first time.

¹ <#897>

Closes: #948
Approved by: jlebon
@cgwalters
Copy link
Member

See also #897

@miabbott
Copy link
Member

See also #897

I think you meant #211?

cgwalters added a commit to cgwalters/rpm-ostree that referenced this issue Sep 28, 2017
This is a quick band-aid to improve Ctrl-C handling in this area:
coreos#897

At least this way we'll exit earlier rather than waiting until all the repos are
downloaded (and imported into libsolv, which is itself slow).
rh-atomic-bot pushed a commit that referenced this issue Sep 28, 2017
This is a quick band-aid to improve Ctrl-C handling in this area:
#897

At least this way we'll exit earlier rather than waiting until all the repos are
downloaded (and imported into libsolv, which is itself slow).

Closes: #1018
Approved by: jlebon
@FotomicWS
Copy link

I had this issue running the Fedora 28 Atomic Workstation install and I’m not concerned that the system took a few minutes to respond, but now when I try and run my rpm-ostree upgrade again it’s failing with an error about a partial package at about the same point I canceled.

@jlebon
Copy link
Member

jlebon commented Apr 9, 2018

@FotomicWS, could you try cleaning out the cache using rpm-ostree cleanup -m and upgrading again?

@FotomicWS
Copy link

FotomicWS commented Apr 9, 2018

@jlebon Thanks for the note. I did try rpm-ostree cleanup -m and also rpm-ostree cleanup -b. But I still get that partial error. Also tried rpm-ostree fsck, rpm-ostree fsck --delete, rpm-ostree upgrade --download-only, and rpm-ostree refresh-md . Also tried using the 'software' applet which doesn't seem to install anything, just right away goes to reboot and shows the same programs as before.
edit;grammar

@jlebon
Copy link
Member

jlebon commented Apr 9, 2018

Could you file a separate issue? Make sure to also paste the exact error message you're receiving as well. Thanks!

@FotomicWS
Copy link

Tried it one more time to make sure I get that error message correct and it completed without error. I hadn't run the `rpm-ostree cleanup -m' previously, and I didn't reboot after that, so maybe rebooting was necessary. Been stuck on that error for days, '[18] Transferred a partial file'. Between that and trying to get pulse network going...reminds me of the supercross race in Seattle last weekend, LInux mudding. I see it downgraded Firefox, so maybe that was part of the issue. I'll reboot and file a separate issue if it's not completely resolved. Thanks again for the help. :)

@FotomicWS
Copy link

Looks good. I also ran that software update applet a few times after discovering that today too. It said it had updates, but it never installed, just prompted for reboot. But maybe that changed something. I don’t know why I hit Ctrl-C. Must have been tired, but I should have suspended and came back to it.

cgwalters added a commit to cgwalters/rpm-ostree that referenced this issue Nov 19, 2018
I've been wanting to do this for a long time, but was too intimidated
at the thought of doing it in C.

One big thing to do here is to move the transaction heavy lifting
into a subprocess.  That would be a lot of work; just forking
off the dnf fetching would help solve
coreos#897

Another case where I want do to this is to drop privileges for
the curl bits we do now for `rpm-ostree install http://`.

There's not a lot here yet, just me experimenting with Servo's
"ipc-channel".
cgwalters added a commit to cgwalters/rpm-ostree that referenced this issue Mar 4, 2019
I've been wanting to do this for a long time, but was too intimidated
at the thought of doing it in C.

One big thing to do here is to move the transaction heavy lifting
into a subprocess.  That would be a lot of work; just forking
off the dnf fetching would help solve
coreos#897

Another case where I want do to this is to drop privileges for
the curl bits we do now for `rpm-ostree install http://`.

There's not a lot here yet, just me experimenting with Servo's
"ipc-channel".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants