500 errors when accessing Wiki with '2:Rugged::ZlibError: error inflating zlib stream.' error
Summary
When accessing some Wiki pages, 500 errors are thrown. Other wiki pages load without error.
git fsck
shows no errors in repo
e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683.wiki.git]# /opt/gitlab/embedded/bin/git fsck --full
Checking object directories: 100% (256/256), done.
Checking objects: 100% (29889/29889), done.
Verifying commits in commit graph: 100% (7771/7771), done.
No errors in integrity check
# gitlab-rake gitlab:git:fsck
Performed integrity check for piyo/repo1
...
Performed integrity check for piyo/repo100
Done
I originally thought that the bug was related to a libgit2 issue regarding repositories greater than 4GB but the repository in question is only 2GB.
No other issues reported.
What is the current bug behavior?
500 errors when opening up a wiki page.
What is the expected correct behavior?
Normal page loads; 200.
Relevant logs and/or screenshots
/var/log/gitlab/gitaly/current
{
"correlation_id": "01F4GPMACD58W81MQJR72VKVBJ",
"grpc.code": "OK",
"grpc.meta.auth_version": "v2",
"grpc.meta.client_name": "gitlab-web",
"grpc.meta.deadline_type": "regular",
"grpc.method": "WikiFindPage",
"grpc.request.deadline": "2021-04-30T06:14:46.003Z",
"grpc.request.fullMethod": "/gitaly.WikiService/WikiFindPage",
"grpc.request.glProjectPath": "piyo/hoge.wiki",
"grpc.request.glRepository": "wiki-6",
"grpc.request.repoPath": "@hashed/e7/f6/e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683.wiki.git",
"grpc.request.repoStorage": "default",
"grpc.request.topLevelGroup": "@hashed",
"grpc.service": "gitaly.WikiService",
"grpc.start_time": "2021-04-30T06:14:36.233Z",
"grpc.time_ms": 51.982,
"level": "info",
"msg": "finished streaming call with code OK",
"peer.address": "@",
"pid": 61644,
"remote_ip": "133.32.224.161",
"span.kind": "server",
"system": "grpc",
"time": "2021-04-30T06:14:36.285Z",
"username": "piyopiyo"
}
{
"correlation_id": "01F4GPMACD58W81MQJR72VKVBJ",
"grpc.code": "OK",
"grpc.meta.auth_version": "v2",
"grpc.meta.client_name": "gitlab-web",
"grpc.meta.deadline_type": "regular",
"grpc.method": "WikiFindPage",
"grpc.request.deadline": "2021-04-30T06:14:46.006Z",
"grpc.request.fullMethod": "/gitaly.WikiService/WikiFindPage",
"grpc.request.glProjectPath": "piyo/hoge.wiki",
"grpc.request.glRepository": "wiki-6",
"grpc.request.repoPath": "@hashed/e7/f6/e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683.wiki.git",
"grpc.request.repoStorage": "default",
"grpc.request.topLevelGroup": "@hashed",
"grpc.service": "gitaly.WikiService",
"grpc.start_time": "2021-04-30T06:14:36.286Z",
"grpc.time_ms": 50.079,
"level": "info",
"msg": "finished streaming call with code OK",
"peer.address": "@",
"pid": 61644,
"remote_ip": "133.32.224.161",
"span.kind": "server",
"system": "grpc",
"time": "2021-04-30T06:14:36.337Z",
"username": "piyopiyo"
}
{
"correlation_id": "01F4GPMACD58W81MQJR72VKVBJ",
"error": "rpc error: code = Unknown desc = Rugged::ZlibError: error inflating zlib stream",
"grpc.code": "Unknown",
"grpc.meta.auth_version": "v2",
"grpc.meta.client_name": "gitlab-web",
"grpc.meta.deadline_type": "regular",
"grpc.method": "WikiGetPageVersions",
"grpc.request.deadline": "2021-04-30T06:15:06.068Z",
"grpc.request.fullMethod": "/gitaly.WikiService/WikiGetPageVersions",
"grpc.request.glProjectPath": "piyo/hoge.wiki",
"grpc.request.glRepository": "wiki-6",
"grpc.request.repoPath": "@hashed/e7/f6/e7f6c011776e8db7cd330b54174fd76f7d0216b612387a5ffcfb81e6f0919683.wiki.git",
"grpc.request.repoStorage": "default",
"grpc.request.topLevelGroup": "@hashed",
"grpc.service": "gitaly.WikiService",
"grpc.start_time": "2021-04-30T06:14:36.368Z",
"grpc.time_ms": 1162.107,
"level": "error",
"msg": "finished streaming call with code Unknown",
"peer.address": "@",
"pid": 61644,
"remote_ip": "133.32.224.161",
"span.kind": "server",
"system": "grpc",
"time": "2021-04-30T06:14:37.530Z",
"username": "piyopiyo"
}
/var/log/gitlab/gitlab-rails/production_json.log
{
"method": "GET",
"path": "/piyo/hoge/-/wikis/fugafuga",
"format": "html",
"controller": "Projects::WikisController",
"action": "show",
"status": 500,
"time": "2021-04-30T06:14:37.533Z",
"params": [
{
"key": "namespace_id",
"value": "piyo"
},
{
"key": "project_id",
"value": "hoge"
},
{
"key": "id",
"value": "fugafuga"
}
],
"remote_ip": "133.32.224.161",
"user_id": 56,
"username": "piyopiyo",
"ua": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36",
"correlation_id": "01F4GPMACD58W81MQJR72VKVBJ",
"meta.user": "piyopiyo",
"meta.project": "piyo/hoge",
"meta.root_namespace": "piyo",
"meta.caller_id": "Projects::WikisController#show",
"meta.remote_ip": "133.32.224.161",
"meta.feature_category": "wiki",
"meta.client_id": "user/56",
"gitaly_calls": 3,
"gitaly_duration_s": 1.163519,
"redis_calls": 6,
"redis_duration_s": 0.0072,
"redis_read_bytes": 552,
"redis_write_bytes": 1149,
"redis_cache_calls": 4,
"redis_cache_duration_s": 0.006376,
"redis_cache_read_bytes": 313,
"redis_cache_write_bytes": 422,
"redis_shared_state_calls": 2,
"redis_shared_state_duration_s": 0.000824,
"redis_shared_state_read_bytes": 239,
"redis_shared_state_write_bytes": 727,
"db_count": 11,
"db_write_count": 0,
"db_cached_count": 1,
"cpu_s": 0.082304,
"mem_objects": 35348,
"mem_bytes": 3263616,
"mem_mallocs": 9921,
"queue_duration_s": 0.004743,
"exception.class": "ActionView::Template::Error",
"exception.message": "2:Rugged::ZlibError: error inflating zlib stream.",
"exception.backtrace": [
"lib/gitlab/git/wraps_gitaly_errors.rb:15:in `rescue in wrapped_gitaly_errors'",
"lib/gitlab/git/wraps_gitaly_errors.rb:6:in `wrapped_gitaly_errors'",
"lib/gitlab/git/wiki.rb:110:in `page_versions'",
"app/models/wiki_page.rb:133:in `versions'",
"app/models/wiki_page.rb:143:in `last_version'",
"app/views/shared/wikis/show.html.haml:9",
"app/controllers/application_controller.rb:123:in `render'",
"app/controllers/concerns/wiki_actions.rb:81:in `show'",
"ee/lib/gitlab/ip_address_state.rb:10:in `with'",
"ee/app/controllers/ee/application_controller.rb:44:in `set_current_ip_address'",
"app/controllers/application_controller.rb:485:in `set_current_admin'",
"lib/gitlab/session.rb:11:in `with_session'",
"app/controllers/application_controller.rb:476:in `set_session_storage'",
"lib/gitlab/i18n.rb:73:in `with_locale'",
"lib/gitlab/i18n.rb:79:in `with_user_locale'",
"app/controllers/application_controller.rb:470:in `set_locale'",
"app/controllers/application_controller.rb:463:in `block in set_current_context'",
"lib/gitlab/application_context.rb:70:in `block in use'",
"lib/gitlab/application_context.rb:70:in `use'",
"lib/gitlab/application_context.rb:27:in `with_context'",
"app/controllers/application_controller.rb:454:in `set_current_context'",
"lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call'",
"lib/gitlab/middleware/rails_queue_duration.rb:33:in `call'",
"lib/gitlab/metrics/rack_middleware.rb:16:in `block in call'",
"lib/gitlab/metrics/transaction.rb:56:in `run'",
"lib/gitlab/metrics/rack_middleware.rb:16:in `call'",
"lib/gitlab/request_profiler/middleware.rb:17:in `call'",
"lib/gitlab/jira/middleware.rb:19:in `call'",
"lib/gitlab/middleware/go.rb:20:in `call'",
"lib/gitlab/etag_caching/middleware.rb:21:in `call'",
"lib/gitlab/middleware/multipart.rb:172:in `call'",
"lib/gitlab/middleware/read_only/controller.rb:50:in `call'",
"lib/gitlab/middleware/read_only.rb:18:in `call'",
"lib/gitlab/middleware/same_site_cookies.rb:27:in `call'",
"lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call'",
"lib/gitlab/middleware/basic_health_check.rb:25:in `call'",
"lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call'",
"lib/gitlab/middleware/request_context.rb:21:in `call'",
"config/initializers/fix_local_cache_middleware.rb:11:in `call'",
"lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:21:in `call'",
"lib/gitlab/metrics/requests_rack_middleware.rb:76:in `call'",
"lib/gitlab/middleware/release_env.rb:12:in `call'"
],
"db_duration_s": 0.00536,
"view_duration_s": 0.0,
"duration_s": 1.33698
}
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
sudo gitlab-rake gitlab:env:info System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.7.2p137 Gem Version: 3.1.4 Bundler Version:2.1.4 Rake Version: 13.0.3 Redis Version: 6.0.12 Git Version: 2.31.1 Sidekiq Version:5.2.9 Go Version: unknown GitLab information Version: 13.11.2-ee Revision: 5898a459003 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 12.6 URL: https://example.tld HTTP Clone URL: https://example.tld/some-group/some-project.git SSH Clone URL: git@example.tld:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.17.0 Repository storage paths: - default: /var/opt/gitlab/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
sudo gitlab-rake gitlab:check SANITIZE=true Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.17.0 ? ... OK (13.17.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes (cluster/worker) ... 1/1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 6/1 ... yes 6/2 ... yes 6/3 ... yes 4/4 ... yes 6/6 ... yes 2/9 ... yes 6/11 ... yes 6/12 ... yes 6/13 ... yes 4/16 ... yes 16/17 ... yes 6/18 ... yes 4/19 ... yes 16/20 ... yes 13/21 ... yes 13/22 ... yes 17/23 ... yes 6/26 ... yes 10/27 ... yes 28/29 ... yes 28/32 ... yes 12/34 ... yes 6/35 ... yes 4/36 ... yes 6/39 ... yes 6/41 ... yes 16/43 ... yes 35/48 ... yes 6/49 ... yes 6/53 ... yes 13/56 ... yes 6/57 ... yes 6/58 ... yes 6/60 ... yes 35/61 ... yes 33/62 ... yes 6/64 ... yes 6/65 ... yes 35/66 ... yes 45/71 ... yes 45/72 ... yes 45/73 ... yes 6/74 ... yes 10/75 ... yes 16/77 ... yes 16/78 ... yes 6/80 ... yes 6/81 ... yes 35/82 ... yes 6/83 ... yes Redis version >= 5.0.0? ... yes Ruby version >= 2.7.2 ? ... yes (2.7.2) Git version >= 2.31.0 ? ... yes (2.31.1) Git user has default SSH configuration? ... yes Active users: ... 46 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 7.x (6.4 - 6.x deprecated to be removed in 13.8)? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished