Bors crashes on r+

Since last Friday our private bors installation (which has been fairly recent updated, we’re currently at https://github.com/bors-ng/bors-ng/commit/2d465e27caac59ba3945f54c3ba10594b7cf329a) fails to process any merge request (bors r+). Bors tries still work though.

The error in the bors logs shows:

08:39:25.361 [error] GenServer #PID<0.1926.0> terminating
** (MatchError) no match of right hand side value: {:error, :get_commit_status, :check}
    (bors) lib/github/github.ex:119: BorsNG.GitHub.get_commit_status!/2
    (bors) lib/worker/batcher.ex:511: BorsNG.Worker.Batcher.patch_preflight/3
    (bors) lib/worker/batcher.ex:109: BorsNG.Worker.Batcher.do_handle_cast/2
    (bors) lib/worker/batcher.ex:77: BorsNG.Worker.Batcher.handle_cast/2
    (stdlib) gen_server.erl:601: :gen_server.try_dispatch/4
    (stdlib) gen_server.erl:667: :gen_server.handle_msg/5
    (stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
Last message: {:"$gen_cast", {:reviewed, 1884, "unicolet"}}

=CRASH REPORT==== 27-Aug-2018::08:39:25 ===
  crasher:
    initial call: Elixir.BorsNG.Worker.Batcher:init/1
    pid: <0.1926.0>
    registered_name: []
    exception exit: {{badmatch,{error,get_commit_status,check}},
                     [{'Elixir.BorsNG.GitHub','get_commit_status!',2,
                          [{file,"lib/github/github.ex"},{line,119}]},
                      {'Elixir.BorsNG.Worker.Batcher',patch_preflight,3,
                          [{file,"lib/worker/batcher.ex"},{line,511}]},
                      {'Elixir.BorsNG.Worker.Batcher',do_handle_cast,2,
                          [{file,"lib/worker/batcher.ex"},{line,109}]},
                      {'Elixir.BorsNG.Worker.Batcher',handle_cast,2,
                          [{file,"lib/worker/batcher.ex"},{line,77}]},
                      {gen_server,try_dispatch,4,
                          [{file,"gen_server.erl"},{line,601}]},
                      {gen_server,handle_msg,5,
                          [{file,"gen_server.erl"},{line,667}]},
                      {proc_lib,init_p_do_apply,3,
                          [{file,"proc_lib.erl"},{line,247}]}]}
      in function  gen_server:terminate/7 (gen_server.erl, line 812)
    ancestors: ['Elixir.BorsNG.Worker.Batcher.Supervisor',
                  'Elixir.BorsNG.Supervisor',<0.1733.0>]
    messages: []
    links: [<0.1756.0>]
    dictionary: [{rand_seed,{#{max => 288230376151711743,
                                next => #Fun<rand.8.41921595>,type => exsplus,
                                uniform => #Fun<rand.9.41921595>,
                                uniform_n => #Fun<rand.10.41921595>},
                              [76492590951851975|58435071386015836]}}]
    trap_exit: false
    status: running
    heap_size: 4185
    stack_size: 27
    reductions: 11132
  neighbours:

=SUPERVISOR REPORT==== 27-Aug-2018::08:39:25 ===
     Supervisor: {local,'Elixir.BorsNG.Worker.Batcher.Supervisor'}
     Context:    child_terminated
     Reason:     {{badmatch,{error,get_commit_status,check}},
                  [{'Elixir.BorsNG.GitHub','get_commit_status!',2,
                       [{file,"lib/github/github.ex"},{line,119}]},
                   {'Elixir.BorsNG.Worker.Batcher',patch_preflight,3,
                       [{file,"lib/worker/batcher.ex"},{line,511}]},
                   {'Elixir.BorsNG.Worker.Batcher',do_handle_cast,2,
                       [{file,"lib/worker/batcher.ex"},{line,109}]},
                   {'Elixir.BorsNG.Worker.Batcher',handle_cast,2,
                       [{file,"lib/worker/batcher.ex"},{line,77}]},
                   {gen_server,try_dispatch,4,
                       [{file,"gen_server.erl"},{line,601}]},
                   {gen_server,handle_msg,5,
                       [{file,"gen_server.erl"},{line,667}]},
                   {proc_lib,init_p_do_apply,3,
                       [{file,"proc_lib.erl"},{line,247}]}]}
     Offender:   [{pid,<0.1926.0>},
                  {id,'Elixir.BorsNG.Worker.Batcher'},
                  {mfargs,
                      {'Elixir.BorsNG.Worker.Batcher',start_link,undefined}},
                  {restart_type,temporary},
                  {shutdown,5000},
                  {child_type,worker}]

as we’re desperate, we’re going to upgrade to latest master even though we can’t find anything specific to this error.

TIA,
Umberto

1 Like

Upgraded to latest master, but still no success. I'm almost convinced it's a GH permissions problem now, we'll check those as well, but it's going through its process as we need to find the person with the right permissions :slight_smile:

finally it’s solved! Bors had no access to the GH checks , after granting read access to GH checks everything started working again.

We’re not sure why bors-ng did not have access to checks: if they were revoked or were never there in the first place. Anyways it’s working again!

2 Likes

thanks for this @unicolet

was just troubleshooting the same

I feel github must have changed some permission structure as this was never an issue before…

1 Like