# Discourse update keeps failing

**URL:** https://meta.discourse.org/t/discourse-update-keeps-failing/231862
**Category:** Self-hosting
**Created:** [July 4, 2022, 9:34am UTC](https://meta.discourse.org/t/discourse-update-keeps-failing/231862 "2022-07-04T09:34:40Z")
**Posts on this page:** 1
**Showing post:** 33

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [July 5, 2022, 3:32pm UTC](https://meta.discourse.org/t/discourse-update-keeps-failing/231862/33 "2022-07-05T15:32:02Z")

</div>

Our current base image ships 3.13.14 so it is being compiled on your system.

Can you try reproducing the error with the benchmark script from [the commit](https://github.com/ohler55/oj/commit/a455c389c0bd09cb591d1144e9366fc3f3280da0):

```plaintext
○ → docker run --rm -it -u discourse discourse/base:2.0.20220621-0049 bash
discourse@313d7af3be39:/$ cd
discourse@313d7af3be39:~$ gem install --user pry benchmark-ips oj
…
Successfully installed oj-3.13.15
5 gems installed
discourse@313d7af3be39:~$ /home/discourse/.local/share/gem/ruby/2.7.0/bin/pry
[1] pry(main)> require 'benchmark/ips'
require 'oj'

def json(string)
  "\"#{string}\""
end

Benchmark.ips do |x|
  x.warmup = 5
  x.time = 20

  json_0 = json('a' * 0)
  json_64 = json('a' * 64)
  json_128 = json('a' * 128)

  x.report('Oj.load [0]') { Oj.load(json_0) }
  x.report('Oj.load [64]') { Oj.load(json_64) }
  x.report('Oj.load [128]') { Oj.load(json_128) }
end;

```

You can also check whether or not it was compiled using the problematic instruction with:

```plaintext
discourse@313d7af3be39:~$ objdump -d /home/discourse/.local/share/gem/ruby/2.7.0/gems/oj-3.13.15/lib/oj/oj.so | grep -C3 pcmpestri
   2e32b:	0f 82 b5 03 00 00 jb 2e6e6 <oj_parse2+0x8a6>
   2e331:	66 0f 6f 05 77 d6 01 movdqa 0x1d677(%rip),%xmm0 # 4b9b0 <exp_plus+0x330>
   2e338:	00 
   2e339:	66 0f 3a 61 07 00 pcmpestri $0x0,(%rdi),%xmm0
   2e33f:	83 f9 10 cmp $0x10,%ecx
   2e342:	74 dc je 2e320 <oj_parse2+0x4e0>
   2e344:	48 63 c9 movslq %ecx,%rcx

```

If so, this is probably something to report to the oj gem’s project.

---

_[View the full topic](https://meta.discourse.org/t/discourse-update-keeps-failing/231862)._
