The core dump and the invalid instruction indicate that something is going wrong at a low level (CPU, memory).
I am not a hardware expert, but this CPU came on the market 12 years ago and I suspect it might be too old (i.e. it is trying to run compiled code that assumes a newer CPU).
We did think about this, but given it has been working fine for the last three years what would have been updated within the stack that suddenly requires a newer instruction? (Also, what/which instruction?)
I also want to add that last Friday the major version upgrade was performed seamlessly and it ran the entire weekend without a hitch. I even performed a successful update on Sunday. If it is the CPU, which is understandable, is the cause then it would’ve shown this error with the major version upgrade.
But, perhaps there has been a change since Monday…
I’m going to try some quasi-bisecting on the latest set of commits and see if I can narrow it down to a specific recent change. This will take “some time”…
Some previous commits also fail to build but with a different issue (which also seems like it could be transient…):
I, [2022-07-05T12:14:35.377926 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
102:M 05 Jul 2022 12:14:44.308 * 100 changes in 300 seconds. Saving...
102:M 05 Jul 2022 12:14:44.312 * Background saving started by pid 709
709:C 05 Jul 2022 12:14:45.166 * DB saved on disk
709:C 05 Jul 2022 12:14:45.169 * RDB: 1 MB of memory used by copy-on-write
102:M 05 Jul 2022 12:14:45.217 * Background saving terminated with success
I, [2022-07-05T12:14:46.192386 #1] INFO -- :
I, [2022-07-05T12:14:46.193317 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile'
Missing yarn packages:
Package: ember-cli-deprecation-workflow
* Specified: ^2.1.0
* Installed: (not installed)
Run `yarn` to install missing dependencies.
Stack Trace and Error Report: /tmp/error.dump.ccfa3d8342a442ee6860db37ce7c7330.log
An error occurred in the constructor for ember-cli-dependency-checker at /var/www/discourse/app/assets/javascripts/node_modules/ember-cli-dependency-checker
error Command failed with exit code 1.
Lovely. An additional change not mentioned in the oj changelog…
So, if the gem doesn’t do its native compilation during installation (so we could potentially prod it into working via OJ_USE_SSE4_2), it looks like it’s going to need a server move…
Edit: the gem doesn’t distribute any pre-compiled objects so this should be workable - so the next question is why it’s compiling with SSE4.2 on a system that doesn’t support it.
I do want to look into this some more, but 1) I want to avoid more downtime (for a while at least; I know the above doesn’t involve downtime but I might be tempted to try other things) and 2) when this changes:
to 3.13.15 and the Discourse base image inherits that same minimum CPU microarchitecture requirement, then the current server isn’t going to be sustainable anyway (unless there’s a way of working around it, like (re)installing the gem separately e.g. as part a pre-code hook, but I’d also guess that’s a bit of a faff for most people).
It also raises the question of what a reasonable cut-off date for hardware support should be anyway; it’s not reasonable to expect 32-bit CPU support, so perhaps SSE4.2 is a reasonable “new minimum” for modern software.
Thank you for looking in to this. I am having the same issue on an Intel Atom N2800 (from end of 2011).
Do you think there might be a way around this issue or the only thing I can do for now is to migrate to a newer hardware ?
I’m dead in the water now with my forum with the update I was prompted to do today. I never saw any warnings about upcoming obsoleting of any CPUs, and to have this happen suddenly is … bad. The available servers all are the same configuration for consistency, and all use the same CPU.
AMD Athlon™ II X2 B22 Processor
Not practical to run out and buy a new server, configure, etc. in this economy, even given the time.
How can I back out of this update until this situation is better understood? I can’t even contact my users right now with the forum down. Thanks.
If you’re using the Docker deployment method, you may have an older container which you can restart (check e.g. docker images and/or docker ps -a).
You can also override the commit used to build the Discourse instance by editing app.yml and setting the version to the commit prior to the change, then rebuilding:
Discourse will break again if you update after this, which is not ideal given the security update that has been released since (although exploitation potential seems pretty limited for most instances).
One option (which I haven’t tried yet) is to install the oj gem separately and hope to trigger compilation with the correct CPU features (or lack thereof).
I had planned to try this in app.yml:
hooks:
before_code:
- exec:
cmd:
- gem install oj
but I haven’t got the scope for more forum downtime.
That specific security update doesn’t appear relevant to me since I’m not in a shared hosting environment. I’m unsure how to interpret the docker info. Here’s the ps:
37c258b23221 local_discourse/app “/sbin/boot” 3 months ago Exited (7) 3 hours ago
Here’s the image list:
REPOSITORY TAG IMAGE ID CREATED SIZE
discourse/base 2.0.20220621-0049 a44ca4f67972 3 weeks ago 2.65GB
local_discourse/app latest b5f2a8a39709 3 months ago 3.53GB
discourse/base 2.0.20220413-0411 ab71a5d97460 3 months ago 2.81GB
<none> <none> 58ba7d1c8d7a 3 months ago 3.74GB
discourse/base 2.0.20220224-2005 cd112601450a 4 months ago 2.84GB
<none> <none> d9cf1feb92fd 6 months ago 3.19GB
<none> <none> d53ee33f6fe1 6 months ago 3.19GB
<none> <none> 14f79500c49c 6 months ago 3.19GB
<none> <none> edff9b614f46 6 months ago 3.19GB
<none> <none> e2348b41f937 6 months ago 3.19GB
<none> <none> 42f6511b414c 6 months ago 3.19GB
<none> <none> 3086f92af2fe 6 months ago 3.19GB
<none> <none> 6ada029723ba 6 months ago 3.19GB
<none> <none> ca61149580d4 6 months ago 3.19GB
<none> <none> ce5ae3bb62ac 6 months ago 3.19GB
<none> <none> e9a5c1b1aed4 6 months ago 3.19GB
<none> <none> 6bb94ce1e01f 6 months ago 3.19GB
<none> <none> e1df4acbd927 6 months ago 3.19GB
<none> <none> 7e05a0b160c5 6 months ago 3.19GB
<none> <none> 979926f28a73 6 months ago 3.19GB
<none> <none> d055f9b01556 6 months ago 3.19GB
<none> <none> aa0c779093dc 6 months ago 3.19GB
discourse/base 2.0.20211118-0105 b6cc7cf8974a 7 months ago 2.58GB
discourse/base 2.0.20210528-1735 482386bf57af 13 months ago 2.36GB
<none> <none> e6011d2b206c 14 months ago 2.69GB
discourse/base 2.0.20210415-1332 30e4746e631e 15 months ago 2.23GB
<none> <none> 8066ac13b8c3 17 months ago 2.45GB
discourse/base 2.0.20201221-2020 c0704d4ce2b4 18 months ago 2.11GB
<none> <none> 043da6b3335d 2 years ago 2.4GB
discourse/base 2.0.20200429-2110 dc919e1dae2c 2 years ago 2.13GB
<none> <none> ff15472f4794 2 years ago 2.79GB
discourse/base 2.0.20191013-2320 09725007dc9e 2 years ago 2.3GB
<none> <none> f65391a062f0 2 years ago 2.62GB
discourse/base 2.0.20190901-2315 10f636afbeaf 2 years ago 2.29GB
<none> <none> 6944d06786b4 2 years ago 2.31GB
discourse/base 2.0.20190625-0946 2b3a5b47565f 3 years ago 1.93GB
<none> <none> 60b39deba7d2 3 years ago 2.3GB
discourse/base 2.0.20190505-2322 ed87227f60d2 3 years ago 1.91GB
<none> <none> cc5c0e56298c 3 years ago 2.38GB
discourse/base 2.0.20190321-0122 7db99586b5b5 3 years ago 1.97GB
<none> <none> b19f9a483788 3 years ago 2.27GB
discourse/base 2.0.20190217 9c24db193c37 3 years ago 1.92GB
hello-world latest fce289e99eb9 3 years ago 1.84kB
<none> <none> 614db6988e9c 3 years ago 2.25GB
<none> <none> 729b196da862 3 years ago 2.25GB
<none> <none> 80584ec5ec01 3 years ago 2.25GB
<none> <none> 0e2481aefed8 3 years ago 2.25GB
<none> <none> 725d0c17a6bb 3 years ago 2.25GB
<none> <none> 220bed95d236 3 years ago 2.25GB
<none> <none> fca469dba597 3 years ago 2.25GB
<none> <none> edab31d0ffce 3 years ago 2.25GB
<none> <none> dbacaff2d35e 3 years ago 2.25GB
<none> <none> 3d6a0453da1d 3 years ago 2.25GB
<none> <none> fbf0529eb303 3 years ago 2.25GB
<none> <none> 7a45443ae44c 3 years ago 2.25GB
<none> <none> ad90d7f42416 3 years ago 2.25GB
<none> <none> d61ea07d6084 3 years ago 2.25GB
<none> <none> d393fd8b4de0 3 years ago 2.25GB
discourse/base 2.0.20181031 ea31cd77735a 3 years ago 1.88GB