Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation Fault #19932

Open
jonyscathe opened this issue Jan 9, 2025 · 5 comments
Open

Segmentation Fault #19932

jonyscathe opened this issue Jan 9, 2025 · 5 comments

Comments

@jonyscathe
Copy link

What version of protobuf and what language are you using?
Version: 4.29.3
Language: Ruby

What operating system (Linux, Windows, ...) and version?
Linux (ruby:3.4.1-alpine Docker image)

What runtime / compiler are you using (e.g., python version or gcc version)
Ruby 3.4.1

What did you do?
Installed sqlint gem.
Ran sqlint

What did you expect to see
sqlint to run.

What did you see instead?
Segmentation fault.
No segmentation fault with protobuf 4.29.2, so that seems to be the culprit (or at the very least shows up a either a ruby bug, or some issue with how pg_query is using protobuf).

The segmentation fault occurs within pg_query when it tries to decode a query. The PgQuery::ParseResult.decode(result, recursion_limit: 1_000) line below:

  def self.parse(query)
    result, stderr = parse_protobuf(query)

    begin
      result = if PgQuery::ParseResult.method(:decode).arity == 1
                 PgQuery::ParseResult.decode(result)
               elsif PgQuery::ParseResult.method(:decode).arity == -1
                 PgQuery::ParseResult.decode(result, recursion_limit: 1_000)
               else
                 raise ArgumentError, 'Unsupported protobuf Ruby API'
               end
    rescue Google::Protobuf::ParseError => e
      raise PgQuery::ParseError.new(format('Failed to parse tree: %s', e.message), __FILE__, __LINE__, -1)
    end

    warnings = []
    stderr.each_line do |line|
      next unless line[/^WARNING/]
      warnings << line.strip
    end

    PgQuery::ParserResult.new(query, result, warnings)
  end

Full output attached.

$ find . -name "*.sql" ! -path "${SQLINT_IGNORE_PATH_PATTERN}" -exec sqlint {} +
/usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/parse.rb:9: [BUG] Segmentation fault at 0x0000000000004400
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-linux-musl]
-- Control frame information -----------------------------------------------
c:0017 p:---- s:0095 e:000094 CFUNC  :decode
c:0016 p:0055 s:0089 e:000088 METHOD /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/parse.rb:9
c:0015 p:0008 s:0080 e:000079 METHOD /usr/local/bundle/gems/sqlint-0.3.0/lib/sqlint/linter.rb:29
c:0014 p:0022 s:0066 e:000065 BLOCK  /usr/local/bundle/gems/sqlint-0.3.0/lib/sqlint/linter.rb:18 [FINISH]
c:0013 p:---- s:0059 E:000480 CFUNC  :each
c:0012 p:---- s:0056 e:000055 CFUNC  :each
c:0011 p:---- s:0053 E:000e20 CFUNC  :first
c:0010 p:0018 s:0048 e:000047 BLOCK  /usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:64
c:0009 p:0008 s:0042 e:000041 BLOCK  /usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:56 [FINISH]
c:0008 p:---- s:0038 e:000037 CFUNC  :open
c:0007 p:0009 s:0032 e:000031 BLOCK  /usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:55 [FINISH]
c:0006 p:---- s:0028 e:000027 CFUNC  :each
c:0005 p:0020 s:0024 e:000023 METHOD /usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:54
c:0004 p:0091 s:0019 E:000948 TOP    /usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:63 [FINISH]
c:0003 p:---- s:0013 e:000012 CFUNC  :load
c:0002 p:0078 s:0008 E:0021b0 EVAL   /usr/local/bundle/bin/sqlint:25 [FINISH]
c:0001 p:0000 s:0003 E:001db0 DUMMY  [FINISH]
-- Ruby level backtrace information ----------------------------------------
/usr/local/bundle/bin/sqlint:25:in '<main>'
/usr/local/bundle/bin/sqlint:25:in 'load'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:63:in '<top (required)>'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:54:in 'each_input_file'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:54:in 'each'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:55:in 'block in each_input_file'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:55:in 'open'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:56:in 'block (2 levels) in each_input_file'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:64:in 'block in <top (required)>'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:64:in 'first'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:64:in 'each'
/usr/local/bundle/gems/sqlint-0.3.0/bin/sqlint:64:in 'each'
/usr/local/bundle/gems/sqlint-0.3.0/lib/sqlint/linter.rb:18:in 'block in run'
/usr/local/bundle/gems/sqlint-0.3.0/lib/sqlint/linter.rb:29:in 'parse_next_error'
/usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/parse.rb:9:in 'parse'
/usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/parse.rb:9:in 'decode'
-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1
-- Machine register context ------------------------------------------------
 RIP: 0x0000000000004400 RBP: 0x00007ffc53b3f650 RSP: 0x00007ffc53b3f478
 RAX: 0x0000000000000000 RBX: 0x0000000003e80000 RCX: 0x0000000000000153
 RDX: 0x0000000000000004 RDI: 0x00007ffc53b3f4bd RSI: 0x00007fc82cc53288
  R8: 0x00007fc82bef62b0  R9: 0x0000000000000000 R10: 0x00007fc82c65c800
 R11: 0x00007fc82c9d1f58 R12: 0x00007fc82cc53288 R13: 0x0000000000000004
 R14: 0x00000000000003e8 R15: 0x00007fc82bef61b0 EFL: 0x0000000000010202
