Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Regression: panic on query using REGEXP #641

Closed
ajnavarro opened this issue Mar 21, 2019 · 4 comments
Closed

Regression: panic on query using REGEXP #641

ajnavarro opened this issue Mar 21, 2019 · 4 comments
Assignees
Labels
3rd-party Third party compatibility bug Something isn't working wontfix This will not be worked on

Comments

@ajnavarro
Copy link
Contributor

time="2019-03-21T12:34:39Z" level=info msg="audit trail" action=authorization address="127.0.0.1:60054" connection_id=1 permission=read pid=1 query="SELECT f.repository_id, f.blob_hash, f.commit_hash, f.file_path FROM (\n    SELECT blob_hash, repository_id\n    FROM blobs\n    WHERE NOT IS_BINARY(blob_content) AND (\n        blob_content REGEXP '(?i)facebook.*[\\'\\\\\"][0-9a-f]{32}[\\'\\\\\"]'\n        OR blob_content REGEXP '(?i)twitter.*[\\'\\\\\"][0-9a-zA-Z]{35,44}[\\'\\\\\"]'\n        OR blob_content REGEXP '(?i)github.*[\\'\\\\\"][0-9a-zA-Z]{35,40}[\\'\\\\\"]'\n        OR blob_content REGEXP 'AKIA[0-9A-Z]{16}'\n        OR blob_content REGEXP '(?i)heroku.*[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}'\n        OR blob_content REGEXP '.*-----BEGIN ((RSA|DSA|OPENSSH|SSH2|EC) )?PRIVATE KEY-----.*'\n    )\n) h INNER JOIN commit_files f ON h.blob_hash = f.blob_hash\n    AND h.repository_id = f.repository_id\n    AND f.file_path NOT REGEXP '^vendor.*'\n" success=true system=audit user=root
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x2 addr=0x7fe348ffa000 pc=0x7fe3eeaa6e2f]

runtime stack:
runtime.throw(0x127fd8c, 0x2a)
	/usr/local/go/src/runtime/panic.go:616 +0x81
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:372 +0x28e

