Actions
Bug #16885
closedPossible concistency error when auto_execute with large number of tasks
Description
We got some reports around Ruby VM consistency errors, while starting
foreman tasks:
/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
It seems the `to_a` calls are not enough to avoid the dataset's each thread unsafety, and we need to use `all` instead.
Updated by Ivan Necas about 8 years ago
- Pull request https://github.com/Dynflow/dynflow/pull/205 added
Updated by Adam Ruzicka about 8 years ago
- Status changed from Assigned to Closed
Actions