-- Other runtime information -----------------------------------------------
* Loaded script: /usr/local/bundle/bin/sqlint
* Loaded features:
    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 ruby2_keywords.rb
    6 /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/encdb.so
    7 /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/trans/transdb.so
    8 /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/rbconfig.rb
    9 /usr/local/lib/ruby/3.4.0/rubygems/compatibility.rb
   10 /usr/local/lib/ruby/3.4.0/rubygems/defaults.rb
   11 /usr/local/lib/ruby/3.4.0/rubygems/deprecate.rb
   12 /usr/local/lib/ruby/3.4.0/rubygems/errors.rb
   13 /usr/local/lib/ruby/3.4.0/rubygems/target_rbconfig.rb
   14 /usr/local/lib/ruby/3.4.0/rubygems/unknown_command_spell_checker.rb
   15 /usr/local/lib/ruby/3.4.0/rubygems/exceptions.rb
   16 /usr/local/lib/ruby/3.4.0/rubygems/basic_specification.rb
   17 /usr/local/lib/ruby/3.4.0/rubygems/stub_specification.rb
   18 /usr/local/lib/ruby/3.4.0/rubygems/platform.rb
   19 /usr/local/lib/ruby/3.4.0/rubygems/specification_record.rb
   20 /usr/local/lib/ruby/3.4.0/rubygems/util/list.rb
   21 /usr/local/lib/ruby/3.4.0/rubygems/version.rb
   22 /usr/local/lib/ruby/3.4.0/rubygems/requirement.rb
   23 /usr/local/lib/ruby/3.4.0/rubygems/specification.rb
   24 /usr/local/lib/ruby/3.4.0/rubygems/util.rb
   25 /usr/local/lib/ruby/3.4.0/rubygems/dependency.rb
   26 /usr/local/lib/ruby/3.4.0/rubygems/core_ext/kernel_gem.rb
   27 /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/monitor.so
   28 /usr/local/lib/ruby/3.4.0/monitor.rb
   29 /usr/local/lib/ruby/3.4.0/rubygems.rb
   30 /usr/local/lib/ruby/3.4.0/bundled_gems.rb
   31 /usr/local/lib/ruby/3.4.0/rubygems/path_support.rb
   32 /usr/local/lib/ruby/3.4.0/error_highlight/version.rb
   33 /usr/local/lib/ruby/3.4.0/error_highlight/base.rb
   34 /usr/local/lib/ruby/3.4.0/error_highlight/formatter.rb
   35 /usr/local/lib/ruby/3.4.0/error_highlight/core_ext.rb
   36 /usr/local/lib/ruby/3.4.0/error_highlight.rb
   37 /usr/local/lib/ruby/3.4.0/did_you_mean/version.rb
   38 /usr/local/lib/ruby/3.4.0/did_you_mean/core_ext/name_error.rb
   39 /usr/local/lib/ruby/3.4.0/did_you_mean/levenshtein.rb
   40 /usr/local/lib/ruby/3.4.0/did_you_mean/jaro_winkler.rb
   41 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checker.rb
   42 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers/class_name_checker.rb
   43 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers/variable_name_checker.rb
   44 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checkers/name_error_checkers.rb
   45 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checkers/method_name_checker.rb
   46 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checkers/key_error_checker.rb
   47 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checkers/null_checker.rb
   48 /usr/local/lib/ruby/3.4.0/did_you_mean/tree_spell_checker.rb
   49 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checkers/require_path_checker.rb
   50 /usr/local/lib/ruby/3.4.0/did_you_mean/spell_checkers/pattern_key_name_checker.rb
   51 /usr/local/lib/ruby/3.4.0/did_you_mean/formatter.rb
   52 /usr/local/lib/ruby/3.4.0/did_you_mean.rb
   53 /usr/local/lib/ruby/3.4.0/syntax_suggest/core_ext.rb
   54 /usr/local/lib/ruby/3.4.0/rubygems/vendor/tsort/lib/tsort.rb
   55 /usr/local/lib/ruby/3.4.0/rubygems/vendored_tsort.rb
   56 /usr/local/lib/ruby/3.4.0/rubygems/request_set/gem_dependency_api.rb
   57 /usr/local/lib/ruby/3.4.0/rubygems/request_set/lockfile/parser.rb
   58 /usr/local/lib/ruby/3.4.0/rubygems/request_set/lockfile/tokenizer.rb
   59 /usr/local/lib/ruby/3.4.0/rubygems/request_set/lockfile.rb
   60 /usr/local/lib/ruby/3.4.0/rubygems/request_set.rb
   61 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/gem_metadata.rb
   62 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/delegates/specification_provider.rb
   63 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/errors.rb
   64 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/action.rb
   65 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_edge_no_circular.rb
   66 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/add_vertex.rb
   67 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/delete_edge.rb
   68 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/detach_vertex_named.rb
   69 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/set_payload.rb
   70 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/tag.rb
   71 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/log.rb
   72 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph/vertex.rb
   73 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/dependency_graph.rb
   74 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/state.rb
   75 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/modules/specification_provider.rb
   76 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/delegates/resolution_state.rb
   77 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/resolution.rb
   78 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/resolver.rb
   79 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo/modules/ui.rb
   80 /usr/local/lib/ruby/3.4.0/rubygems/vendor/molinillo/lib/molinillo.rb
   81 /usr/local/lib/ruby/3.4.0/rubygems/vendored_molinillo.rb
   82 /usr/local/lib/ruby/3.4.0/rubygems/resolver/activation_request.rb
   83 /usr/local/lib/ruby/3.4.0/rubygems/resolver/conflict.rb
   84 /usr/local/lib/ruby/3.4.0/rubygems/resolver/dependency_request.rb
   85 /usr/local/lib/ruby/3.4.0/rubygems/resolver/requirement_list.rb
   86 /usr/local/lib/ruby/3.4.0/rubygems/resolver/stats.rb
   87 /usr/local/lib/ruby/3.4.0/rubygems/resolver/set.rb
   88 /usr/local/lib/ruby/3.4.0/rubygems/resolver/api_set.rb
   89 /usr/local/lib/ruby/3.4.0/rubygems/resolver/composed_set.rb
   90 /usr/local/lib/ruby/3.4.0/rubygems/resolver/best_set.rb
   91 /usr/local/lib/ruby/3.4.0/rubygems/resolver/current_set.rb
   92 /usr/local/lib/ruby/3.4.0/rubygems/resolver/git_set.rb
   93 /usr/local/lib/ruby/3.4.0/rubygems/resolver/index_set.rb
   94 /usr/local/lib/ruby/3.4.0/rubygems/resolver/installer_set.rb
   95 /usr/local/lib/ruby/3.4.0/rubygems/resolver/lock_set.rb
   96 /usr/local/lib/ruby/3.4.0/rubygems/resolver/vendor_set.rb
   97 /usr/local/lib/ruby/3.4.0/rubygems/resolver/source_set.rb
   98 /usr/local/lib/ruby/3.4.0/rubygems/resolver/specification.rb
   99 /usr/local/lib/ruby/3.4.0/rubygems/resolver/spec_specification.rb
  100 /usr/local/lib/ruby/3.4.0/rubygems/resolver/api_specification.rb
  101 /usr/local/lib/ruby/3.4.0/rubygems/resolver/git_specification.rb
  102 /usr/local/lib/ruby/3.4.0/rubygems/resolver/index_specification.rb
  103 /usr/local/lib/ruby/3.4.0/rubygems/resolver/installed_specification.rb
  104 /usr/local/lib/ruby/3.4.0/rubygems/resolver/local_specification.rb
  105 /usr/local/lib/ruby/3.4.0/rubygems/resolver/lock_specification.rb
  106 /usr/local/lib/ruby/3.4.0/rubygems/resolver/vendor_specification.rb
  107 /usr/local/lib/ruby/3.4.0/rubygems/resolver.rb
  108 /usr/local/lib/ruby/3.4.0/rubygems/text.rb
  109 /usr/local/lib/ruby/3.4.0/rubygems/source/git.rb
  110 /usr/local/lib/ruby/3.4.0/rubygems/source/installed.rb
  111 /usr/local/lib/ruby/3.4.0/rubygems/source/specific_file.rb
  112 /usr/local/lib/ruby/3.4.0/rubygems/source/local.rb
  113 /usr/local/lib/ruby/3.4.0/rubygems/source/lock.rb
  114 /usr/local/lib/ruby/3.4.0/rubygems/source/vendor.rb
  115 /usr/local/lib/ruby/3.4.0/rubygems/source.rb
  116 /usr/local/lib/ruby/3.4.0/set.rb
  117 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/version.rb
  118 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/parse_error.rb
  119 /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/protobuf/message_exts.rb
  120 /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/protobuf/internal/object_cache.rb
  121 /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/3.4/protobuf_c.so
  122 /usr/local/lib/ruby/3.4.0/forwardable/impl.rb
  123 /usr/local/lib/ruby/3.4.0/forwardable.rb
  124 /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/protobuf/repeated_field.rb
  125 /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/protobuf_native.rb
  126 /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/protobuf.rb
  127 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/pg_query_pb.rb
  128 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/node.rb
  129 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/pg_query.so
  130 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/constants.rb
  131 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/parse.rb
  132 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/treewalker.rb
  133 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/filter_columns.rb
  134 /usr/local/lib/ruby/3.4.0/digest/version.rb
  135 /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/digest.so
  136 /usr/local/lib/ruby/3.4.0/digest/loader.rb
  137 /usr/local/lib/ruby/3.4.0/digest.rb
  138 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/fingerprint.rb
  139 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/param_refs.rb
  140 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/deparse.rb
  141 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/truncate.rb
  142 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/scan.rb
  143 /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query.rb
  144 /usr/local/bundle/gems/sqlint-0.3.0/lib/sqlint/version.rb
  145 /usr/local/bundle/gems/sqlint-0.3.0/lib/sqlint/linter.rb
  146 /usr/local/bundle/gems/sqlint-0.3.0/lib/sqlint.rb
  147 /usr/local/lib/ruby/3.4.0/optparse.rb