goroutine 53 [syscall]:
runtime.cgocall(0xeaada0, 0xc429d69770, 0x127d59c)
	/usr/local/go/src/runtime/cgocall.go:128 +0x64 fp=0xc429d69728 sp=0xc429d696f0 pc=0x403a94
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma._Cfunc_SearchOnigRegex(0xc42cff0600, 0x12d0, 0x0, 0x7fe3b0000df0, 0x7fe3b0001770, 0x7fe3b0001730, 0x0, 0x0, 0x0, 0x0)
	_cgo_gotypes.go:285 +0x50 fp=0xc429d69770 sp=0xc429d69728 pc=0x958bc0
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.(*Regexp).match.func1(0xc42cff0600, 0x12d0, 0xc400000000, 0x7fe3b0000df0, 0x7fe3b0001770, 0x7fe3b0001730, 0x0, 0x0, 0x0, 0xc42cff0600)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:209 +0x144 fp=0xc429d697d0 sp=0xc429d69770 pc=0x95eb14
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.(*Regexp).match(0xc427c0a230, 0xc42cff0600, 0x12d0, 0x1300, 0x12d0, 0x0, 0xc42cff0600)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:209 +0x9e fp=0xc429d69830 sp=0xc429d697d0 pc=0x959fae
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.(*Regexp).Match(0xc427c0a230, 0xc42cff0600, 0x12d0, 0x1300, 0x12d0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:444 +0x57 fp=0xc429d69878 sp=0xc429d69830 pc=0x95c397
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.(*Regexp).MatchString(0xc427c0a230, 0xc42cfef300, 0x12d0, 0x12d0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:449 +0x6a fp=0xc429d698b8 sp=0xc429d69878 pc=0x95c42a
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex.(*Oniguruma).Match(0xc42010a3d0, 0xc42cfef300, 0x12d0, 0x1454360)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex/regex_oniguruma.go:14 +0x42 fp=0xc429d698e8 sp=0xc429d698b8 pc=0x95f5f2
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Regexp).compareRegexp(0xc420dd6240, 0xc420e2c0f0, 0xc42c8704c0, 0x4, 0x4, 0x4, 0xf5f060, 0x2087040, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/comparison.go:271 +0x232 fp=0xc429d699b0 sp=0xc429d698e8 pc=0x9680d2
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Regexp).Eval(0xc420dd6240, 0xc420e2c0f0, 0xc42c8704c0, 0x4, 0x4, 0xf5f060, 0x2087040, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/comparison.go:206 +0x1f0 fp=0xc429d69a18 sp=0xc429d699b0 pc=0x967d80
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Or).Eval(0xc42000c780, 0xc420e2c0f0, 0xc42c8704c0, 0x4, 0x4, 0x4, 0xbec001, 0xc42b04e000, 0x12d0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:116 +0xdd fp=0xc429d69a78 sp=0xc429d69a18 pc=0x96e9dd
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Or).Eval(0xc42000c7c0, 0xc420e2c0f0, 0xc42c8704c0, 0x4, 0x4, 0xc42036a700, 0x0, 0x0, 0xc42036a720)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:107 +0x62 fp=0xc429d69ad8 sp=0xc429d69a78 pc=0x96e962
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Or).Eval(0xc42000c800, 0xc420e2c0f0, 0xc42c8704c0, 0x4, 0x4, 0x4, 0xf5f060, 0x2087040, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:107 +0x62 fp=0xc429d69b38 sp=0xc429d69ad8 pc=0x96e962
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Or).Eval(0xc42000c840, 0xc420e2c0f0, 0xc42c8704c0, 0x4, 0x4, 0xf5f060, 0x2087041, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:107 +0x62 fp=0xc429d69b98 sp=0xc429d69b38 pc=0x96e962
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*And).Eval(0xc420e021e0, 0xc420e2c0f0, 0xc42c8704c0, 0x4, 0x4, 0x0, 0x2087040, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:55 +0xdd fp=0xc429d69bf8 sp=0xc429d69b98 pc=0x96e4ed
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*FilterIter).Next(0xc420e0c1b0, 0x8d25baa9, 0x20f0800, 0x0, 0x3, 0x3)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/filter.go:110 +0x97 fp=0xc429d69c68 sp=0xc429d69bf8 pc=0x9821a7
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420e2c140, 0xc422145ee8, 0xc422145f7e, 0x489d36, 0xc422145f78, 0xc41547cb4e)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d fp=0xc429d69ce8 sp=0xc429d69c68 pc=0x75f30d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*trackedRowIter).Next(0xc420e02200, 0x18, 0x44a0e8, 0x3f5d883876c02, 0xc41547dad2, 0x1547dad222145ee8)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/process.go:145 +0x37 fp=0xc429d69d38 sp=0xc429d69ce8 pc=0x98bd27
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*iter).Next(0xc420e02220, 0x8d25b89e, 0x20f0800, 0x4d88cc, 0xc4202eac40, 0xc4200f04e0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/project.go:129 +0x38 fp=0xc429d69da8 sp=0xc429d69d38 pc=0x98dc28
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420e2c190, 0x2, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d fp=0xc429d69e28 sp=0xc429d69da8 pc=0x75f30d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).iterPartition(0xc4203bb3e0, 0x1455180, 0xc420dea000)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:249 +0x286 fp=0xc429d69f98 sp=0xc429d69e28 pc=0x981066
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start.func1(0xc4203bb3e0, 0xc42047d500, 0x1455180, 0xc420dea000)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:170 +0x3f fp=0xc429d69fc0 sp=0xc429d69f98 pc=0x99a6ff
runtime.goexit()
	/usr/local/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc429d69fc8 sp=0xc429d69fc0 pc=0x458821
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:169 +0x110

goroutine 1 [IO wait]:
internal/poll.runtime_pollWait(0x7fe3ec942fe0, 0x72, 0x0)
	/usr/local/go/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc4201f5718, 0x72, 0xc420273c00, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:85 +0x9b
