{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5241","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5241/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5241/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5241/events","html_url":"https://github.com/cockroachdb/cockroach/issues/5241","id":140786753,"number":5241,"title":"kv: crash on dropping database","user":{"login":"RaduBerinde","id":16544120,"avatar_url":"https://avatars.githubusercontent.com/u/16544120?v=3","gravatar_id":"","url":"https://api.github.com/users/RaduBerinde","html_url":"https://github.com/RaduBerinde","followers_url":"https://api.github.com/users/RaduBerinde/followers","following_url":"https://api.github.com/users/RaduBerinde/following{/other_user}","gists_url":"https://api.github.com/users/RaduBerinde/gists{/gist_id}","starred_url":"https://api.github.com/users/RaduBerinde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaduBerinde/subscriptions","organizations_url":"https://api.github.com/users/RaduBerinde/orgs","repos_url":"https://api.github.com/users/RaduBerinde/repos","events_url":"https://api.github.com/users/RaduBerinde/events{/privacy}","received_events_url":"https://api.github.com/users/RaduBerinde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/1","html_url":"https://github.com/cockroachdb/cockroach/milestones/Beta","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/1/labels","id":778698,"number":1,"title":"Beta","description":"","creator":{"login":"andybons","id":365204,"avatar_url":"https://avatars.githubusercontent.com/u/365204?v=3","gravatar_id":"","url":"https://api.github.com/users/andybons","html_url":"https://github.com/andybons","followers_url":"https://api.github.com/users/andybons/followers","following_url":"https://api.github.com/users/andybons/following{/other_user}","gists_url":"https://api.github.com/users/andybons/gists{/gist_id}","starred_url":"https://api.github.com/users/andybons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andybons/subscriptions","organizations_url":"https://api.github.com/users/andybons/orgs","repos_url":"https://api.github.com/users/andybons/repos","events_url":"https://api.github.com/users/andybons/events{/privacy}","received_events_url":"https://api.github.com/users/andybons/received_events","type":"User","site_admin":false},"open_issues":90,"closed_issues":426,"state":"open","created_at":"2014-09-04T16:42:18Z","updated_at":"2016-03-15T15:36:43Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2016-03-14T20:20:46Z","updated_at":"2016-03-15T16:00:35Z","closed_at":null,"body":"I was trying to run some queries from the photo app locally and I noticed a crash.\r\n\r\nThis reproduces it:\r\n```\r\nDROP DATABASE TEST;\r\nCREATE DATABASE TEST;\r\nSET DATABASE=TEST;\r\n\r\nCREATE TABLE IF NOT EXISTS users (\r\n  id           INT,\r\n  photoCount   INT,\r\n  commentCount INT,\r\n  name         STRING,\r\n  address      STRING,\r\n  PRIMARY KEY (id)\r\n);\r\nCREATE TABLE IF NOT EXISTS photos (\r\n  id           BYTES DEFAULT EXPERIMENTAL_UUID_V4(),\r\n  userID       INT,\r\n  commentCount INT,\r\n  caption      STRING,\r\n  latitude     FLOAT,\r\n  longitude    FLOAT,\r\n  timestamp    TIMESTAMP,\r\n  PRIMARY KEY (id)\r\n);\r\nCREATE UNIQUE INDEX IF NOT EXISTS photosByUserID ON photos (userID, timestamp);\r\nCREATE TABLE IF NOT EXISTS comments (\r\n  photoID   BYTES,\r\n  commentID BYTES DEFAULT EXPERIMENTAL_UUID_V4(),\r\n  userID    INT,\r\n  message   STRING,\r\n  timestamp TIMESTAMP,\r\n  PRIMARY KEY (photoID, commentID)\r\n);\r\nCREATE UNIQUE INDEX IF NOT EXISTS commentsByPhotoID ON comments (photoID, timestamp);\r\n\r\nDROP DATABASE TEST;\r\n```\r\n\r\n```\r\npanic: attempt to clone resolve_intent_range:<header:<key:\"\\305\" end_key:\"\\307\" > intent_txn:<id:<1437:2699763392 9:/* unknown wire type 6 */ 4:/* unknown wire type 6 */ 28478418:/* unexpected EOF */ /* unexpected EOF */ >isolation:SERIALIZABLE key:\"\\307\" epoch:0 timestamp:<wall_time:1457986634287956693 logical:0 > > status:COMMITTED poison:false > , which contains ed59c01e-eba0-4e26-90bd-d16c8f9eae96\r\n\r\ngoroutine 1085 [running]:\r\npanic(0x13e5200, 0xc8207877e0)\r\n\t/usr/local/go/src/runtime/panic.go:464 +0x3e6\r\ngithub.com/cockroachdb/cockroach/util.CloneProto(0x7f8c57d0df00, 0xc820113148, 0x0, 0x0)\r\n\t/go/src/github.com/cockroachdb/cockroach/util/clone_proto.go:60 +0x26d\r\ngithub.com/cockroachdb/cockroach/kv.truncate(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc8205ea520, 0xc82057e000, ...)\r\n\t/go/src/github.com/cockroachdb/cockroach/kv/batch.go:99 +0x70c\r\ngithub.com/cockroachdb/cockroach/kv.(*DistSender).sendChunk.func1(0xc8206c4da0, 0xc8206c4af0, 0xc8206c50d0, 0xc82030e980, 0x7f8c57d1f3a8, 0xc8205e2750, 0x8, 0xc820847d70)\r\n\t/go/src/github.com/cockroachdb/cockroach/kv/dist_sender.go:607 +0x11d\r\ngithub.com/cockroachdb/cockroach/kv.(*DistSender).sendChunk(0xc82030e980, 0x7f8c57d1f4b0, 0xc8205b0f30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/go/src/github.com/cockroachdb/cockroach/kv/dist_sender.go:619 +0x16cf\r\ngithub.com/cockroachdb/cockroach/kv.(*DistSender).Send(0xc82030e980, 0x7f8c57d1f4b0, 0xc8205b0f30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/go/src/github.com/cockroachdb/cockroach/kv/dist_sender.go:490 +0x42c\r\ngithub.com/cockroachdb/cockroach/kv.(*TxnCoordSender).Send(0xc82041e2a0, 0x7f8c57d1f4b0, 0xc8205b0f30, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)\r\n\t/go/src/github.com/cockroachdb/cockroach/kv/txn_coord_sender.go:411 +0xce3\r\ngithub.com/cockroachdb/cockroach/client.(*DB).send(0xc82030d040, 0xc8202b6800, 0x12, 0x20, 0x0, 0xc8205ea4e0)\r\n\t/go/src/github.com/cockroachdb/cockroach/client/db.go:413 +0x16c\r\ngithub.com/cockroachdb/cockroach/client.(*DB).(github.com/cockroachdb/cockroach/client.send)-fm(0xc8202b6800, 0x12, 0x20, 0x1, 0x7f8c57d994b0)\r\n\t/go/src/github.com/cockroachdb/cockroach/client/db.go:378 +0x3e\r\ngithub.com/cockroachdb/cockroach/client.sendAndFill(0xc8206c5888, 0xc8207b6380, 0x0, 0x10)\r\n\t/go/src/github.com/cockroachdb/cockroach/client/db.go:343 +0x4d\r\ngithub.com/cockroachdb/cockroach/client.(*DB).RunWithResponse(0xc82030d040, 0xc8207b6380, 0xc8209c1980, 0x5d7bb2)\r\n\t/go/src/github.com/cockroachdb/cockroach/client/db.go:378 +0x6b\r\ngithub.com/cockroachdb/cockroach/client.(*DB).Run(0xc82030d040, 0xc8207b6380, 0xc8205ea4e0)\r\n\t/go/src/github.com/cockroachdb/cockroach/client/db.go:369 +0x2b\r\ngithub.com/cockroachdb/cockroach/storage.(*Replica).resolveIntents.func3(0x1632060)\r\n\t/go/src/github.com/cockroachdb/cockroach/storage/replica.go:1977 +0x31\r\ngithub.com/cockroachdb/cockroach/storage.(*Replica).resolveIntents(0xc82069e0e0, 0x7f8c57d1f618, 0xc82005a300, 0xc8205cb000, 0x12, 0x22, 0x1, 0x0)\r\n\t/go/src/github.com/cockroachdb/cockroach/storage/replica.go:1986 +0x9f5\r\ngithub.com/cockroachdb/cockroach/storage.(*Replica).handleSkippedIntents.func1()\r\n\t/go/src/github.com/cockroachdb/cockroach/storage/replica.go:1808 +0x2ec\r\ngithub.com/cockroachdb/cockroach/util/stop.(*Stopper).RunAsyncTask.func1(0xc820301180, 0x1f2027d, 0x12, 0x740, 0xc82072f590)\r\n\t/go/src/github.com/cockroachdb/cockroach/util/stop/stopper.go:140 +0x62\r\ncreated by github.com/cockroachdb/cockroach/util/stop.(*Stopper).RunAsyncTask\r\n\t/go/src/github.com/cockroachdb/cockroach/util/stop/stopper.go:141 +0xc9\r\n```\r\n\r\nIt hits every time, but strangely doesn't hit if I comment out one of the tables and its index.."},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/196896221","html_url":"https://github.com/cockroachdb/cockroach/issues/5241#issuecomment-196896221","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/5241","id":196896221,"user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T16:00:35Z","updated_at":"2016-03-15T16:00:35Z","body":"I'm looking into this"}}