* Process memory map:
5597b26fc000-5597b26fd000 r--p 00000000 08:01 20997696                   /usr/local/bin/ruby
5597b26fd000-5597b26fe000 r-xp 00001000 08:01 20997696                   /usr/local/bin/ruby
5597b26fe000-5597b26ff000 r--p 00002000 08:01 20997696                   /usr/local/bin/ruby
5597b26ff000-5597b2700000 r--p 00002000 08:01 20997696                   /usr/local/bin/ruby
5597b2700000-5597b2701000 rw-p 00003000 08:01 20997696                   /usr/local/bin/ruby
5597b29d4000-5597b29d5000 ---p 00000000 00:00 0                          [heap]
5597b29d5000-5597b29ec000 rw-p 00000000 00:00 0                          [heap]
7fc82bef6000-7fc82c322000 rw-p 00000000 00:00 0 
7fc82c322000-7fc82c329000 rw-p 00000000 00:00 0 
7fc82c329000-7fc82c32b000 r--p 00000000 08:01 20999961                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/digest.so
7fc82c32b000-7fc82c32d000 r-xp 00002000 08:01 20999961                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/digest.so
7fc82c32d000-7fc82c32e000 r--p 00004000 08:01 20999961                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/digest.so
7fc82c32e000-7fc82c32f000 r--p 00004000 08:01 20999961                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/digest.so
7fc82c32f000-7fc82c330000 rw-p 00005000 08:01 20999961                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/digest.so
7fc82c330000-7fc82c34a000 rw-p 00000000 00:00 0 
7fc82c34a000-7fc82c383000 r--p 00000000 08:01 5132737                    /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/pg_query.so
7fc82c383000-7fc82c4af000 r-xp 00039000 08:01 5132737                    /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/pg_query.so
7fc82c4af000-7fc82c5ea000 r--p 00165000 08:01 5132737                    /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/pg_query.so
7fc82c5ea000-7fc82c621000 r--p 0029f000 08:01 5132737                    /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/pg_query.so
7fc82c621000-7fc82c622000 rw-p 002d6000 08:01 5132737                    /usr/local/bundle/gems/pg_query-6.0.0/lib/pg_query/pg_query.so
7fc82c622000-7fc82c7ab000 rw-p 00000000 00:00 0 
7fc82c7ab000-7fc82c7b7000 rw-p 00000000 00:00 0 
7fc82c7b8000-7fc82c7b9000 rw-p 00000000 00:00 0 
7fc82c7ba000-7fc82c7c2000 rw-p 00000000 00:00 0 
7fc82c7c2000-7fc82c874000 rw-p 00000000 00:00 0 
7fc82c875000-7fc82c88e000 rw-p 00000000 00:00 0 
7fc82c88f000-7fc82c897000 rw-p 00000000 00:00 0 
7fc82c898000-7fc82c8aa000 rw-p 00000000 00:00 0 
7fc82c8ab000-7fc82c8bb000 rw-p 00000000 00:00 0 
7fc82c8bc000-7fc82c8c8000 rw-p 00000000 00:00 0 
7fc82c8c9000-7fc82c920000 rw-p 00000000 00:00 0 
7fc82c921000-7fc82c927000 rw-p 00000000 00:00 0 
7fc82c928000-7fc82c92e000 rw-p 00000000 00:00 0 
7fc82c92f000-7fc82c931000 rw-p 00000000 00:00 0 
7fc82c931000-7fc82c955000 rw-p 00000000 00:00 0 
7fc82c955000-7fc82c959000 r--p 00000000 08:01 5132106                    /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/3.4/protobuf_c.so
7fc82c959000-7fc82c98f000 r-xp 00004000 08:01 5132106                    /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/3.4/protobuf_c.so
7fc82c98f000-7fc82c99d000 r--p 0003a000 08:01 5132106                    /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/3.4/protobuf_c.so
7fc82c99d000-7fc82c99e000 r--p 00048000 08:01 5132106                    /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/3.4/protobuf_c.so
7fc82c99e000-7fc82c99f000 r--p 00048000 08:01 5132106                    /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/3.4/protobuf_c.so
7fc82c99f000-7fc82c9a0000 rw-p 00049000 08:01 5132106                    /usr/local/bundle/gems/google-protobuf-4.29.3-x86_64-linux/lib/google/3.4/protobuf_c.so
7fc82c9a0000-7fc82ca3d000 rw-p 00000000 00:00 0 
7fc82ca3e000-7fc82cac2000 rw-p 00000000 00:00 0 
7fc82cac2000-7fc82cad6000 rw-p 00000000 00:00 0 
7fc82cad6000-7fc82cae8000 rw-p 00000000 00:00 0 
7fc82cae8000-7fc82caf2000 rw-p 00000000 00:00 0 
7fc82caf2000-7fc82cb05000 rw-p 00000000 00:00 0 
7fc82cb05000-7fc82cb0e000 rw-p 00000000 00:00 0 
7fc82cb0e000-7fc82cb10000 rw-p 00000000 00:00 0 
7fc82cb10000-7fc82cb16000 rw-p 00000000 00:00 0 
7fc82cb16000-7fc82ccde000 rw-p 00000000 00:00 0 
7fc82ccde000-7fc82cce2000 rw-p 00000000 00:00 0 
7fc82cce2000-7fc82cce3000 r--p 00000000 08:01 21000101                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/monitor.so
7fc82cce3000-7fc82cce4000 r-xp 00001000 08:01 21000101                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/monitor.so
7fc82cce4000-7fc82cce5000 r--p 00002000 08:01 21000101                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/monitor.so
7fc82cce5000-7fc82cce6000 r--p 00002000 08:01 21000101                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/monitor.so
7fc82cce6000-7fc82cce7000 rw-p 00003000 08:01 21000101                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/monitor.so
7fc82cce7000-7fc82ccf1000 rw-p 00000000 00:00 0 
7fc82ccf1000-7fc82cd59000 rw-p 00000000 00:00 0 
7fc82cd59000-7fc82cd5d000 rw-p 00000000 00:00 0 
7fc82cd5d000-7fc82cdfb000 rw-p 00000000 00:00 0 
7fc82cdfb000-7fc82ce02000 rw-p 00000000 00:00 0 
7fc82ce02000-7fc82ce07000 rw-p 00000000 00:00 0 
7fc82ce07000-7fc82ce6f000 rw-p 00000000 00:00 0 
7fc82ce6f000-7fc82ce76000 rw-p 00000000 00:00 0 
7fc82ce76000-7fc82cf50000 rw-p 00000000 00:00 0 
7fc82cf50000-7fc82cf5d000 rw-p 00000000 00:00 0 
7fc82cf5d000-7fc82cf64000 rw-p 00000000 00:00 0 
7fc82cf64000-7fc82cf65000 r--p 00000000 08:01 21000059                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/trans/transdb.so
7fc82cf65000-7fc82cf66000 r-xp 00001000 08:01 21000059                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/trans/transdb.so
7fc82cf66000-7fc82cf67000 r--p 00002000 08:01 21000059                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/trans/transdb.so
7fc82cf67000-7fc82cf68000 r--p 00002000 08:01 21000059                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/trans/transdb.so
7fc82cf68000-7fc82cf69000 rw-p 00003000 08:01 21000059                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/trans/transdb.so
7fc82cf69000-7fc82cf80000 rw-p 00000000 00:00 0 
7fc82cf80000-7fc82cf8d000 rw-p 00000000 00:00 0 
7fc82cf8d000-7fc82cf8e000 r--p 00000000 08:01 20999971                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/encdb.so
7fc82cf8e000-7fc82cf8f000 r-xp 00001000 08:01 20999971                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/encdb.so
7fc82cf8f000-7fc82cf90000 r--p 00002000 08:01 20999971                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/encdb.so
7fc82cf90000-7fc82cf91000 r--p 00002000 08:01 20999971                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/encdb.so
7fc82cf91000-7fc82cf92000 rw-p 00003000 08:01 20999971                   /usr/local/lib/ruby/3.4.0/x86_64-linux-musl/enc/encdb.so
7fc82cf92000-7fc82cf99000 rw-p 00000000 00:00 0 
7fc82cf99000-7fc82cf9a000 ---p 00000000 00:00 0 
7fc82cf9a000-7fc82d03b000 rw-p 00000000 00:00 0 
7fc82d03b000-7fc82d03c000 ---p 00000000 00:00 0 
7fc82d03c000-7fc82d0dd000 rw-p 00000000 00:00 0 
7fc82d0dd000-7fc82d0de000 ---p 00000000 00:00 0 
7fc82d0de000-7fc82d17f000 rw-p 00000000 00:00 0 
7fc82d17f000-7fc82d180000 ---p 00000000 00:00 0 
7fc82d180000-7fc82d221000 rw-p 00000000 00:00 0 
7fc82d221000-7fc82d222000 ---p 00000000 00:00 0 
7fc82d222000-7fc82d2c3000 rw-p 00000000 00:00 0 
7fc82d2c3000-7fc82d2c4000 ---p 00000000 00:00 0 
7fc82d2c4000-7fc82d365000 rw-p 00000000 00:00 0 
7fc82d365000-7fc82d366000 ---p 00000000 00:00 0 
7fc82d366000-7fc82d407000 rw-p 00000000 00:00 0 
7fc82d407000-7fc82d408000 ---p 00000000 00:00 0 
7fc82d408000-7fc82d4a9000 rw-p 00000000 00:00 0 
7fc82d4a9000-7fc82d4aa000 ---p 00000000 00:00 0 
7fc82d4aa000-7fc82d54b000 rw-p 00000000 00:00 0 
7fc82d54b000-7fc82d54c000 ---p 00000000 00:00 0 
7fc82d54c000-7fc82d5ed000 rw-p 00000000 00:00 0 
7fc82d5ed000-7fc82d5ee000 ---p 00000000 00:00 0 
7fc82d5ee000-7fc82d68f000 rw-p 00000000 00:00 0 
7fc82d68f000-7fc82d690000 ---p 00000000 00:00 0 
7fc82d690000-7fc82d731000 rw-p 00000000 00:00 0 
7fc82d731000-7fc82d732000 ---p 00000000 00:00 0 
7fc82d732000-7fc82d7d3000 rw-p 00000000 00:00 0 
7fc82d7d3000-7fc82d7d4000 ---p 00000000 00:00 0 
7fc82d7d4000-7fc82d875000 rw-p 00000000 00:00 0 
7fc82d875000-7fc82d876000 ---p 00000000 00:00 0 
7fc82d876000-7fc82d917000 rw-p 00000000 00:00 0 
7fc82d917000-7fc82d918000 ---p 00000000 00:00 0 
7fc82d918000-7fc82d9b9000 rw-p 00000000 00:00 0 
7fc82d9b9000-7fc82d9ba000 ---p 00000000 00:00 0 
7fc82d9ba000-7fc82da5b000 rw-p 00000000 00:00 0 
7fc82da5b000-7fc82da5c000 ---p 00000000 00:00 0 
7fc82da5c000-7fc82dafd000 rw-p 00000000 00:00 0 
7fc82dafd000-7fc82dafe000 ---p 00000000 00:00 0 
7fc82dafe000-7fc82db9f000 rw-p 00000000 00:00 0 
7fc82db9f000-7fc82dba0000 ---p 00000000 00:00 0 
7fc82dba0000-7fc82dc41000 rw-p 00000000 00:00 0 
7fc82dc41000-7fc82dc42000 ---p 00000000 00:00 0 
7fc82dc42000-7fc82dce3000 rw-p 00000000 00:00 0 
7fc82dce3000-7fc82dce4000 ---p 00000000 00:00 0 
7fc82dce4000-7fc82dd85000 rw-p 00000000 00:00 0 
7fc82dd85000-7fc82dd86000 ---p 00000000 00:00 0 
7fc82dd86000-7fc82de27000 rw-p 00000000 00:00 0 
7fc82de27000-7fc82de28000 ---p 00000000 00:00 0 
7fc82de28000-7fc82dec9000 rw-p 00000000 00:00 0 
7fc82dec9000-7fc82deca000 ---p 00000000 00:00 0 
7fc82deca000-7fc82df6b000 rw-p 00000000 00:00 0 
7fc82df6b000-7fc82df6c000 ---p 00000000 00:00 0 
7fc82df6c000-7fc82e00d000 rw-p 00000000 00:00 0 
7fc82e00d000-7fc82e00e000 ---p 00000000 00:00 0 
7fc82e00e000-7fc82e0af000 rw-p 00000000 00:00 0 
7fc82e0af000-7fc82e0b0000 ---p 00000000 00:00 0 
7fc82e0b0000-7fc82e151000 rw-p 00000000 00:00 0 
7fc82e151000-7fc82e152000 ---p 00000000 00:00 0 
7fc82e152000-7fc82e1f3000 rw-p 00000000 00:00 0 
7fc82e1f3000-7fc82e1f4000 ---p 00000000 00:00 0 
7fc82e1f4000-7fc82e295000 rw-p 00000000 00:00 0 
7fc82e295000-7fc82e296000 ---p 00000000 00:00 0 
7fc82e296000-7fc82e337000 rw-p 00000000 00:00 0 
7fc82e337000-7fc82e338000 ---p 00000000 00:00 0 
7fc82e338000-7fc82e3e9000 rw-p 00000000 00:00 0 
7fc82e3e9000-7fc82e3eb000 ---p 00000000 00:00 0 
7fc82e3eb000-7fc847a76000 rw-p 00000000 00:00 0 
7fc847a76000-7fc847a7a000 r--p 00000000 08:01 20997389                   /usr/lib/libgcc_s.so.1
7fc847a7a000-7fc847a9c000 r-xp 00004000 08:01 20997389                   /usr/lib/libgcc_s.so.1
7fc847a9c000-7fc847aa0000 r--p 00026000 08:01 20997389                   /usr/lib/libgcc_s.so.1
7fc847aa0000-7fc847aa1000 r--p 00029000 08:01 20997389                   /usr/lib/libgcc_s.so.1
7fc847aa1000-7fc847aa2000 rw-p 0002a000 08:01 20997389                   /usr/lib/libgcc_s.so.1
7fc847aa2000-7fc847aad000 r--p 00000000 08:01 20997393                   /usr/lib/libgmp.so.10.5.0
7fc847aad000-7fc847af3000 r-xp 0000b000 08:01 20997393                   /usr/lib/libgmp.so.10.5.0
7fc847af3000-7fc847b09000 r--p 00051000 08:01 20997393                   /usr/lib/libgmp.so.10.5.0
7fc847b09000-7fc847b0b000 r--p 00066000 08:01 20997393                   /usr/lib/libgmp.so.10.5.0
7fc847b0b000-7fc847b0c000 rw-p 00068000 08:01 20997393                   /usr/lib/libgmp.so.10.5.0
7fc847b0c000-7fc847b0f000 r--p 00000000 08:01 19294032                   /usr/lib/libz.so.1.3.1
7fc847b0f000-7fc847b1e000 r-xp 00003000 08:01 19294032                   /usr/lib/libz.so.1.3.1
7fc847b1e000-7fc847b25000 r--p 00012000 08:01 19294032                   /usr/lib/libz.so.1.3.1
7fc847b25000-7fc847b26000 r--p 00018000 08:01 19294032                   /usr/lib/libz.so.1.3.1
7fc847b26000-7fc847b27000 rw-p 00019000 08:01 19294032                   /usr/lib/libz.so.1.3.1
7fc847b27000-7fc847b76000 r--p 00000000 08:01 20997908                   /usr/local/lib/libruby.so.3.4.1
7fc847b76000-7fc848015000 r-xp 0004f000 08:01 20997908                   /usr/local/lib/libruby.so.3.4.1
7fc848015000-7fc8481b8000 r--p 004ee000 08:01 20997908                   /usr/local/lib/libruby.so.3.4.1
7fc8481b8000-7fc8481d4000 r--p 00691000 08:01 20997908                   /usr/local/lib/libruby.so.3.4.1
7fc8481d4000-7fc8481d5000 rw-p 006ad000 08:01 20997908                   /usr/local/lib/libruby.so.3.4.1
7fc8481d5000-7fc8481e8000 rw-p 00000000 00:00 0 
7fc8481e8000-7fc8481fc000 r--p 00000000 08:01 19293798                   /lib/ld-musl-x86_64.so.1
7fc8481fc000-7fc848253000 r-xp 00014000 08:01 19293798                   /lib/ld-musl-x86_64.so.1
7fc848253000-7fc848289000 r--p 0006b000 08:01 19293798                   /lib/ld-musl-x86_64.so.1
7fc848289000-7fc84828a000 r--p 000a0000 08:01 19293798                   /lib/ld-musl-x86_64.so.1
7fc84828a000-7fc84828b000 rw-p 000a1000 08:01 19293798                   /lib/ld-musl-x86_64.so.1
7fc84828b000-7fc84828e000 rw-p 00000000 00:00 0 
7ffc53b22000-7ffc53b47000 rw-p 00000000 00:00 0                          [stack]
7ffc53bcf000-7ffc53bd3000 r--p 00000000 00:00 0                          [vvar]
7ffc53bd3000-7ffc53bd5000 r-xp 00000000 00:00 0                          [vdso]
find: ‘sqlint’ terminated by signal 11

Make sure you include information that can help us debug (full error message, exception listing, stack trace, logs).

Anything else we should know about your project / environment

@jonyscathe jonyscathe added the untriaged auto added to all issues by default when created. label Jan 9, 2025
@honglooker honglooker added ruby and removed untriaged auto added to all issues by default when created. labels Jan 9, 2025
@honglooker
Copy link
Contributor

@JasonLunn looks like potential pg_query issue?

@JasonLunn
Copy link
Contributor

I don't have any experience with pg_query. @jonyscathe - can you add a minimal reproduction example?

@ntkme
Copy link
Contributor

ntkme commented Jan 15, 2025

This is likely a dup of #16853

See #16853 (comment)

@ntkme
Copy link
Contributor

ntkme commented Jan 15, 2025

You can try workaround in #16853 (comment) and see if it works. Basically you need to compile current version of google-protobuf gem from source on alpine and you should be fine.

@jonyscathe
Copy link
Author

@JasonLunn I have no experience with Ruby at all.
I am just trying to run sqlint to lint some SQL files.
And I am now getting a segfault.
@ntkme my workaround it to just use 4.29.2. Somewhat simpler really

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants