influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.98k stars 3.56k forks source link

InfluxDB v2.2.0 SegFault on aborting query. #23324

Open tomwimmenhove opened 2 years ago

tomwimmenhove commented 2 years ago

Steps to reproduce: List the minimal actions needed to reproduce the behavior.

  1. Send a fairly simple Influx query to "http://XXXXXXXX/api/v2/write?org=XXXXXXXX&bucket=XXXXXXXX&precision=ms": @"from(bucket: ""logger"")|> range(start: 2022-02-03T00:18:50.9290000Z, stop: 2022-02-03T00:21:26.7130000Z)|> filter(fn: (r) => r._field == ""XXXXXXXX"" or r._field == ""XXXXXXXX"")|> filter(fn: (r) => r._measurement == ""XXXXXXXX"")|> aggregateWindow(every: 10ms, fn: mean, createEmpty: false)"
  2. Cancel the query by aborting the HTTP request

Expected behavior: The query to simlply be aborted

Actual behavior: Internal errors/panics and even a SegFault.

Environment info:

Logs: A logfile from the time that the service actually crashed completely (Process exited) has been atttached. It can't be pasted, since the logfile is multiple megabytes syslog.ifl.gz Here's the 'head' of the log file:

May  5 15:22:27 bond3d-influx01 InfluxDB2[3221783]: ts=2022-05-05T15:22:27.944318Z lvl=info msg="Error writing response to client" log_id=0a0Qr6UW000 handler=flux error="csv encoder error: write tcp 127.0.0.1:8086->127.0.0.1:52040: write: broken pipe"
May  5 15:22:33 bond3d-influx01 InfluxDB2[3221783]: ts=2022-05-05T15:22:33.584001Z lvl=info msg="Error writing response to client" log_id=0a0Qr6UW000 handler=flux error="csv encoder error: write tcp 127.0.0.1:8086->127.0.0.1:52042: write: broken pipe"
May  5 15:24:32 bond3d-influx01 InfluxDB2[3221783]: ts=2022-05-05T15:24:32.425033Z lvl=error msg="a panic has occurred" log_id=0a3z~nz0000 handler=panic error="/api/v2/query?org=Bond3D&precision=ms: runtime error: invalid memory address or nil pointer dereference" stacktrace="goroutine 106698237 [running]:\nruntime/debug.Stack()\n\t/go/src/runtime/debug/stack.go:24 +0x65\ngithub.com/influxdata/influxdb/v2/http.baseHandler.panic({{0x3d95b40, 0xc00828b080}}, {0x3db0258, 0xc028b54b60}, 0xc000fb1b00, {0x39e6360, 0x5013a90})\n\t/root/project/http/router.go:96 +0x1b3\ngithub.com/influxdata/httprouter.(*Router).recv(0xc0361826c0, {0x3db0258, 0xc028b54b60}, 0xc017ab1980)\n\t/go/pkg/mod/github.com/influxdata/httprouter@v1.3.1-0.20191122104820-ee83e2772f69/router.go:361 +0x5e\npanic({0x39e6360, 0x5013a90})\n\t/go/src/runtime/panic.go:1038 +0x215\ngithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*floatArrayAscendingCursor).Next(0xc01fd87220)\n\t/root/project/tsdb/engine/tsm1/array_cursor.gen.go:81 +0x82\ngithub.com/influxdata/influxdb/v2/storage/reads.(*floatMultiShardArrayCursor).Next(0xc007178c00)\n\t/root/project/storage/reads/array_cursor.gen.go:297 +0x30\ngithub.com/influxdata/influxdb/v2/storage/reads.(*floatWindowMeanArrayCursor).Next(0xc020891ea0)\n\t/root/project/storage/reads/array_cursor.gen.go:1047 +0x38f\ngithub.com/influxdata/influxdb/v2/storage/flux.(*floatWindowTable).nextBuffer(0xc04644e180)\n\t/root/project/storage/flux/table.gen.go:268 +0x83\ngithub.com/influxdata/influxdb/v2/storage/flux.(*floatWindowTable).advance(0xc04644e180)\n\t/root/project/storage/flux/table.gen.go:290 +0x25\ngithub.com/influxdata/influxdb/v2/storage/flux.(*table).do(0xc0410c6218, 0xc047d66ac0, 0xc0410c6208)\n\t/root/project/storage/flux/table.go:95 +0x1ec\ngithub.com/influxdata/influxdb/v2/storage/flux.(*floatWindowTable).Do(0x0, 0x6)\n\t/root/project/storage/flux/table.gen.go:155 +0x37\ngithub.com/influxdata/flux/csv.(*ResultEncoder).Encode.func1({0x7df1ed96c208, 0xc04644e180})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.161.0/csv/result.go:956 +0x5b7\ngithub.com/influxdata/flux/execute.(*result).Do(0xc0444c5e80, 0xc043285490)\n\t/go/pkg/mod/github.com/influxdata/flux@v0.161.0/execute/result.go:71 +0xe2\ngithub.com/influxdata/influxdb/v2/query/control.(*errorCollectingTableIterator).Do(0xc041711050, 0xc00ba50be8)\n\t/root/project/query/control/controller.go:1013 +0x29\ngithub.com/influxdata/flux/csv.(*ResultEncoder).Encode(0xc040c35770, {0x3d8c0a0, 0xc01fdf2708}, {0x3da9078, 0xc041710ff0})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.161.0/csv/result.go:903 +0x3d8\ngithub.com/influxdata/flux.(*DelimitedMultiResultEncoder).Encode(0xc040c357a0, {0x3d8c0a0, 0xc01fdf2618}, {0x3dde1f8, 0xc040c35740})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.161.0/result.go:305 +0xcc\ngithub.com/influxdata/influxdb/v2/query.ProxyQueryServiceAsyncBridge.Query({{0x3d8f680, 0xc020238900}}, {0x3dd2520, 0xc040c35470}, {0x3d8c0a0, 0xc01fdf2618}, 0xc01fde8f50)\n\t/root/project/query/bridges.go:146 +0x238\ngithub.com/influxdata/influxdb/v2/http.(*FluxHandler).handleQuery(0xc002a36a80, {0x3dade58, 0xc017ab1980}, 0xc0410c6c08)\n\t/root/project/http/query_handler.go:199 +0x935\nnet/http.HandlerFunc.ServeHTTP(0x3905400, {0x3dade58, 0xc017ab1980}, 0x4)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x3db0258, 0xc028b54b60}, 0x0)\n\t/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.0.1/gzip.go:289 +0x262\nnet/http.HandlerFunc.ServeHTTP(0x7dfb6c275280, {0x3db0258, 0xc028b54b60}, 0x7f88ea2955b8)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/http.(*proxyHandler).ServeHTTP(0xc02d9fde20, {0x3db0258, 0xc028b54b60}, 0x90)\n\t/root/project/http/proxy_handler.go:33 +0x68\ngithub.com/influxdata/httprouter.(*Router).Handler.func1({0x3db0258, 0xc028b54b60}, 0x39e17a0, {0x0, 0x3905400, 0xc041096a50})\n\t/go/pkg/mod/github.com/influxdata/httprouter@v1.3.1-0.20191122104820-ee83e2772f69/router.go:325 +0x2c4\ngithub.com/influxdata/httprouter.(*Router).ServeHTTP(0xc0361826c0, {0x3db0258, 0xc028b54b60}, 0xc022c59700)\n\t/go/pkg/mod/github.com/influxdata/httprouter@v1.3.1-0.20191122104820-ee83e2772f69/router.go:453 +0x4c3\ngithub.com/go-chi/chi.(*Mux).Mount.func1({0x3db0258, 0xc028b54b60}, 0xc022c59700)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:298 +0x13b\nnet/http.HandlerFunc.ServeHTTP(0x39cc2e0, {0x3db0258, 0xc028b54b60}, 0xc0410801c0)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/go-chi/chi.(*Mux).routeHTTP(0xc0083ddf80, {0x3db0258, 0xc028b54b60}, 0xc022c59700)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:431 +0x1f9\nnet/http.HandlerFunc.ServeHTTP(0xc040c34e10, {0x3db0258, 0xc028b54b60}, 0xc0410c70b8)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.SetCORS.func1({0x3db0258, 0xc028b54b60}, 0xc022c59700)\n\t/root/project/kit/transport/http/middleware.go:36 +0x308\nnet/http.HandlerFunc.ServeHTTP(0x21d1209, {0x3db0258, 0xc028b54b60}, 0x20300a)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/go-chi/chi/middleware.StripSlashes.func1({0x3db0258, 0xc028b54b60}, 0xc022c59700)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/middleware/strip.go:25 +0x102\nnet/http.HandlerFunc.ServeHTTP(0xc040c34e10, {0x3db0258, 0xc028b54b60}, 0x30)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.SkipOptions.func1({0x3db0258, 0xc028b54b60}, 0xc022c59700)\n\t/root/project/kit/transport/http/middleware.go:81 +0xb9\nnet/http.HandlerFunc.ServeHTTP(0xc040c34ea0, {0x3db0258, 0xc028b54b60}, 0xc0410c7238)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/http.panicMW.func1.1({0x3db0258, 0xc028b54b60}, 0xc0410c72f0)\n\t/root/project/http/router.go:126 +0x9b\nnet/http.HandlerFunc.ServeHTTP(0x90, {0x3db0258, 0xc028b54b60}, 0x1000000021ae1e0)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/go-chi/chi.(*Mux).ServeHTTP(0xc0083ddf80, {0x3db0258, 0xc028b54b60}, 0xc022c59700)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:70 +0x40e\ngithub.com/influxdata/influxdb/v2/kit/feature.(*Handler).ServeHTTP(0xc0061679c0, {0x3db0258, 0xc028b54b60}, 0xc022c59600)\n\t/root/project/kit/feature/middleware.go:43 +0x3c2\ngithub.com/influxdata/influxdb/v2/http.(*AuthenticationHandler).ServeHTTP(0xc02506b2d0, {0x3db0258, 0xc028b54b60}, 0xc022c59500)\n\t/root/project/http/authentication_middleware.go:127 +0x467\ngithub.com/influxdata/influxdb/v2/kit/transport/http.SetCORS.func1({0x3db0258, 0xc028b54b60}, 0xc022c59500)\n\t/root/project/kit/transport/http/middleware.go:36 +0x308\nnet/http.HandlerFunc.ServeHTTP(0xc040c34e10, {0x3db0258, 0xc028b54b60}, 0xc0410801c1)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.SkipOptions.func1({0x3db0258, 0xc028b54b60}, 0xc022c59500)\n\t/root/project/kit/transport/http/middleware.go:81 +0xb9\nnet/http.HandlerFunc.ServeHTTP(0x31a7f88, {0x3db0258, 0xc028b54b60}, 0xc)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/http.(*PlatformHandler).ServeHTTP(0xc006167bc0, {0x3db0258, 0xc028b54b60}, 0xc022c59500)\n\t/root/project/http/platform_handler.go:81 +0x1d2\ngithub.com/go-chi/chi.(*Mux).Mount.func1({0x3db0258, 0xc028b54b60}, 0xc022c59500)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:298 +0x13b\nnet/http.HandlerFunc.ServeHTTP(0x20300a, {0x3db0258, 0xc028b54b60}, 0xc028b54b00)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.Metrics.func1.1({0x3db3018, 0xc024c91420}, 0xc022c59500)\n\t/root/project/kit/transport/http/middleware.go:66 +0x1e2\nnet/http.HandlerFunc.ServeHTTP(0xc03902f830, {0x3db3018, 0xc024c91420}, 0x7e05be378588)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.Trace.func1.1({0x3db3018, 0xc024c91420}, 0x2)\n\t/root/project/kit/transport/http/middleware.go:106 +0x30c\nnet/http.HandlerFunc.ServeHTTP(0xc006165d40, {0x3db3018, 0xc024c91420}, 0xc022a7e738)\n\t/go/src/net/http/serve
May  5 15:24:32 bond3d-influx01 InfluxDB2[3221783]: ts=2022-05-05T15:24:32.427348Z lvl=info msg="http: superfluous response.WriteHeader call from github.com/influxdata/influxdb/v2/kit/transport/http.(*StatusResponseWriter).WriteHeader (status_response_writer.go:26)" log_id=0a0Qr6UW000 service=http
May  5 15:25:50 bond3d-influx01 InfluxDB2[3221783]: ts=2022-05-05T15:25:50.691348Z lvl=error msg="a panic has occurred" log_id=0a3z~nz0000 handler=panic error="/api/v2/query?org=Bond3D&precision=ms: runtime error: invalid memory address or nil pointer dereference" stacktrace="goroutine 106705399 [running]:\nruntime/debug.Stack()\n\t/go/src/runtime/debug/stack.go:24 +0x65\ngithub.com/influxdata/influxdb/v2/http.baseHandler.panic({{0x3d95b40, 0xc00828b080}}, {0x3db0258, 0xc094f56d00}, 0xc000fb1b00, {0x39e6360, 0x5013a90})\n\t/root/project/http/router.go:96 +0x1b3\ngithub.com/influxdata/httprouter.(*Router).recv(0xc0361826c0, {0x3db0258, 0xc094f56d00}, 0xc0091dade0)\n\t/go/pkg/mod/github.com/influxdata/httprouter@v1.3.1-0.20191122104820-ee83e2772f69/router.go:361 +0x5e\npanic({0x39e6360, 0x5013a90})\n\t/go/src/runtime/panic.go:1038 +0x215\ngithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*KeyCursor).Next(0x1210b67)\n\t/root/project/tsdb/engine/tsm1/file_store.go:1441 +0x14\ngithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*floatArrayAscendingCursor).nextTSM(0xc0288116d0)\n\t/root/project/tsdb/engine/tsm1/array_cursor.gen.go:154 +0x25\ngithub.com/influxdata/influxdb/v2/tsdb/engine/tsm1.(*floatArrayAscendingCursor).Next(0xc0288116d0)\n\t/root/project/tsdb/engine/tsm1/array_cursor.gen.go:114 +0x352\ngithub.com/influxdata/influxdb/v2/storage/reads.(*floatMultiShardArrayCursor).Next(0xc003b8d2c0)\n\t/root/project/storage/reads/array_cursor.gen.go:297 +0x30\ngithub.com/influxdata/influxdb/v2/storage/reads.(*floatWindowMeanArrayCursor).Next(0xc05d954cb0)\n\t/root/project/storage/reads/array_cursor.gen.go:1047 +0x38f\ngithub.com/influxdata/influxdb/v2/storage/flux.(*floatWindowTable).nextBuffer(0xc05db4cc00)\n\t/root/project/storage/flux/table.gen.go:268 +0x83\ngithub.com/influxdata/influxdb/v2/storage/flux.(*floatWindowTable).advance(0xc05db4cc00)\n\t/root/project/storage/flux/table.gen.go:290 +0x25\ngithub.com/influxdata/influxdb/v2/storage/flux.(*table).do(0xc0465f8218, 0xc05ecd4cc0, 0xc0465f8208)\n\t/root/project/storage/flux/table.go:95 +0x1ec\ngithub.com/influxdata/influxdb/v2/storage/flux.(*floatWindowTable).Do(0x0, 0xc02e56e870)\n\t/root/project/storage/flux/table.gen.go:155 +0x37\ngithub.com/influxdata/flux/csv.(*ResultEncoder).Encode.func1({0x7df1ed96c208, 0xc05db4cc00})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.161.0/csv/result.go:956 +0x5b7\ngithub.com/influxdata/flux/execute.(*result).Do(0xc05d3c7a40, 0xc05c4d6540)\n\t/go/pkg/mod/github.com/influxdata/flux@v0.161.0/execute/result.go:71 +0xe2\ngithub.com/influxdata/influxdb/v2/query/control.(*errorCollectingTableIterator).Do(0xc05bdd6ac8, 0xc01f8358e8)\n\t/root/project/query/control/controller.go:1013 +0x29\ngithub.com/influxdata/flux/csv.(*ResultEncoder).Encode(0xc0465e4b10, {0x3d8c0a0, 0xc0465a28d0}, {0x3da9078, 0xc05bdd6a68})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.161.0/csv/result.go:903 +0x3d8\ngithub.com/influxdata/flux.(*DelimitedMultiResultEncoder).Encode(0xc0465e4b40, {0x3d8c0a0, 0xc0465a27e0}, {0x3dde1f8, 0xc0465e4ae0})\n\t/go/pkg/mod/github.com/influxdata/flux@v0.161.0/result.go:305 +0xcc\ngithub.com/influxdata/influxdb/v2/query.ProxyQueryServiceAsyncBridge.Query({{0x3d8f680, 0xc020238900}}, {0x3dd2520, 0xc0465e4810}, {0x3d8c0a0, 0xc0465a27e0}, 0xc0465a1810)\n\t/root/project/query/bridges.go:146 +0x238\ngithub.com/influxdata/influxdb/v2/http.(*FluxHandler).handleQuery(0xc002a36a80, {0x3dade58, 0xc0091dade0}, 0xc0465f8c08)\n\t/root/project/http/query_handler.go:199 +0x935\nnet/http.HandlerFunc.ServeHTTP(0x3905400, {0x3dade58, 0xc0091dade0}, 0x4)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/NYTimes/gziphandler.GzipHandlerWithOpts.func1.1({0x3db0258, 0xc094f56d00}, 0x0)\n\t/go/pkg/mod/github.com/!n!y!times/gziphandler@v1.0.1/gzip.go:289 +0x262\nnet/http.HandlerFunc.ServeHTTP(0x7e06043839b8, {0x3db0258, 0xc094f56d00}, 0x7f88ea295a68)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/http.(*proxyHandler).ServeHTTP(0xc02d9fde20, {0x3db0258, 0xc094f56d00}, 0x90)\n\t/root/project/http/proxy_handler.go:33 +0x68\ngithub.com/influxdata/httprouter.(*Router).Handler.func1({0x3db0258, 0xc094f56d00}, 0x39e17a0, {0x0, 0x3905400, 0xc0538cd9d0})\n\t/go/pkg/mod/github.com/influxdata/httprouter@v1.3.1-0.20191122104820-ee83e2772f69/router.go:325 +0x2c4\ngithub.com/influxdata/httprouter.(*Router).ServeHTTP(0xc0361826c0, {0x3db0258, 0xc094f56d00}, 0xc00184be00)\n\t/go/pkg/mod/github.com/influxdata/httprouter@v1.3.1-0.20191122104820-ee83e2772f69/router.go:453 +0x4c3\ngithub.com/go-chi/chi.(*Mux).Mount.func1({0x3db0258, 0xc094f56d00}, 0xc00184be00)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:298 +0x13b\nnet/http.HandlerFunc.ServeHTTP(0x39cc2e0, {0x3db0258, 0xc094f56d00}, 0xc03dbae300)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/go-chi/chi.(*Mux).routeHTTP(0xc0083ddf80, {0x3db0258, 0xc094f56d00}, 0xc00184be00)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:431 +0x1f9\nnet/http.HandlerFunc.ServeHTTP(0xc0465e41b0, {0x3db0258, 0xc094f56d00}, 0xc0465f90b8)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.SetCORS.func1({0x3db0258, 0xc094f56d00}, 0xc00184be00)\n\t/root/project/kit/transport/http/middleware.go:36 +0x308\nnet/http.HandlerFunc.ServeHTTP(0x21d1209, {0x3db0258, 0xc094f56d00}, 0x203025)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/go-chi/chi/middleware.StripSlashes.func1({0x3db0258, 0xc094f56d00}, 0xc00184be00)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/middleware/strip.go:25 +0x102\nnet/http.HandlerFunc.ServeHTTP(0xc0465e41b0, {0x3db0258, 0xc094f56d00}, 0x30)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.SkipOptions.func1({0x3db0258, 0xc094f56d00}, 0xc00184be00)\n\t/root/project/kit/transport/http/middleware.go:81 +0xb9\nnet/http.HandlerFunc.ServeHTTP(0xc0465e4240, {0x3db0258, 0xc094f56d00}, 0xc0465f9238)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/http.panicMW.func1.1({0x3db0258, 0xc094f56d00}, 0xc0465f92f0)\n\t/root/project/http/router.go:126 +0x9b\nnet/http.HandlerFunc.ServeHTTP(0x90, {0x3db0258, 0xc094f56d00}, 0x1000000021e789d)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/go-chi/chi.(*Mux).ServeHTTP(0xc0083ddf80, {0x3db0258, 0xc094f56d00}, 0xc00184be00)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:70 +0x40e\ngithub.com/influxdata/influxdb/v2/kit/feature.(*Handler).ServeHTTP(0xc0061679c0, {0x3db0258, 0xc094f56d00}, 0xc00184bd00)\n\t/root/project/kit/feature/middleware.go:43 +0x3c2\ngithub.com/influxdata/influxdb/v2/http.(*AuthenticationHandler).ServeHTTP(0xc02506b2d0, {0x3db0258, 0xc094f56d00}, 0xc00184bc00)\n\t/root/project/http/authentication_middleware.go:127 +0x467\ngithub.com/influxdata/influxdb/v2/kit/transport/http.SetCORS.func1({0x3db0258, 0xc094f56d00}, 0xc00184bc00)\n\t/root/project/kit/transport/http/middleware.go:36 +0x308\nnet/http.HandlerFunc.ServeHTTP(0xc0465e41b0, {0x3db0258, 0xc094f56d00}, 0xc03dbae301)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.SkipOptions.func1({0x3db0258, 0xc094f56d00}, 0xc00184bc00)\n\t/root/project/kit/transport/http/middleware.go:81 +0xb9\nnet/http.HandlerFunc.ServeHTTP(0x31a7f88, {0x3db0258, 0xc094f56d00}, 0xc)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/http.(*PlatformHandler).ServeHTTP(0xc006167bc0, {0x3db0258, 0xc094f56d00}, 0xc00184bc00)\n\t/root/project/http/platform_handler.go:81 +0x1d2\ngithub.com/go-chi/chi.(*Mux).Mount.func1({0x3db0258, 0xc094f56d00}, 0xc00184bc00)\n\t/go/pkg/mod/github.com/go-chi/chi@v4.1.0+incompatible/mux.go:298 +0x13b\nnet/http.HandlerFunc.ServeHTTP(0x17f, {0x3db0258, 0xc094f56d00}, 0x7dfb6c284b98)\n\t/go/src/net/http/server.go:2047 +0x2f\ngithub.com/influxdata/influxdb/v2/kit/transport/http.Metrics.func1.1({0x3db3018, 0xc024c915e0}, 0xc00184bc00)\n\t/root/project/kit/transport/http/middleware.go:66 +0x1e2\nnet/http.HandlerFunc.ServeHTTP(0xc03902f830, {0x3db3018, 0xc024c915e0}, 0x7dfb6c284b9
May  5 15:25:50 bond3d-influx01 InfluxDB2[3221783]: ts=2022-05-05T15:25:50.693124Z lvl=info msg="http: superfluous response.WriteHeader call from github.com/influxdata/influxdb/v2/kit/transport/http.(*StatusResponseWriter).WriteHeader (status_response_writer.go:26)" log_id=0a0Qr6UW000 service=http
May  5 15:25:51 bond3d-influx01 InfluxDB2[3221783]: unexpected fault address 0x5e2b0
May  5 15:25:51 bond3d-influx01 InfluxDB2[3221783]: fatal error: fault
May  5 15:25:51 bond3d-influx01 InfluxDB2[3221783]: [signal SIGSEGV: segmentation violation code=0x1 addr=0x5e2b0 pc=0x4738a9]

