Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1384074 - Possible consistency error when auto_execute with large number of tasks
Summary: Possible consistency error when auto_execute with large number of tasks
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Roman Plevka
URL:
Whiteboard:
Depends On:
Blocks: 1394362
TreeView+ depends on / blocked
 
Reported: 2016-10-12 13:27 UTC by Ivan Necas
Modified: 2020-09-10 09:51 UTC (History)
12 users (show)

Fixed In Version: rubygem-dynflow-0.8.13.3-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1394362 (view as bug list)
Environment:
Last Closed: 2016-12-12 17:14:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 16885 0 None None None 2016-10-12 13:27:35 UTC
Red Hat Product Errata RHBA-2016:2940 0 normal SHIPPED_LIVE Satellite 6.2.5 Async Bug Release 2016-12-12 22:08:21 UTC

Description Ivan Necas 2016-10-12 13:27:34 UTC
We got some reports around Ruby VM consistency errors, while starting
foreman tasks:

<pre>
/opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:139: [BUG] Stack consistency error (sp: 303, bp: 302)
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0070 p:0011 s:0303 e:000301 BLOCK  /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:139
c:0069 p:0008 s:0299 e:000298 BLOCK  /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:655
c:0068 p:0021 s:0296 e:000295 BLOCK  /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:878 [FINISH]
c:0067 p:---- s:0292 e:000291 CFUNC  :times
c:0066 p:0010 s:0289 e:000288 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:872
c:0065 p:0014 s:0284 e:000283 BLOCK  /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:655
c:0064 p:0037 s:0281 e:000280 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:169
c:0063 p:0048 s:0275 e:000274 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:511
c:0062 p:0018 s:0268 e:000267 BLOCK  /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:335
c:0061 p:0008 s:0266 e:000265 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:532
c:0060 p:0007 s:0262 e:000261 BLOCK  /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:335
c:0059 p:0008 s:0259 e:000258 BLOCK  /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:250
c:0058 p:0163 s:0256 e:000255 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/connection_pool/threaded.rb:98
c:0057 p:0020 s:0246 e:000245 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/database/connecting.rb:250
c:0056 p:0022 s:0242 e:000241 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:335
c:0055 p:0059 s:0236 e:000235 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:911
c:0054 p:0030 s:0229 E:0017a8 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/adapters/postgres.rb:655
c:0053 p:0031 s:0225 E:001bf8 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/sequel-4.20.0/lib/sequel/dataset/actions.rb:139 [FINISH]
c:0052 p:---- s:0221 E:000458 CFUNC  :to_a
c:0051 p:0021 s:0218 e:000217 BLOCK  /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/persistence_adapters/sequel.rb:266
c:0050 p:0013 s:0216 e:000215 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/persistence_adapters/sequel.rb:339
c:0049 p:0016 s:0211 e:000210 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/persistence_adapters/sequel.rb:266
c:0048 p:0011 s:0204 e:000203 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/persistence_adapters/sequel.rb:117
c:0047 p:0011 s:0200 e:000199 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/persistence.rb:80
c:0046 p:0014 s:0195 e:000194 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/execution_plan.rb:409
c:0045 p:0035 s:0187 e:000186 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/execution_plan.rb:341
c:0044 p:0029 s:0180 e:000179 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/persistence.rb:47
c:0043 p:0013 s:0175 e:000174 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/executors/parallel/core.rb:83
c:0042 p:0012 s:0168 e:000166 METHOD /opt/theforeman/tfm/root/usr/share/gems/gems/dynflow-0.8.13.1/lib/dynflow/executors/parallel/core.rb:18
</pre>

It seems the `to_a` calls are not enough to avoid the dataset's each thread unsafety, and we need to use `all` instead.

Comment 1 Ivan Necas 2016-10-12 13:27:37 UTC
Created from redmine issue http://projects.theforeman.org/issues/16885

Comment 2 Ivan Necas 2016-10-12 13:27:42 UTC
Upstream bug assigned to inecas

Comment 4 Bryan Kearney 2016-10-18 10:05:53 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16885 has been resolved.

Comment 20 Roman Plevka 2016-12-06 12:32:01 UTC
VERIFIED
on
# rpm -qa satellite
satellite-6.2.5-1.0.el7sat.noarch

- no consistency errors present in the dynflow executor logs after completing the test suite.

Comment 21 errata-xmlrpc 2016-12-12 17:14:54 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:2940


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