Bug 1208296 - coredump when running do_transaction in a separate process with https repos
coredump when running do_transaction in a separate process with https repos
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
21
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-01 17:39 EDT by Brian Lane
Modified: 2015-12-02 12:49 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-02 05:45:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
script to demonstrate the problem (3.21 KB, text/plain)
2015-04-01 17:40 EDT, Brian Lane
no flags Details
backtrace from systemd-coredump (7.20 KB, text/plain)
2015-04-01 17:41 EDT, Brian Lane
no flags Details

  None (edit)
Description Brian Lane 2015-04-01 17:39:44 EDT
vpodzime discovered a problem with lorax while using it with a copr repo. I've simplfied a reproducer and tracked it down to using https repos.

I'm not sure if this is an actual bug, or just a limitation of how SSL is setup by dnf/hawkey/rpm/whatever.

lorax uses the python2 multiprocessing module to run the do_transaction() in a separate process. If one or more of the repos used is https this will coredump down in librpm. I've attached the traceback logged by systemd-coredump as well as the coredump file.
Comment 1 Brian Lane 2015-04-01 17:40:45 EDT
Created attachment 1009866 [details]
script to demonstrate the problem

You'll have to edit this to change the proxy settings or remove them.
Comment 2 Brian Lane 2015-04-01 17:41:10 EDT
Created attachment 1009867 [details]
backtrace from systemd-coredump
Comment 3 Brian Lane 2015-04-01 17:42:42 EDT
Running on a F21 system with:

dnf --version
0.6.4
  Installed: dnf-0:0.6.4-1.fc21.noarch at 2015-02-23 15:25
  Built    : Fedora Project at 2015-02-09 12:56

  Installed: rpm-0:4.12.0.1-5.fc21.x86_64 at 2015-03-23 02:38
  Built    : Fedora Project at 2015-03-03 17:32
Comment 5 Honza Silhan 2015-04-07 11:39:25 EDT
It crashes on my system too. Whats the reason to run do_transaction in multiple processes? There's still dnf lock above rpmdb. I thought that you run downloading of packages in one process and installation in another.
Comment 6 Brian Lane 2015-04-07 16:57:07 EDT
That's the way Ales wrote it -- the lorax code was modeled on the dnfpayload module from anaconda.

In reality we just need to be able to feed the callback information to the UI while do_transaction is running, so a non-multiprocessing thread works fine for that (vpodzime wrote a patch to do that).
Comment 7 Vratislav Podzimek 2015-04-10 04:23:08 EDT
(In reply to bcl@redhat.com from comment #6)
> That's the way Ales wrote it -- the lorax code was modeled on the dnfpayload
> module from anaconda.
> 
> In reality we just need to be able to feed the callback information to the
> UI while do_transaction is running, so a non-multiprocessing thread works
> fine for that (vpodzime wrote a patch to do that).
That however has the problem with rpm doing chroot() when processing RPMs. Because of that we need to run the transaction in a separate process, thread is not enough, unfortunately. However, that doesn't apply to the downloading phase for which threads are okay.
Comment 8 Honza Silhan 2015-04-20 06:07:15 EDT
From today rpm discussion on IRC:
- rpm don't want to do fakechroot instead to ensure scriplets are executed in right path
- there could be function in rpmlib which will spawn another process, chroot it and IPC to the parent (there could be issues with other libs having problem with fork)
Comment 9 Brian Lane 2015-09-09 19:03:59 EDT
In lorax we don't really need threads or processes, it isn't doing anything else. This patch drops all that extra stuff:

https://github.com/rhinstaller/lorax/pull/50

Should we just move this back to lorax? This fixes for me.
Comment 10 Fedora End Of Life 2015-11-04 05:18:28 EST
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 11 Fedora End Of Life 2015-12-02 05:45:20 EST
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.