internal/poll.(*pollDesc).waitRead(0xc4201f5718, 0xffffffffffffff00, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Accept(0xc4201f5700, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:372 +0x1a8
net.(*netFD).accept(0xc4201f5700, 0xc42010b108, 0x44a0e8, 0x3f5d831d51c7c)
	/usr/local/go/src/net/fd_unix.go:238 +0x42
net.(*TCPListener).accept(0xc42010b0f8, 0x454f50, 0xc420cd1870, 0xc420cd1878)
	/usr/local/go/src/net/tcpsock_posix.go:136 +0x2e
net.(*TCPListener).Accept(0xc42010b0f8, 0x129eb90, 0xc4201f5780, 0x146f5e0, 0xc42010b108)
	/usr/local/go/src/net/tcpsock.go:259 +0x49
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql.(*Listener).Accept(0xc4201f5780)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql/server.go:224 +0x10e
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server.(*Server).Start(0xc42010b100, 0x25, 0xc420cd1ac0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server/server.go:69 +0x2e
github.com/src-d/gitbase/cmd/gitbase/command.(*Server).Execute(0xc4204361e0, 0xc420391310, 0x1, 0x5, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/cmd/gitbase/command/server.go:198 +0x76f
github.com/src-d/gitbase/vendor/github.com/jessevdk/go-flags.(*Parser).ParseArgs(0xc4203ba5a0, 0xc420110010, 0x5, 0x5, 0x1, 0x2, 0xc4202025a0, 0xc4201f5280, 0xc4201f50c8)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/jessevdk/go-flags/parser.go:316 +0x80b
github.com/src-d/gitbase/vendor/github.com/jessevdk/go-flags.(*Parser).Parse(0xc4203ba5a0, 0x1187528, 0x7, 0x1259f79, 0x1c, 0x1259f79)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/jessevdk/go-flags/parser.go:186 +0x71
main.main()
	/tmp/regression-207397520/src/github.com/src-d/gitbase/cmd/gitbase/main.go:52 +0x3c3

goroutine 19 [syscall]:
os/signal.signal_recv(0x0)
	/usr/local/go/src/runtime/sigqueue.go:139 +0xa6
os/signal.loop()
	/usr/local/go/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
	/usr/local/go/src/os/signal/signal_unix.go:28 +0x41

goroutine 7 [runnable]:
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).Next(0xc420ee24e0, 0xc4204e6000, 0x5, 0xc422145748, 0x96e472, 0xc420de0960)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:269 +0x107
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*innerJoinIter).loadRight(0xc420203290, 0x0, 0x0, 0x7, 0x7, 0xf5f060, 0x2087040)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/innerjoin.go:298 +0x199
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*innerJoinIter).Next(0xc420203290, 0x3bab5303, 0x20f0800, 0xc, 0x4, 0x3)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/innerjoin.go:334 +0x59
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420dd8eb0, 0x90, 0x44a0e8, 0x3f5d8320d0475, 0xc43b030750, 0x3b0307502049cda8)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*iter).Next(0xc420ddbca0, 0x3bab5111, 0x20f0800, 0x10aebc0, 0xc420dc5920, 0x412ce8)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/project.go:129 +0x38
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420dd8f00, 0x4, 0xc420dc5990, 0x412ce8, 0x50, 0x10aebc0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*trackedRowIter).Next(0xc420ddbcc0, 0xc420dd9090, 0x4, 0xc420ddbd00, 0x4, 0x4)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/process.go:145 +0x37
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server.(*Handler).ComQuery(0xc42036a080, 0xc420cd51e0, 0xc420d1a000, 0x31a, 0xc420d060f0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/server/handler.go:119 +0x2b2
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql.(*Conn).handleNextCommand(0xc420cd51e0, 0x1465ac0, 0xc42036a080, 0x8f457, 0x3b736918)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql/conn.go:730 +0x135a
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql.(*Listener).handle(0xc4201f5780, 0x146f5e0, 0xc42010b108, 0x1, 0xbf1cff17facb1f06, 0x3b736918, 0x20f0800)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql/server.go:430 +0xec7
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql.(*Listener).Accept
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-vitess.v1/mysql/server.go:238 +0xf4

goroutine 8 [semacquire]:
sync.runtime_Semacquire(0xc42047d50c)
	/usr/local/go/src/runtime/sema.go:56 +0x39
sync.(*WaitGroup).Wait(0xc42047d500)
	/usr/local/go/src/sync/waitgroup.go:129 +0x72
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start(0xc4203bb3e0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:163 +0x264
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).Next
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:266 +0x23d

goroutine 11 [semacquire]:
sync.runtime_SemacquireMutex(0xc420338c54, 0xc4200fa000)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc420338c50)
	/usr/local/go/src/sync/mutex.go:134 +0x108
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/cache.(*ObjectLRU).Put(0xc420338c30, 0x146be60, 0xc427d5db00)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/cache/object_lru.go:36 +0x51
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).cachePut(0xc420dfc280, 0x146be60, 0xc427d5db00)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:361 +0x4d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).fillRegularObjectContent(0xc420dfc280, 0x146be60, 0xc427d5db00, 0x0, 0xc42d60b7e0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:291 +0xd1
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).getNextObject(0xc420dfc280, 0xc42b123b00, 0xc42b123b00, 0x0, 0x0, 0x129f680)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:268 +0x1cc
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).objectAtOffset(0xc420dfc280, 0x2101d3, 0xd986fd04716d6035, 0xd986fd04a668aab2, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:201 +0x520
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).GetByOffset(0xc420dfc280, 0x2101d3, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:92 +0x8b
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*objectIter).Next(0xc422a48540, 0x4784b39603302000, 0x83939da4bf7c56a4, 0x30e79de9c7ec48da, 0x1473360)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:440 +0x6a
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem.(*packfileIter).Next(0xc421d50000, 0xc7ec48da83939da4, 0xc430e79de9, 0x14606c0, 0xc421d50000)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/object.go:632 +0x38
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem.(*lazyPackfilesIter).Next(0xc420dd4000, 0x8ef49d, 0x1051ba0, 0xc4203e4040, 0xc420319f10)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/object.go:544 +0x56
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/storer.(*MultiEncodedObjectIter).Next(0xc4203e4020, 0xc420d11b40, 0xc148d1, 0xc420de10e0, 0xc4203e4040)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/storer/object.go:237 +0x47
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object.(*BlobIter).Next(0xc4203e4040, 0x0, 0x0, 0x1456d01)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object/blob.go:115 +0x37
github.com/src-d/gitbase.(*blobRowIter).next(0xc420ddfb40, 0x2, 0x18, 0x18, 0xc420ddbf20, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/blobs.go:225 +0x40
github.com/src-d/gitbase.(*blobRowIter).Next(0xc420ddfb40, 0x0, 0x44a0e8, 0x3f5d8320fb48d, 0xc43b05b782, 0x3b05b782200bbc40)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/blobs.go:191 +0x7d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*FilterIter).Next(0xc420de11a0, 0x3bae0129, 0x20f0800, 0x0, 0x3, 0x3)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/filter.go:105 +0x38
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420dd91d0, 0xc4200bbee8, 0xc4200bbf7e, 0x0, 0xc4200bbf78, 0x98165f)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*trackedRowIter).Next(0xc420ddbf20, 0x10d59a0, 0x44a0e8, 0x3f5d8320fb33c, 0xc43b05b5bf, 0x3b05b5bf200bbee8)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/process.go:145 +0x37
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*iter).Next(0xc420ddbf40, 0x3badffd8, 0x20f0800, 0x4d88cc, 0xc4202eac40, 0xc4200f04e0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/project.go:129 +0x38
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420dd9220, 0x2, 0x0, 0x0, 0xc4203bb3e0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).iterPartition(0xc4203bb3e0, 0x1455180, 0xc420de27b0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:249 +0x286
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start.func1(0xc4203bb3e0, 0xc42047d500, 0x1455180, 0xc420de27b0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:170 +0x3f
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:169 +0x110

goroutine 54 [runnable]:
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma._Cfunc_NewOnigRegex(0x7fe3a0002680, 0x28, 0xc42c886150, 0xc42c886158, 0xc42c886160, 0xc42c886168, 0xc42c886170, 0xc400000000)
	_cgo_gotypes.go:265 +0x4d
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.NewRegexp.func2(0x7fe3a0002680, 0x28, 0xc42c886150, 0xc42c886158, 0xc42c886160, 0xc42c886168, 0xc42c886170, 0x1)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:57 +0x2ca
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.NewRegexp(0xc420103500, 0x28, 0x0, 0xc42c886140, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:57 +0x14b
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.Compile(0xc420103500, 0x28, 0x0, 0xc4201e0c30, 0xc427c54340)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:75 +0x3e
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex.NewOniguruma(0xc420103500, 0x28, 0x11a388c, 0x9, 0xc4201e0cb8, 0xc42b548801, 0x8, 0x10)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex/regex_oniguruma.go:25 +0x39
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex.New(0x11a388c, 0x9, 0xc420103500, 0x28, 0x2114900, 0x0, 0x1f, 0x780, 0x20, 0xc4268af000)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex/regex.go:73 +0x80
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Regexp).compareRegexp.func1(0xc42036a000, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/comparison.go:254 +0x78
sync.(*Pool).Get(0xc42036a000, 0xc427c54340, 0xf6b760)
	/usr/local/go/src/sync/pool.go:151 +0xab
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Regexp).compareRegexp(0xc420dd6240, 0xc420e100a0, 0xc427c64a40, 0x4, 0x4, 0x4, 0xf5f060, 0x2087040, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/comparison.go:263 +0x1c1
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Regexp).Eval(0xc420dd6240, 0xc420e100a0, 0xc427c64a40, 0x4, 0x4, 0xf5f060, 0x2087040, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/comparison.go:206 +0x1f0
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Or).Eval(0xc42000c780, 0xc420e100a0, 0xc427c64a40, 0x4, 0x4, 0x4, 0xbec001, 0xc42d3bf000, 0x748)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:116 +0xdd
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Or).Eval(0xc42000c7c0, 0xc420e100a0, 0xc427c64a40, 0x4, 0x4, 0xc427c54300, 0x0, 0x0, 0xc427c54340)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:107 +0x62
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Or).Eval(0xc42000c800, 0xc420e100a0, 0xc427c64a40, 0x4, 0x4, 0x4, 0xf5f060, 0x2087040, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:107 +0x62
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Or).Eval(0xc42000c840, 0xc420e100a0, 0xc427c64a40, 0x4, 0x4, 0xf5f060, 0x2087041, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:107 +0x62
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*And).Eval(0xc420e001e0, 0xc420e100a0, 0xc427c64a40, 0x4, 0x4, 0x0, 0x2087040, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/logic.go:55 +0xdd
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*FilterIter).Next(0xc420e041b0, 0x3bb37b99, 0x20f0800, 0x0, 0x3, 0x3)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/filter.go:110 +0x97
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420e100f0, 0xc420defee8, 0xc420deff7e, 0x0, 0xc420deff78, 0x98165f)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*trackedRowIter).Next(0xc420e00200, 0x10d59a0, 0x44a0e8, 0x3f5d832152cbf, 0xc43b0b2f42, 0x3b0b2f4220defee8)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/process.go:145 +0x37
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*iter).Next(0xc420e00220, 0x3bb3795b, 0x20f0800, 0x4d88cc, 0xc4202eac40, 0xc4200f04e0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/project.go:129 +0x38
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420e10140, 0x2, 0x0, 0x0, 0xc4203bb3e0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).iterPartition(0xc4203bb3e0, 0x1455180, 0xc420dea010)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:249 +0x286
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start.func1(0xc4203bb3e0, 0xc42047d500, 0x1455180, 0xc420dea010)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:170 +0x3f
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:169 +0x110

