Skip to content

fix: unaligned 64-bit atomic operation

Æx requested to merge ax10336/gitlab-pages:armhf-fix into master

What does this MR do?

Fix #624 (closed) & gitlab#337261 (closed) (@rnui2k)

Using mostly this gitlab#337261 (comment 661748503) from @ayufan

Tested directly with GOARCH=arm go build. Replaced original binary /opt/gitlab/embedded/bin/gitlab-pages, and finally restarted gitlab-ctl restart gitlab-pages

Log output:

{"level":"info","msg":"daemon received signal","signal":"signal: terminated","time":"2021-09-08T19:48:29+01:00"}
{"level":"info","msg":"GitLab Pages Daemon","revision":"HEAD","time":"2021-09-08T19:48:29+01:00","version":"dev"}
{"level":"info","msg":"URL: https://gitlab.com/gitlab-org/gitlab-pages","time":"2021-09-08T19:48:29+01:00"}
{"gid":994,"level":"info","msg":"running the daemon as unprivileged user","pages-root":"/var/opt/gitlab/gitlab-rails/shared/pages","time":"2021-09-08T19:48:29+01:00","uid":998}
time="2021-09-08T19:48:29+01:00" level=info msg="starting the daemon as unprivileged user" gid=994 uid=998 wd=/var/opt/gitlab/gitlab-rails/shared/pages
{"content_type":"text/html; charset=utf-8","correlation_id":"01FF3BW7TYR7GJEA8SCBAAF7TW","duration_ms":19,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":302,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":19,"uri":"/gitbook_test","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":56}
{"content_type":"text/html; charset=utf-8","correlation_id":"01FF3BW87CAH60T0HSPHP4X3E8","duration_ms":10,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":10,"uri":"/gitbook_test/","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":11295}
{"content_type":"application/javascript","correlation_id":"01FF3BW8A9DJDQPKWM7C1AE3DQ","duration_ms":5,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":2,"uri":"/gitbook_test/gitbook/gitbook.js","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":105401}
{"content_type":"application/javascript","correlation_id":"01FF3BW8AAPZ8KKPQY1ZK96KTA","duration_ms":6,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":2,"uri":"/gitbook_test/gitbook/theme.js","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":113264}
{"content_type":"text/css; charset=utf-8","correlation_id":"01FF3BW8AZP4539TTQGT0NK7J8","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/gitbook-plugin-highlight/website.css","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":31446}
{"content_type":"application/javascript","correlation_id":"01FF3BW8B0W4YZ4H9W6XR62QF6","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/gitbook-plugin-search/search-engine.js","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":1268}
{"content_type":"text/css; charset=utf-8","correlation_id":"01FF3BW8B20BN04FQZ8SBRM3JK","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/gitbook-plugin-fontsettings/website.css","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":8596}
{"content_type":"application/javascript","correlation_id":"01FF3BW8B350KZ37ZZCCWKEQ13","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/gitbook-plugin-fontsettings/fontsettings.js","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":6447}
{"content_type":"text/css; charset=utf-8","correlation_id":"01FF3BW8B4EEP31XNFJXHZZ0K6","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/gitbook-plugin-search/search.css","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":974}
{"content_type":"application/javascript","correlation_id":"01FF3BW8B5FJ99RTF0A9RTC4WH","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/gitbook-plugin-sharing/buttons.js","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":2875}
{"content_type":"application/javascript","correlation_id":"01FF3BW8B6MG6HANZQQWX6F3RN","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/gitbook-plugin-lunr/search-lunr.js","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":1616}
{"content_type":"text/css; charset=utf-8","correlation_id":"01FF3BW8AZP4539TTQGSMV2GCZ","duration_ms":10,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":9,"uri":"/gitbook_test/gitbook/style.css","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":52701}
{"content_type":"application/javascript","correlation_id":"01FF3BW8B7Q6RR1R3V0J5DSCCW","duration_ms":4,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":4,"uri":"/gitbook_test/gitbook/gitbook-plugin-search/search.js","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":6368}
{"content_type":"application/javascript","correlation_id":"01FF3BW8B9RDS4N4MG88V56XSC","duration_ms":2,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/gitbook-plugin-lunr/lunr.min.js","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":15005}
{"content_type":"application/json","correlation_id":"01FF3BW8EMX0B7MKRQK1CV0S22","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/search_index.json","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":23188}
{"content_type":"font/woff2","correlation_id":"01FF3BW8F8S405NZBAEJPPPAMA","duration_ms":2,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/gitbook/style.css","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/fonts/fontawesome/fontawesome-webfont.woff2?v=4.6.3","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":71896}
{"content_type":"image/png","correlation_id":"01FF3BW8GSPE1KAT3PANF3VRJS","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/images/apple-touch-icon-precomposed-152.png","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":4817}
{"content_type":"image/x-icon","correlation_id":"01FF3BW8GVJQKX6588NPJMZ9Y3","duration_ms":1,"host":"sandbox.p.somewhere.nolan","level":"info","method":"GET","msg":"access","pages_host":"sandbox.p.somewhere.nolan","pages_https":true,"pages_project_id":136,"pages_project_prefix":"/gitbook_test/","pages_project_serving_type":"zip","proto":"HTTP/1.0","referrer":"https://sandbox.p.somewhere.nolan/gitbook_test/","remote_addr":"192.168.1.123","remote_ip":"192.168.1.123","status":200,"system":"http","time":"2021-09-08T19:49:14+01:00","ttfb_ms":1,"uri":"/gitbook_test/gitbook/images/favicon.ico","user_agent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0","written_bytes":4286}

TODO

Edited by Jaime Martinez

Merge request reports