Skip to content

GRPC::Internal: invalid info line with submodule in RepositoryLinkFilter

A GRPC::Internal exception is occurring in the RepositoryLinkFilter when processing repository links that involve submodules. The error indicates that Gitaly is returning an invalid info line format when encountering submodule entries.

Error Details

  • Exception: GRPC::Internal: 13:find by revision and path: invalid info line: "8b41ea61a5cb6c1993d6a4440de5b5b0d5fceb40 submodule"
  • Location: lib/banzai/filter/repository_link_filter.rb:84 in get_blob_types
  • Root Cause: The get_blob_types method in BlobService doesn't handle submodule entries properly

Full Stack Trace

GRPC::Internal: 13:find by revision and path: invalid info line: "8b41ea61a5cb6c1993d6a4440de5b5b0d5fceb40 submodule". from grpc/generic/active_call.rb:29:in `check_status' from grpc/generic/active_call.rb:189:in `attach_status_results_and_complete_call' from grpc/generic/active_call.rb:174:in `receive_and_check_status' from 
grpc/generic/active_call.rb:344:in `each_remote_read_then_finish' from 
config/initializers/enumerator_next_patch.rb:11:in `block (2 levels) in 
<module:EnumeratorNextPatch>' from lib/gitlab/gitaly_client/call.rb:46:in `block (3 levels) in 
instrument_stream' from lib/gitlab/gitaly_client/call.rb:61:in `recording_request' from 
lib/gitlab/gitaly_client/call.rb:46:in `block (2 levels) in instrument_stream' from 
lib/gitlab/gitaly_client/call.rb:45:in `loop' from lib/gitlab/gitaly_client/call.rb:45:in `block in 
instrument_stream' from lib/gitlab/gitaly_client/blob_service.rb:244:in `each' from 
lib/gitlab/gitaly_client/blob_service.rb:244:in `each' from 
lib/gitlab/gitaly_client/blob_service.rb:244:in `map_blob_types' from 
lib/gitlab/gitaly_client/blob_service.rb:111:in `get_blob_types' from 
lib/banzai/filter/repository_link_filter.rb:84:in `get_blob_types' from 
lib/banzai/filter/repository_link_filter.rb:67:in `get_uri_types' from 
lib/banzai/filter/repository_link_filter.rb:53:in `load_uri_types' from 
lib/banzai/filter/repository_link_filter.rb:26:in `call' from 
lib/banzai/filter/concerns/pipeline_timing_check.rb:26:in `call' from html/pipeline/filter.rb:129:in
 `call' from lib/banzai/pipeline_base.rb:22:in `block in perform_filter' from 
html/pipeline.rb:174:in `block in instrument' from active_support/notifications.rb:206:in `block in instrument' from active_support/notifications/instrumenter.rb:58:in `instrument' from 
active_support/notifications.rb:206:in `instrument' from html/pipeline.rb:173:in `instrument' from 
lib/banzai/pipeline_base.rb:21:in `perform_filter'

Impact

  • Repository link processing fails when documents contain links to paths that resolve to submodules
  • This affects Markdown rendering in issues, merge requests, and wikis
  • Users see broken or unprocessed relative links

Technical Analysis

The issue occurs in the get_blob_types method which calls Gitaly's get_blobs RPC. When the path resolves to a submodule, Gitaly returns a different format that the current error handling doesn't account for. The existing error handling only catches GRPC::Unavailable and GRPC::DeadlineExceeded but not GRPC::Internal.

Edited by 🤖 GitLab Bot 🤖