goroutine 47 [semacquire]:
sync.runtime_Semacquire(0xc42461a07c)
	/usr/local/go/src/runtime/sema.go:56 +0x39
sync.(*WaitGroup).Wait(0xc42461a070)
	/usr/local/go/src/sync/waitgroup.go:129 +0x72
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start(0xc420ee24e0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:163 +0x264
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).Next
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:266 +0x23d

goroutine 66 [runnable]:
sync.runtime_SemacquireMutex(0xc420338c54, 0xc42b576700)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0xc420338c50)
	/usr/local/go/src/sync/mutex.go:134 +0x108
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/cache.(*ObjectLRU).Get(0xc420338c30, 0x3fb06ae55e778633, 0x199ad95386c076e4, 0x199ad9537ae432d5, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/cache/object_lru.go:81 +0x50
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem.(*ObjectStorage).decodeObjectAt(0xc4244a6e88, 0x146ffa0, 0xc421304ae0, 0x146bec0, 0xc420e3db00, 0x9478eb, 0x0, 0x0, 0x7ae432d5199ad953, 0x9478eb)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/object.go:388 +0x260
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem.(*ObjectStorage).getFromPackfile(0xc4244a6e88, 0x3fb06ae55e778633, 0x199ad95386c076e4, 0x7ae432d5, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/object.go:378 +0x2cb
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem.(*ObjectStorage).EncodedObject(0xc4244a6e88, 0xb06ae55e77863303, 0x9ad95386c076e43f, 0x7ae432d519, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/object.go:249 +0x6c
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object.GetBlob(0x1469ca0, 0xc4244a6e70, 0x3fb06ae55e778633, 0x199ad95386c076e4, 0x7ae432d5, 0x5e778633000081a4, 0x86c076e43fb06ae5, 0x7ae432d5199ad953)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object/blob.go:23 +0x4e
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object.(*FileIter).Next(0xc4278690e0, 0x7fe3e461a4e8, 0x1e, 0xc42b87bcc0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object/file.go:100 +0x13f
github.com/src-d/gitbase.(*commitFilesRowIter).next(0xc4244a6f50, 0xc4200f0358, 0x1, 0xc42996be18, 0x43d75b, 0xc42996bee8)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/commit_files.go:278 +0x88
github.com/src-d/gitbase.(*commitFilesRowIter).Next(0xc4244a6f50, 0x3, 0x44a0e8, 0x3f5d8ee375ba6, 0x8c23697, 0x8c2369700000003)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/commit_files.go:192 +0x7d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*FilterIter).Next(0xc4244a45a0, 0xf7d5a842, 0x20f0800, 0xc42996bee8, 0xc42996bf7e, 0x489d36)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/filter.go:105 +0x38
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420e2c690, 0x8c235d52996bee8, 0x5c9384e3, 0xc42996bd98, 0x489d36, 0x5c9384e3)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*trackedRowIter).Next(0xc4246182c0, 0xf7d5a780, 0x20f0800, 0xc4200f04e0, 0xc420ee2478, 0xc4202eac50)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/process.go:145 +0x37
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420e2c6e0, 0x2, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).iterPartition(0xc420ee24e0, 0x1455180, 0xc424448b40)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:249 +0x286
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start.func1(0xc420ee24e0, 0xc42461a070, 0x1455180, 0xc424448b40)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:170 +0x3f
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:169 +0x110

