Project

General

Profile

Actions

Bug #11968

closed

[arvados-ws] Fix crash at startup

Added by Tom Clegg almost 7 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
API
Target version:
Story points:
-

Description

Nil pointer dereference if a client session uses the database from (*v0subscribe)sendOldEvents() before (*pgEventSource)Run() has established a database connection:

2017-07-11_19:24:51.31333 Starting arvados-ws from /etc/sv/arvados-ws
2017-07-11_19:24:51.39592 {"level":"info","msg":"started","time":"2017-07-11T19:24:51.373690939Z"}
2017-07-11_19:24:51.39593 {"Listen":"[::]:9003","level":"info","msg":"listening","time":"2017-07-11T19:24:51.395872229Z"}
2017-07-11_19:24:51.61701 {"RequestID":"be7n45qvl423","level":"info","msg":"accept request","remoteAddr":"127.0.0.1:49130","reqForwardedFor":"10.28.0.5","time":"2017-07-11T19:24:51.616144127Z"}
2017-07-11_19:24:51.61702 {"RequestID":"be7n45qvnjwz","level":"info","msg":"accept request","remoteAddr":"127.0.0.1:49112","reqForwardedFor":"10.28.64.22","time":"2017-07-11T19:24:51.616232223Z"}
2017-07-11_19:24:51.61703 {"RequestID":"be7n45qvl423","level":"info","msg":"connected","time":"2017-07-11T19:24:51.616275299Z"}
2017-07-11_19:24:51.61704 {"RequestID":"be7n45qvnjwz","level":"info","msg":"connected","time":"2017-07-11T19:24:51.616289398Z"}
2017-07-11_19:24:51.61704 {"RequestID":"be7n45qvrizs","level":"info","msg":"accept request","remoteAddr":"127.0.0.1:49116","reqForwardedFor":"10.28.64.22","time":"2017-07-11T19:24:51.616419305Z"}
2017-07-11_19:24:51.61704 {"RequestID":"be7n45qvrizs","level":"info","msg":"connected","time":"2017-07-11T19:24:51.616954298Z"}
2017-07-11_19:24:51.61725 {"RequestID":"be7n45qw43mx","level":"info","msg":"accept request","remoteAddr":"127.0.0.1:49122","reqForwardedFor":"10.28.0.5","time":"2017-07-11T19:24:51.617198847Z"}
2017-07-11_19:24:51.63745 {"RequestID":"be7n45qw43mx","level":"info","msg":"connected","time":"2017-07-11T19:24:51.637330401Z"}
2017-07-11_19:24:51.66317 panic: runtime error: invalid memory address or nil pointer dereference
2017-07-11_19:24:51.66319 [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x672aba]
2017-07-11_19:24:51.66319 
2017-07-11_19:24:51.66319 goroutine 36 [running]:
2017-07-11_19:24:51.66319 database/sql.(*DB).conn(0x0, 0x912260, 0xc420010390, 0x1, 0x40fe00, 0xc4200b2340, 0xc4208259d8)
2017-07-11_19:24:51.66320       /usr/local/go/src/database/sql/sql.go:896 +0x3a
2017-07-11_19:24:51.66320 database/sql.(*DB).query(0x0, 0x912260, 0xc420010390, 0x7b6d02, 0x41, 0xc420825c58, 0x2, 0x2, 0x1, 0x10, ...)
2017-07-11_19:24:51.66320       /usr/local/go/src/database/sql/sql.go:1245 +0x5b
2017-07-11_19:24:51.66321 database/sql.(*DB).QueryContext(0x0, 0x912260, 0xc420010390, 0x7b6d02, 0x41, 0xc420825c58, 0x2, 0x2, 0xc420010e90, 0xc420825c10, ...)
2017-07-11_19:24:51.66321       /usr/local/go/src/database/sql/sql.go:1227 +0xb8
2017-07-11_19:24:51.66321 database/sql.(*DB).Query(0x0, 0x7b6d02, 0x41, 0xc420825c58, 0x2, 0x2, 0x1e, 0xc4203f5ef0, 0xc420825b48)
2017-07-11_19:24:51.66322       /usr/local/go/src/database/sql/sql.go:1241 +0x82
2017-07-11_19:24:51.66322 main.(*v0subscribe).sendOldEvents(0xc42012c0f0, 0xc420152200)
2017-07-11_19:24:51.66323       /tmp/tmp.nSRZK6zmgH/src/git.curoverse.com/arvados.git/services/ws/session_v0.go:159 +0x30d
2017-07-11_19:24:51.66323 main.(*v0session).Receive(0xc420152200, 0xc42082e000, 0x73, 0x200000, 0xc420010030, 0xc42012c0a0)
2017-07-11_19:24:51.66323       /tmp/tmp.nSRZK6zmgH/src/git.curoverse.com/arvados.git/services/ws/session_v0.go:78 +0x50f
2017-07-11_19:24:51.66324 main.(*handler).Handle.func2(0x912220, 0xc42012e600, 0x912fe0, 0xc4201441b0, 0xc420015a90, 0xc4201367b0, 0x9119e0, 0xc420152200)
2017-07-11_19:24:51.66324       /tmp/tmp.nSRZK6zmgH/src/git.curoverse.com/arvados.git/services/ws/handler.go:84 +0x33a
2017-07-11_19:24:51.66325 created by main.(*handler).Handle
2017-07-11_19:24:51.66325       /tmp/tmp.nSRZK6zmgH/src/git.curoverse.com/arvados.git/services/ws/handler.go:91 +0x4aa
2017-07-11_19:24:51.68489 Stopping arvados-ws
Actions #1

Updated by Tom Clegg almost 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Applied in changeset arvados|commit:b8977c89db2707dd713cd4eeb11d595717fcff75.

Actions

Also available in: Atom PDF