Config: { "assets-path": "", "bolt-path": "/root/.influxdbv2/influxd.bolt", "e2e-testing": false, "engine-path": "/mnt/NFS/InfluxData/engine", "feature-flags": null, "flux-log-enabled": false, "hardening-enabled": false, "http-bind-address": ":8086", "http-idle-timeout": 180000000000, "http-read-header-timeout": 10000000000, "http-read-timeout": 0, "http-write-timeout": 0, "influxql-max-select-buckets": 0, "influxql-max-select-point": 0, "influxql-max-select-series": 0, "log-level": "info", "metrics-disabled": false, "nats-max-payload-bytes": 0, "nats-port": 0, "no-tasks": false, "pprof-disabled": false, "query-concurrency": 1024, "query-initial-memory-bytes": 0, "query-max-memory-bytes": 2147483648, "query-memory-bytes": 0, "query-queue-size": 1024, "reporting-disabled": false, "secret-store": "bolt", "session-length": 60, "session-renew-disabled": false, "sqlite-path": "/root/.influxdbv2/influxd.sqlite", "storage-cache-max-memory-size": 1073741824, "storage-cache-snapshot-memory-size": 26214400, "storage-cache-snapshot-write-cold-duration": "10m0s", "storage-compact-full-write-cold-duration": "4h0m0s", "storage-compact-throughput-burst": 50331648, "storage-max-concurrent-compactions": 0, "storage-max-index-log-file-size": 1048576, "storage-no-validate-field-size": false, "storage-retention-check-interval": "30m0s", "storage-series-file-max-concurrent-snapshot-compactions": 0, "storage-series-id-set-cache-size": 0, "storage-shard-precreator-advance-period": "30m0s", "storage-shard-precreator-check-interval": "10m0s", "storage-tsm-use-madv-willneed": false, "storage-validate-keys": false, "storage-wal-fsync-delay": "0s", "storage-wal-max-concurrent-writes": 0, "storage-wal-max-write-delay": 600000000000, "storage-write-timeout": 10000000000, "store": "disk", "testing-always-allow-setup": false, "tls-cert": "", "tls-key": "", "tls-min-version": "1.2", "tls-strict-ciphers": false, "tracing-type": "", "ui-disabled": false, "vault-addr": "", "vault-cacert": "", "vault-capath": "", "vault-client-cert": "", "vault-client-key": "", "vault-client-timeout": 0, "vault-max-retries": 0, "vault-skip-verify": false, "vault-tls-server-name": "", "vault-token": "" }