goroutine 82 [semacquire]:
sync.runtime_SemacquireMutex(0x2112fd4, 0xc427f9d800)
	/usr/local/go/src/runtime/sema.go:71 +0x3d
sync.(*Mutex).Lock(0x2112fd0)
	/usr/local/go/src/sync/mutex.go:134 +0x108
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.NewRegexp(0xc42047cf40, 0x9, 0x0, 0xc42d744820, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:55 +0xc2
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.Compile(0xc42047cf40, 0x9, 0x98, 0xc4201e0c30, 0xc4292053f0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:75 +0x3e
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex.NewOniguruma(0xc42047cf40, 0x9, 0x11a388c, 0x9, 0xc4201e0cb8, 0xf2e001, 0x8, 0x10)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex/regex_oniguruma.go:25 +0x39
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex.New(0x11a388c, 0x9, 0xc42047cf40, 0x9, 0x2114900, 0x0, 0x1f, 0x880, 0x20, 0xc425d76000)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/internal/regex/regex.go:73 +0x80
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Regexp).compareRegexp.func1(0xc4204d55a0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/comparison.go:254 +0x78
sync.(*Pool).Get(0xc4204d55a0, 0xc4292053f0, 0xf6b760)
	/usr/local/go/src/sync/pool.go:151 +0xab
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Regexp).compareRegexp(0xc420ddec00, 0xc420dfc4b0, 0xc42d7447d0, 0x5, 0x5, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/comparison.go:263 +0x1c1
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Regexp).Eval(0xc420ddec00, 0xc420dfc4b0, 0xc42d7447d0, 0x5, 0x5, 0x5, 0x5, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/comparison.go:206 +0x1f0
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression.(*Not).Eval(0xc420de2270, 0xc420dfc4b0, 0xc42d7447d0, 0x5, 0x5, 0x0, 0x2087040, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/expression/boolean.go:26 +0x5f
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*FilterIter).Next(0xc42437e270, 0xf1c1c992, 0x20f0800, 0xc42d60fee8, 0xc42d60ff7e, 0x489d36)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/filter.go:110 +0x97
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420dfc500, 0x2ae56b12d60fee8, 0x5c9384e3, 0xc42d60fd98, 0x489d36, 0x5c9384e3)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*trackedRowIter).Next(0xc4203e4400, 0xf1c1c86f, 0x20f0800, 0xc4200f04e0, 0xc420ee2478, 0xc4202eac50)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/process.go:145 +0x37
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc420dfc550, 0x2, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).iterPartition(0xc420ee24e0, 0x1455180, 0xc420dea030)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:249 +0x286
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start.func1(0xc420ee24e0, 0xc42461a070, 0x1455180, 0xc420dea030)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:170 +0x3f
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:169 +0x110

goroutine 83 [runnable]:
syscall.Syscall(0x0, 0xb, 0xc42d51c000, 0x1000, 0x1000, 0x1000, 0x0)
	/usr/local/go/src/syscall/asm_linux_amd64.s:18 +0x5
syscall.read(0xb, 0xc42d51c000, 0x1000, 0x1000, 0xc42b0ca401, 0x0, 0x0)
	/usr/local/go/src/syscall/zsyscall_linux_amd64.go:749 +0x5f
syscall.Read(0xb, 0xc42d51c000, 0x1000, 0x1000, 0x6, 0xc420098588, 0xc420098500)
	/usr/local/go/src/syscall/syscall_unix.go:162 +0x49
internal/poll.(*FD).Read(0xc420434410, 0xc42d51c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/internal/poll/fd_unix.go:153 +0x118
os.(*File).read(0xc4233f0000, 0xc42d51c000, 0x1000, 0x1000, 0x494d73, 0xc420434410, 0x0)
	/usr/local/go/src/os/file_unix.go:226 +0x4e
os.(*File).Read(0xc4233f0000, 0xc42d51c000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
	/usr/local/go/src/os/file.go:107 +0x6a
bufio.(*Reader).fill(0xc428390080)
	/usr/local/go/src/bufio/bufio.go:100 +0x11e
bufio.(*Reader).ReadByte(0xc428390080, 0x0, 0x0, 0x0)
	/usr/local/go/src/bufio/bufio.go:242 +0x39
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*teeReader).ReadByte(0xc42b8fe420, 0xac51b, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/scanner.go:477 +0x37
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Scanner).readType(0xc42c520960, 0x0, 0x1, 0xac51b)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/scanner.go:271 +0x33
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Scanner).readObjectTypeAndLength(0xc42c520960, 0x0, 0x1, 0xac51b, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/scanner.go:258 +0x2f
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Scanner).nextObjectHeader(0xc42c520960, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/scanner.go:198 +0xfa
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Scanner).SeekObjectHeader(0xc42c520960, 0xac51b, 0xc4204c0f00, 0x129f688, 0xc42a516e80)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/scanner.go:153 +0x75
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).objectHeaderAtOffset(0xc42c520a00, 0xac51b, 0xac51b, 0x2114900, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:114 +0x39
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).getObjectType(0xc42c520a00, 0xc42d094000, 0x804, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:165 +0xd8
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).objectAtOffset(0xc42c520a00, 0x316fc72, 0x8722d1ef7085fe5c, 0x8722d1efc4fef03c, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:214 +0x241
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile.(*Packfile).GetByOffset(0xc42c520a00, 0x316fc72, 0x1473360, 0xc4204d4b80, 0x146ffa0, 0xc421bf8060)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/format/packfile/packfile.go:92 +0x8b
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem.(*ObjectStorage).decodeObjectAt(0xc42031e018, 0x146ffa0, 0xc421bf8060, 0x146bec0, 0xc420e3cd80, 0x316fc72, 0x0, 0x0, 0xc4fef03c8722d1ef, 0x316fc72)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/object.go:405 +0x187
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem.(*ObjectStorage).getFromPackfile(0xc42031e018, 0xdd1ba2b5a047ee15, 0x8722d1ef7085fe5c, 0xc4fef03c, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/object.go:378 +0x2cb
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem.(*ObjectStorage).EncodedObject(0xc42031e018, 0x1ba2b5a047ee1503, 0x22d1ef7085fe5cdd, 0xc4fef03c87, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/storage/filesystem/object.go:249 +0x6c
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object.GetBlob(0x1469ca0, 0xc42031e000, 0xdd1ba2b5a047ee15, 0x8722d1ef7085fe5c, 0xc4fef03c, 0xa047ee15000081a4, 0x7085fe5cdd1ba2b5, 0xc4fef03c8722d1ef)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object/blob.go:23 +0x4e
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object.(*FileIter).Next(0xc429b17da0, 0x7fe3ef3b8688, 0x64, 0xc42c5f0a50)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-git.v4/plumbing/object/file.go:100 +0x13f
github.com/src-d/gitbase.(*commitFilesRowIter).next(0xc42031e0e0, 0xc4200f0358, 0x1, 0xc429967e18, 0x43d75b, 0xc429967ee8)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/commit_files.go:278 +0x88
github.com/src-d/gitbase.(*commitFilesRowIter).Next(0xc42031e0e0, 0x3, 0x44a0e8, 0x3f5d8ee415b28, 0x8cc3621, 0x8cc362100000003)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/commit_files.go:192 +0x7d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*FilterIter).Next(0xc423aa8330, 0xf7dfa7c4, 0x20f0800, 0xc429967ee8, 0xc429967f7e, 0x489d36)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/filter.go:105 +0x38
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc421b42190, 0x8cc355f29967ee8, 0x5c9384e3, 0xc429967d98, 0x489d36, 0x5c9384e3)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*trackedRowIter).Next(0xc4204d4c80, 0xf7dfa703, 0x20f0800, 0xc4200f04e0, 0xc420ee2478, 0xc4202eac50)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/process.go:145 +0x37
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql.(*spanIter).Next(0xc421b421e0, 0x2, 0x0, 0x0, 0x0, 0x0)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/session.go:346 +0x5d
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).iterPartition(0xc420ee24e0, 0x1455180, 0xc420dea040)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:249 +0x286
github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start.func1(0xc420ee24e0, 0xc42461a070, 0x1455180, 0xc420dea040)
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:170 +0x3f
created by github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan.(*exchangeRowIter).start
	/tmp/regression-207397520/src/github.com/src-d/gitbase/vendor/gopkg.in/src-d/go-mysql-server.v0/sql/plan/exchange.go:169 +0x110