jeffreyssmith2nd commented 2 years ago

Hey I gave this a shot and wasn't able to reproduce it locally. I tried CTRL+C'ing a curl request as well as various levels of kill, and the influxdb node stayed up the whole time. If you can provide any more information to make reproducing easier, that would be great!

tomwimmenhove commented 2 years ago

I'm using a client written in C# to communicate with influx. The way a query is cancelled is by passing a CancellationToken to HttpClient.SendAsync(). I'm not sure if this is equivalent to sending a SIGINT to curl (although it seems like it should be?)

The database itself is over one TiB and the moment I cancel the query definitely has an effect on the outcome. Maybe because the database being so large, the chance that I cancel the query during some critical part of the process is higher.

I was hoping that the stack trace would give you some information...

jeffreyssmith2nd commented 2 years ago

Good to know about the DB being large, also I noticed your path is /mnt/NFS/InfluxData/engine. What type of NFS mount are you using?

tomwimmenhove commented 2 years ago

Good to know about the DB being large, also I noticed your path is /mnt/NFS/InfluxData/engine. What type of NFS mount are you using?

I'm not entirely sure what you mean with 'type', the options in /etc/fstab are "defaults,rsize=65536,wsize=65536,nosuid" and it's connected over 10GBit with a few tens TB NAS consisting of only SSDs.