@ajnavarro ajnavarro added the bug Something isn't working label Mar 21, 2019
@kuba-- kuba-- self-assigned this Mar 21, 2019
@kuba--
Copy link
Contributor

kuba-- commented Mar 22, 2019

It panics in the same place as in old issue:
src-d/gitbase#544
Now, we have a pool of matchers and it's still happens on 96-core machine.

@kuba--
Copy link
Contributor

kuba-- commented Mar 22, 2019

So far, I think the problem happens when multiple threads reuse the same matcher (I'm not sure if it can happen) and other thread resized the region:
https://github.com/kkos/oniguruma/blob/341002b8a188494871d38fb19ad9d7d44f6aec00/src/regexec.c#L4723

@kuba-- kuba-- closed this as completed Mar 25, 2019
@kuba-- kuba-- reopened this Mar 25, 2019
@kuba--
Copy link
Contributor

kuba-- commented Mar 25, 2019

It's not a race.
For sure it happens in the onig_search function (https://github.com/kkos/oniguruma/blob/master/src/regexec.c#L4700)
Even if we have a pool of resources + extra mutex which I added (https://github.com/src-d/gitbase/blob/fix-jenkins-oniguruma/vendor/github.com/src-d/go-oniguruma/regex.go#L204)
it still happens (and not randomly but for every jenkins build):

regexp: 0x7f8448000d40, str_start: 0xc42f4de000, str_end: 0xc42f4df2d0, search_start: 0xc42f4de000, search_end: 0xc42f4df2d0, region: 0x7f8448002a90, option: 0
ret = onig_search: -1
regexp: 0x7f84b80010a0, str_start: 0xc42f4e0600, str_end: 0xc42f4e18d0, search_start: 0xc42f4e0600, search_end: 0xc42f4e18d0, region: 0x7f84b8001d90, option: 0
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x2 addr=0x7f84c9ffc000 pc=0x7f84f2531e2f]

runtime stack:
runtime.throw(0x127fe2c, 0x2a)
	/usr/local/go/src/runtime/panic.go:616 +0x81
runtime.sigpanic()
	/usr/local/go/src/runtime/signal_unix.go:372 +0x28e

goroutine 82 [syscall]:
runtime.cgocall(0xeaadf0, 0xc42a659770, 0x127d63c)
	/usr/local/go/src/runtime/cgocall.go:128 +0x64 fp=0xc42a659728 sp=0xc42a6596f0 pc=0x403a94
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma._Cfunc_SearchOnigRegex(0xc42f4e0600, 0x12d0, 0x0, 0x7f84b80010a0, 0x7f84b8001d90, 0x7f84b8001d00, 0x0, 0x0, 0x0, 0xc400000000)
	_cgo_gotypes.go:285 +0x50 fp=0xc42a659770 sp=0xc42a659728 pc=0x958bc0
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.(*Regexp).match.func1(0xc42f4e0600, 0x12d0, 0x0, 0x7f84b80010a0, 0x7f84b8001d90, 0x7f84b8001d00, 0x0, 0x0, 0x0, 0xc42f4e0600)
	/tmp/regression-329965490/src/github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma/regex.go:212 +0x144 fp=0xc42a6597d0 sp=0xc42a659770 pc=0x95eb64
github.com/src-d/gitbase/vendor/github.com/src-d/go-oniguruma.(*Regexp).match(0xc429cdeb40, 0xc42f4e0600, 0x12d0, 0x1300, 0x12d0, 0x0, 0xc42f4e0600)

@kuba-- kuba-- added the 3rd-party Third party compatibility label Mar 28, 2019
@kuba-- kuba-- added the wontfix This will not be worked on label Apr 5, 2019
@kuba--
Copy link
Contributor

kuba-- commented Apr 5, 2019

I'm closing this issue, because it won't be fixed - we switched back to go regexp engine (so far).

@kuba-- kuba-- closed this as completed Apr 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3rd-party Third party compatibility bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants