databend icon indicating copy to clipboard operation
databend copied to clipboard

bug: curl send one query to Databend will generate two query_id

Open TCeason opened this issue 1 year ago โ€ข 10 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

the newest main version

What's Wrong?

http auth will generate a new query id.

$ curl -uroot : --request POST '0.0.0.0:8000/v1/query/' --header 'Content-Type: application/json' --data-raw '{"sql": "SELECT 200"}'                                                                                                        
Enter host password for user 'root':
curl: (3) URL rejected: Port number was not a decimal number between 0 and 65535
{"id":"0e97ddc3-14c6-4aca-b909-3a13a3c88c17","session_id":"3051956f-d3b5-4ff3-b126-904568f79b2b","node_id":"oOt2eAsXqkTRqSzqmk5sV5","session":{"database":"default","role":"account_admin","settings":{}},"schema":[{"name":"200","type":"UInt8"}],"data":[["200"]],"state":"Succeeded","error":null,"stats":{"scan_progress":{"rows":1,"bytes":1},"write_progress":{"rows":0,"bytes":0},"result_progress":{"rows":1,"bytes":64},"total_scan":{"rows":1,"bytes":1},"running_time_ms":5},"affect":null,"warnings":[],"stats_uri":"/v1/query/0e97ddc3-14c6-4aca-b909-3a13a3c88c17","final_uri":"/v1/query/0e97ddc3-14c6-4aca-b909-3a13a3c88c17/final","next_uri":"/v1/query/0e97ddc3-14c6-4aca-b909-3a13a3c88c17/final","kill_uri":"/v1/query/0e97ddc3-14c6-4aca-b909-3a13a3c88c17/kill"}%                                                           
$ git diff 
diff --git a/src/query/service/src/sessions/query_ctx_shared.rs b/src/query/service/src/sessions/query_ctx_shared.rs
index 6d143650ba..a4b45de926 100644
--- a/src/query/service/src/sessions/query_ctx_shared.rs
+++ b/src/query/service/src/sessions/query_ctx_shared.rs
@@ -15,6 +15,8 @@
 use std::collections::hash_map::Entry;
 use std::collections::HashMap;
 use std::sync::atomic::AtomicBool;
+use backtrace::Backtrace;
 use std::sync::atomic::Ordering;
 use std::sync::Arc;
 use std::sync::Weak;
@@ -442,6 +444,8 @@ impl Drop for QueryContextShared {
         // last_query_id() should return the query_id of the last executed statement,
         // so we set it when the current context drops
         // to avoid returning the query_id of the current statement.
+        let bt = Backtrace::new();
+        println!("id is {:?}, QueryContextShared Drop: {:?}", self.init_query_id.read().clone(), bt);
         self.session
             .session_ctx
             .update_query_ids_results(self.init_query_id.read().clone(), None)

The backtrace:

id is "98e5a708-b8eb-460a-b4de-9bad3d5878b4", QueryContextShared Drop:    0: <databend_query::sessions::query_ctx_shared::QueryContextShared as core::ops::drop::Drop>::drop
             at src/query/service/src/sessions/query_ctx_shared.rs:447:18
   1: core::ptr::drop_in_place<databend_query::sessions::query_ctx_shared::QueryContextShared>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   2: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   3: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   4: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx_shared::QueryContextShared>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   5: core::ptr::drop_in_place<databend_query::sessions::query_ctx::QueryContext>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   6: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   7: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   8: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx::QueryContext>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   9: databend_query::servers::http::middleware::HTTPSessionEndpoint<E>::auth::{{closure}}::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:216:5
  10: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:27
  11: async_backtrace::frame::Frame::in_scope::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:184:17
  12: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  13: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  14: async_backtrace::frame::active_frame::with
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:81:9
  15: async_backtrace::frame::Frame::in_scope
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:180:13
  16: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:9
  17: databend_query::servers::http::middleware::HTTPSessionEndpoint<E>::auth::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:175:5
  18: <databend_query::servers::http::middleware::HTTPSessionEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:229:41
  19: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:27
  20: async_backtrace::frame::Frame::in_scope::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:184:17
  21: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  22: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  23: async_backtrace::frame::active_frame::with
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:81:9
  24: async_backtrace::frame::Frame::in_scope
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:180:13
  25: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:9
  26: <databend_query::servers::http::middleware::HTTPSessionEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:223:5
  27: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  28: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  29: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  30: <alloc::sync::Arc<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:201:33
  31: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  32: <poem::route::router::Route::internal_nest::Nest<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/route/router.rs:273:41
  33: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  34: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  35: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  36: <poem::route::router::Route as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/route/router.rs:351:58
  37: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  38: <poem::middleware::normalize_path::NormalizePathEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/middleware/normalize_path.rs:119:30
  39: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  40: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:296:9
  41: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.28/src/future/future/catch_unwind.rs:36:42
  42: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  43: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  44: __rust_try
  45: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  46: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  47: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.28/src/future/future/catch_unwind.rs:36:9
  48: <poem::middleware::catch_panic::CatchPanicEndpoint<E,H> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/middleware/catch_panic.rs:136:69
  49: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  50: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  51: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  52: <poem::endpoint::map_to_response::MapToResponse<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/map_to_response.rs:21:30
  53: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  54: <alloc::sync::Arc<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:201:33
  55: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  56: poem::endpoint::endpoint::Endpoint::get_response::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:50:14
  57: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  58: poem::server::serve_connection::{{closure}}::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:332:26
  59: <hyper::proto::h1::dispatch::Server<S,hyper::body::body::Body> as hyper::proto::h1::dispatch::Dispatch>::poll_msg
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:500:35
  60: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:301:43
  61: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_loop
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:165:21
  62: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:141:16
  63: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_catch
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:120:28
  64: <hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:433:9
  65: <hyper::server::conn::ProtoServer<T,B,S,E> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/server/conn.rs:986:47
  66: <hyper::server::conn::upgrades::UpgradeableConnection<I,S,E> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/server/conn.rs:1046:30
  67: <&mut F as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:113:9
  68: poem::server::serve_connection::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/macros/select.rs:524:49
  69: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/future/poll_fn.rs:58:9
  70: poem::server::serve_connection::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:359:5
  71: poem::server::Server<L,A>::run_with_graceful_shutdown::{{closure}}::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/macros/select.rs:524:49
  72: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/future/poll_fn.rs:58:9
  73: poem::server::Server<L,A>::run_with_graceful_shutdown::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:170:33
  74: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  75: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
  76: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
  77: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
  78: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  79: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  80: __rust_try
  81: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  82: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  83: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
  84: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
  85: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
  86: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
  87: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
  88: tokio::runtime::task::LocalNotified<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:416:9
  89: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:576:13
  90: tokio::runtime::coop::with_budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:107:5
      tokio::runtime::coop::budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:73:5
      tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:575:9
  91: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:526:24
  92: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:491:21
  93: tokio::runtime::context::scoped::Scoped<T>::set
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/scoped.rs:40:9
  94: tokio::runtime::context::set_scheduler::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:26
  95: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  96: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  97: tokio::runtime::context::set_scheduler
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:9
  98: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:486:9
  99: tokio::runtime::context::runtime::enter_runtime
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/runtime.rs:65:16
 100: tokio::runtime::scheduler::multi_thread::worker::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:478:5
 101: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:447:45
 102: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/task.rs:42:21
 103: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
 104: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
 105: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
 106: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
 107: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
 108: __rust_try
 109: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
 110: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
 111: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
 112: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
 113: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
 114: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
 115: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
 116: tokio::runtime::task::UnownedTask<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:453:9
 117: tokio::runtime::blocking::pool::Task::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:159:9
 118: tokio::runtime::blocking::pool::Inner::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:513:17
 119: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:471:13
 120: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys_common/backtrace.rs:154:18
 121: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:529:17
 122: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
 123: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
 124: __rust_try
 125: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
 126: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
      std::thread::Builder::spawn_unchecked_::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:528:30
 127: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ops/function.rs:250:5
 128: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys/unix/thread.rs:108:17
 129: <unknown>
 130: <unknown>

query_id_clone is "0e97ddc3-14c6-4aca-b909-3a13a3c88c17", ctx.get_id() is "0e97ddc3-14c6-4aca-b909-3a13a3c88c17"
id is "0e97ddc3-14c6-4aca-b909-3a13a3c88c17", QueryContextShared Drop:    0: <databend_query::sessions::query_ctx_shared::QueryContextShared as core::ops::drop::Drop>::drop
             at src/query/service/src/sessions/query_ctx_shared.rs:447:18
   1: core::ptr::drop_in_place<databend_query::sessions::query_ctx_shared::QueryContextShared>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   2: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   3: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   4: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx_shared::QueryContextShared>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   5: core::ptr::drop_in_place<databend_query::sessions::query_ctx::QueryContext>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   6: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   7: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   8: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx::QueryContext>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   9: databend_query::servers::http::v1::query::http_query::HttpQuery::try_create::{{closure}}::{{closure}}::{{closure}}::{{closure}}
             at src/query/service/src/servers/http/v1/query/http_query.rs:379:13
  10: <minitrace::future::InSpan<T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/minitrace-0.6.2/src/future.rs:125:19
  11: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:27
  12: async_backtrace::frame::Frame::in_scope::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:184:17
  13: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  14: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  15: async_backtrace::frame::active_frame::with
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:81:9
  16: async_backtrace::frame::Frame::in_scope
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:180:13
  17: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:9
  18: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
  19: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
  20: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
  21: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  22: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  23: __rust_try
  24: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  25: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  26: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
  27: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
  28: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
  29: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
  30: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
  31: tokio::runtime::task::LocalNotified<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:416:9
  32: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:576:13
  33: tokio::runtime::coop::with_budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:107:5
      tokio::runtime::coop::budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:73:5
      tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:575:9
  34: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:526:24
  35: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:491:21
  36: tokio::runtime::context::scoped::Scoped<T>::set
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/scoped.rs:40:9
  37: tokio::runtime::context::set_scheduler::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:26
  38: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  39: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  40: tokio::runtime::context::set_scheduler
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:9
  41: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:486:9
  42: tokio::runtime::context::runtime::enter_runtime
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/runtime.rs:65:16
  43: tokio::runtime::scheduler::multi_thread::worker::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:478:5
  44: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:447:45
  45: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/task.rs:42:21
  46: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
  47: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
  48: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
  49: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  50: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  51: __rust_try
  52: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  53: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  54: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
  55: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
  56: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
  57: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
  58: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
  59: tokio::runtime::task::UnownedTask<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:453:9
  60: tokio::runtime::blocking::pool::Task::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:159:9
  61: tokio::runtime::blocking::pool::Inner::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:513:17
  62: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:471:13
  63: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys_common/backtrace.rs:154:18
  64: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:529:17
  65: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  66: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  67: __rust_try
  68: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  69: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
      std::thread::Builder::spawn_unchecked_::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:528:30
  70: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ops/function.rs:250:5
  71: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys/unix/thread.rs:108:17
  72: <unknown>
  73: <unknown>

In this case:

The query id is 0e97ddc3-14c6-4aca-b909-3a13a3c88c17

But auth also generate a id: 98e5a708-b8eb-460a-b4de-9bad3d5878b4

How to Reproduce?

$ curl -uroot : --request POST '0.0.0.0:8000/v1/query/' --header 'Content-Type: application/json' --data-raw '{"sql": "SELECT 200"}'                                                                                                        
Enter host password for user 'root':
curl: (3) URL rejected: Port number was not a decimal number between 0 and 65535
{"id":"0e97ddc3-14c6-4aca-b909-3a13a3c88c17","session_id":"3051956f-d3b5-4ff3-b126-904568f79b2b","node_id":"oOt2eAsXqkTRqSzqmk5sV5","session":{"database":"default","role":"account_admin","settings":{}},"schema":[{"name":"200","type":"UInt8"}],"data":[["200"]],"state":"Succeeded","error":null,"stats":{"scan_progress":{"rows":1,"bytes":1},"write_progress":{"rows":0,"bytes":0},"result_progress":{"rows":1,"bytes":64},"total_scan":{"rows":1,"bytes":1},"running_time_ms":5},"affect":null,"warnings":[],"stats_uri":"/v1/query/0e97ddc3-14c6-4aca-b909-3a13a3c88c17","final_uri":"/v1/query/0e97ddc3-14c6-4aca-b909-3a13a3c88c17/final","next_uri":"/v1/query/0e97ddc3-14c6-4aca-b909-3a13a3c88c17/final","kill_uri":"/v1/query/0e97ddc3-14c6-4aca-b909-3a13a3c88c17/kill"}%    

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

TCeason avatar Dec 27 '23 13:12 TCeason

cc @ariesdevil It looks like this.

TCeason avatar Dec 27 '23 13:12 TCeason

Every query from http will do auth๏ผŒin auth it will create a query context

ariesdevil avatar Dec 27 '23 13:12 ariesdevil

use bendsql, send query select 1 into databend, the bt is:

It looks like bendsql will auth twice.

auth -> exec_query -> auth


id is "fa760c67-0882-498c-8ec1-1a45ce2cd233", QueryContextShared Drop:    0: <databend_query::sessions::query_ctx_shared::QueryContextShared as core::ops::drop::Drop>::drop
             at src/query/service/src/sessions/query_ctx_shared.rs:446:18
   1: core::ptr::drop_in_place<databend_query::sessions::query_ctx_shared::QueryContextShared>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   2: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   3: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   4: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx_shared::QueryContextShared>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   5: core::ptr::drop_in_place<databend_query::sessions::query_ctx::QueryContext>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   6: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   7: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   8: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx::QueryContext>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   9: databend_query::servers::http::middleware::HTTPSessionEndpoint<E>::auth::{{closure}}::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:216:5
  10: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:27
  11: async_backtrace::frame::Frame::in_scope::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:184:17
  12: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  13: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  14: async_backtrace::frame::active_frame::with
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:81:9
  15: async_backtrace::frame::Frame::in_scope
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:180:13
  16: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:9
  17: databend_query::servers::http::middleware::HTTPSessionEndpoint<E>::auth::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:175:5
  18: <databend_query::servers::http::middleware::HTTPSessionEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:229:41
  19: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:27
  20: async_backtrace::frame::Frame::in_scope::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:184:17
  21: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  22: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  23: async_backtrace::frame::active_frame::with
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:81:9
  24: async_backtrace::frame::Frame::in_scope
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:180:13
  25: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:9
  26: <databend_query::servers::http::middleware::HTTPSessionEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:223:5
  27: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  28: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  29: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  30: <alloc::sync::Arc<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:201:33
  31: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  32: <poem::route::router::Route::internal_nest::Nest<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/route/router.rs:273:41
  33: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  34: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  35: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  36: <poem::route::router::Route as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/route/router.rs:351:58
  37: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  38: <poem::middleware::normalize_path::NormalizePathEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/middleware/normalize_path.rs:119:30
  39: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  40: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:296:9
  41: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.28/src/future/future/catch_unwind.rs:36:42
  42: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  43: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  44: __rust_try
  45: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  46: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  47: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.28/src/future/future/catch_unwind.rs:36:9
  48: <poem::middleware::catch_panic::CatchPanicEndpoint<E,H> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/middleware/catch_panic.rs:136:69
  49: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  50: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  51: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  52: <poem::endpoint::map_to_response::MapToResponse<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/map_to_response.rs:21:30
  53: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  54: <alloc::sync::Arc<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:201:33
  55: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  56: poem::endpoint::endpoint::Endpoint::get_response::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:50:14
  57: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  58: poem::server::serve_connection::{{closure}}::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:332:26
  59: <hyper::proto::h1::dispatch::Server<S,hyper::body::body::Body> as hyper::proto::h1::dispatch::Dispatch>::poll_msg
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:500:35
  60: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:301:43
  61: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_loop
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:165:21
  62: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:141:16
  63: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_catch
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:120:28
  64: <hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:433:9
  65: <hyper::server::conn::ProtoServer<T,B,S,E> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/server/conn.rs:986:47
  66: <hyper::server::conn::upgrades::UpgradeableConnection<I,S,E> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/server/conn.rs:1046:30
  67: <&mut F as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:113:9
  68: poem::server::serve_connection::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/macros/select.rs:524:49
  69: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/future/poll_fn.rs:58:9
  70: poem::server::serve_connection::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:359:5
  71: poem::server::Server<L,A>::run_with_graceful_shutdown::{{closure}}::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/macros/select.rs:524:49
  72: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/future/poll_fn.rs:58:9
  73: poem::server::Server<L,A>::run_with_graceful_shutdown::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:170:33
  74: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  75: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
  76: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
  77: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
  78: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  79: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  80: __rust_try
  81: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  82: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  83: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
  84: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
  85: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
  86: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
  87: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
  88: tokio::runtime::task::LocalNotified<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:416:9
  89: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:576:13
  90: tokio::runtime::coop::with_budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:107:5
      tokio::runtime::coop::budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:73:5
      tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:575:9
  91: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:526:24
  92: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:491:21
  93: tokio::runtime::context::scoped::Scoped<T>::set
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/scoped.rs:40:9
  94: tokio::runtime::context::set_scheduler::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:26
  95: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  96: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  97: tokio::runtime::context::set_scheduler
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:9
  98: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:486:9
  99: tokio::runtime::context::runtime::enter_runtime
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/runtime.rs:65:16
 100: tokio::runtime::scheduler::multi_thread::worker::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:478:5
 101: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:447:45
 102: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/task.rs:42:21
 103: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
 104: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
 105: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
 106: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
 107: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
 108: __rust_try
 109: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
 110: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
 111: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
 112: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
 113: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
 114: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
 115: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
 116: tokio::runtime::task::UnownedTask<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:453:9
 117: tokio::runtime::blocking::pool::Task::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:159:9
 118: tokio::runtime::blocking::pool::Inner::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:513:17
 119: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:471:13
 120: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys_common/backtrace.rs:154:18
 121: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:529:17
 122: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
 123: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
 124: __rust_try
 125: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
 126: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
      std::thread::Builder::spawn_unchecked_::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:528:30
 127: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ops/function.rs:250:5
 128: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys/unix/thread.rs:108:17
 129: <unknown>
 130: <unknown>

id is "88164640-dfd0-47bc-a5f3-5ea8824718e4", QueryContextShared Drop:    0: <databend_query::sessions::query_ctx_shared::QueryContextShared as core::ops::drop::Drop>::drop
             at src/query/service/src/sessions/query_ctx_shared.rs:446:18
   1: core::ptr::drop_in_place<databend_query::sessions::query_ctx_shared::QueryContextShared>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   2: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   3: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   4: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx_shared::QueryContextShared>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   5: core::ptr::drop_in_place<databend_query::sessions::query_ctx::QueryContext>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   6: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   7: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   8: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx::QueryContext>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   9: databend_query::servers::http::v1::query::http_query::HttpQuery::try_create::{{closure}}::{{closure}}::{{closure}}::{{closure}}
             at src/query/service/src/servers/http/v1/query/http_query.rs:378:13
  10: <minitrace::future::InSpan<T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/minitrace-0.6.2/src/future.rs:125:19
  11: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:27
  12: async_backtrace::frame::Frame::in_scope::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:184:17
  13: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  14: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  15: async_backtrace::frame::active_frame::with
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:81:9
  16: async_backtrace::frame::Frame::in_scope
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:180:13
  17: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:9
  18: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
  19: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
  20: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
  21: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  22: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  23: __rust_try
  24: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  25: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  26: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
  27: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
  28: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
  29: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
  30: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
  31: tokio::runtime::task::LocalNotified<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:416:9
  32: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:576:13
  33: tokio::runtime::coop::with_budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:107:5
      tokio::runtime::coop::budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:73:5
      tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:575:9
  34: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:526:24
  35: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:491:21
  36: tokio::runtime::context::scoped::Scoped<T>::set
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/scoped.rs:40:9
  37: tokio::runtime::context::set_scheduler::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:26
  38: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  39: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  40: tokio::runtime::context::set_scheduler
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:9
  41: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:486:9
  42: tokio::runtime::context::runtime::enter_runtime
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/runtime.rs:65:16
  43: tokio::runtime::scheduler::multi_thread::worker::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:478:5
  44: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:447:45
  45: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/task.rs:42:21
  46: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
  47: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
  48: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
  49: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  50: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  51: __rust_try
  52: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  53: std::panic::catch_unwind
debug2: channel 0: window 989283 sent adjust 59293
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  54: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
  55: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
  56: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
  57: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
  58: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
  59: tokio::runtime::task::UnownedTask<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:453:9
  60: tokio::runtime::blocking::pool::Task::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:159:9
  61: tokio::runtime::blocking::pool::Inner::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:513:17
  62: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:471:13
  63: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys_common/backtrace.rs:154:18
  64: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:529:17
  65: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  66: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  67: __rust_try
  68: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  69: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
      std::thread::Builder::spawn_unchecked_::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:528:30
  70: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ops/function.rs:250:5
  71: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys/unix/thread.rs:108:17
  72: <unknown>
  73: <unknown>

id is "6c803393-08b0-4a2e-94c0-fb42a6e4aaed", QueryContextShared Drop:    0: <databend_query::sessions::query_ctx_shared::QueryContextShared as core::ops::drop::Drop>::drop
             at src/query/service/src/sessions/query_ctx_shared.rs:446:18
   1: core::ptr::drop_in_place<databend_query::sessions::query_ctx_shared::QueryContextShared>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   2: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   3: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   4: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx_shared::QueryContextShared>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   5: core::ptr::drop_in_place<databend_query::sessions::query_ctx::QueryContext>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   6: alloc::sync::Arc<T,A>::drop_slow
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:1752:18
   7: <alloc::sync::Arc<T,A> as core::ops::drop::Drop>::drop
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/sync.rs:2408:13
   8: core::ptr::drop_in_place<alloc::sync::Arc<databend_query::sessions::query_ctx::QueryContext>>
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ptr/mod.rs:498:1
   9: databend_query::servers::http::middleware::HTTPSessionEndpoint<E>::auth::{{closure}}::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:216:5
  10: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:27
  11: async_backtrace::frame::Frame::in_scope::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:184:17
  12: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  13: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  14: async_backtrace::frame::active_frame::with
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:81:9
  15: async_backtrace::frame::Frame::in_scope
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:180:13
  16: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:9
  17: databend_query::servers::http::middleware::HTTPSessionEndpoint<E>::auth::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:175:5
  18: <databend_query::servers::http::middleware::HTTPSessionEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:229:41
  19: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:27
  20: async_backtrace::frame::Frame::in_scope::{{closure}}
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:184:17
  21: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  22: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  23: async_backtrace::frame::active_frame::with
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:81:9
  24: async_backtrace::frame::Frame::in_scope
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/frame.rs:180:13
  25: <async_backtrace::framed::Framed<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/git/checkouts/async-backtrace-dc8b2c67d0719549/e7e1b5f/backtrace/src/framed.rs:49:9
  26: <databend_query::servers::http::middleware::HTTPSessionEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at src/query/service/src/servers/http/middleware.rs:223:5
  27: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  28: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  29: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  30: <alloc::sync::Arc<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:201:33
  31: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  32: <poem::route::router::Route::internal_nest::Nest<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/route/router.rs:273:41
  33: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  34: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  35: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  36: <poem::route::router::Route as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/route/router.rs:351:58
  37: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  38: <poem::middleware::normalize_path::NormalizePathEndpoint<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/middleware/normalize_path.rs:119:30
  39: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  40: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:296:9
  41: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.28/src/future/future/catch_unwind.rs:36:42
  42: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  43: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  44: __rust_try
  45: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  46: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  47: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.28/src/future/future/catch_unwind.rs:36:9
  48: <poem::middleware::catch_panic::CatchPanicEndpoint<E,H> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/middleware/catch_panic.rs:136:69
  49: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  50: <alloc::boxed::Box<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:192:33
  51: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  52: <poem::endpoint::map_to_response::MapToResponse<E> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/map_to_response.rs:21:30
  53: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  54: <alloc::sync::Arc<T> as poem::endpoint::endpoint::Endpoint>::call::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:201:33
  55: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  56: poem::endpoint::endpoint::Endpoint::get_response::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/endpoint/endpoint.rs:50:14
  57: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  58: poem::server::serve_connection::{{closure}}::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:332:26
  59: <hyper::proto::h1::dispatch::Server<S,hyper::body::body::Body> as hyper::proto::h1::dispatch::Dispatch>::poll_msg
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:500:35
  60: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:301:43
  61: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_loop
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:165:21
  62: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:141:16
  63: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_catch
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:120:28
  64: <hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/proto/h1/dispatch.rs:433:9
  65: <hyper::server::conn::ProtoServer<T,B,S,E> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/server/conn.rs:986:47
  66: <hyper::server::conn::upgrades::UpgradeableConnection<I,S,E> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-0.14.27/src/server/conn.rs:1046:30
  67: <&mut F as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:113:9
  68: poem::server::serve_connection::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/macros/select.rs:524:49
  69: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/future/poll_fn.rs:58:9
  70: poem::server::serve_connection::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:359:5
  71: poem::server::Server<L,A>::run_with_graceful_shutdown::{{closure}}::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/macros/select.rs:524:49
  72: <tokio::future::poll_fn::PollFn<F> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/future/poll_fn.rs:58:9
  73: poem::server::Server<L,A>::run_with_graceful_shutdown::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/poem-1.3.57/src/server.rs:170:33
  74: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/future/future.rs:125:9
  75: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
  76: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
  77: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
  78: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
  79: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
  80: __rust_try
  81: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
  82: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
  83: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
  84: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
  85: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
  86: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
  87: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
  88: tokio::runtime::task::LocalNotified<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:416:9
  89: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:576:13
  90: tokio::runtime::coop::with_budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:107:5
      tokio::runtime::coop::budget
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/coop.rs:73:5
      tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:575:9
  91: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:526:24
  92: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:491:21
  93: tokio::runtime::context::scoped::Scoped<T>::set
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/scoped.rs:40:9
  94: tokio::runtime::context::set_scheduler::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:26
  95: std::thread::local::LocalKey<T>::try_with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:270:16
  96: std::thread::local::LocalKey<T>::with
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/local.rs:246:9
  97: tokio::runtime::context::set_scheduler
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context.rs:176:9
  98: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:486:9
  99: tokio::runtime::context::runtime::enter_runtime
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/context/runtime.rs:65:16
 100: tokio::runtime::scheduler::multi_thread::worker::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:478:5
 101: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/scheduler/multi_thread/worker.rs:447:45
 102: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/task.rs:42:21
 103: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:328:17
 104: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/core.rs:317:13
 105: tokio::runtime::task::harness::poll_future::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:485:19
 106: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
 107: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
 108: __rust_try
 109: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
 110: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
 111: tokio::runtime::task::harness::poll_future
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:473:18
 112: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:208:27
 113: tokio::runtime::task::harness::Harness<T,S>::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/harness.rs:153:15
 114: tokio::runtime::task::raw::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:271:5
 115: tokio::runtime::task::raw::RawTask::poll
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/raw.rs:201:18
 116: tokio::runtime::task::UnownedTask<S>::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/task/mod.rs:453:9
 117: tokio::runtime::blocking::pool::Task::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:159:9
 118: tokio::runtime::blocking::pool::Inner::run
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:513:17
 119: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /home/eason/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.35.0/src/runtime/blocking/pool.rs:471:13
 120: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys_common/backtrace.rs:154:18
 121: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:529:17
 122: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/panic/unwind_safe.rs:271:9
 123: std::panicking::try::do_call
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:504:40
 124: __rust_try
 125: std::panicking::try
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panicking.rs:468:19
 126: std::panic::catch_unwind
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/panic.rs:142:14
      std::thread::Builder::spawn_unchecked_::{{closure}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/thread/mod.rs:528:30
 127: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/core/src/ops/function.rs:250:5
 128: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/alloc/src/boxed.rs:2007:9
      std::sys::unix::thread::Thread::new::thread_start
             at /rustc/54b0434cead71e33bb4ddb52acde7767452b276d/library/std/src/sys/unix/thread.rs:108:17
 129: <unknown>
 130: <unknown>




TCeason avatar Dec 28 '23 03:12 TCeason

Now we can confirme:

in bendsql:

start_query will send an auth and in query_page will send an auth.

And now, each auth will generate a uuid in Databend. So, use bendsql execute a query, at least generate 3 uuid.

The first one: https://github.com/datafuselabs/bendsql/blob/7c50f05309616a562bb49759fe3d6be1b4bb5e46/core/src/client.rs#L242

The second one: generated by Databend

The third one: in poll_next, https://github.com/datafuselabs/bendsql/blob/7c50f05309616a562bb49759fe3d6be1b4bb5e46/driver/src/rest_api.rs#L287

TCeason avatar Jan 02 '24 03:01 TCeason

cc @youngsofun @everpcpc

TCeason avatar Jan 02 '24 03:01 TCeason

And now, each auth will generate a uuid in Databend.

That behaviour seems weird.

everpcpc avatar Jan 02 '24 03:01 everpcpc

And now, each auth will generate a uuid in Databend.

That behaviour seems weird.

+1

TCeason avatar Jan 02 '24 03:01 TCeason

Now we can confirme:

in bendsql:

start_query will send an auth and in query_page will send an auth.

And now, each auth will generate a uuid in Databend. So, use bendsql execute a query, at least generate 3 uuid.

The first one: https://github.com/datafuselabs/bendsql/blob/7c50f05309616a562bb49759fe3d6be1b4bb5e46/core/src/client.rs#L242

The second one: generated by Databend

The third one: in poll_next, https://github.com/datafuselabs/bendsql/blob/7c50f05309616a562bb49759fe3d6be1b4bb5e46/driver/src/rest_api.rs#L287

this is expected for now: each HTTP request needs to auth itself in someway. each auth need session & context to get needed infos.

what`s the real problem with the temporary ctx/session?

youngsofun avatar Jan 02 '24 09:01 youngsofun

what`s the real problem with the temporary ctx/session?

  1. tmp ctx need reuse the query id, because auth generate a new id, but in auth, it forget to set_id. So, if use bendsql send a query, last_query_id will get the third auth query id.
  2. tmp session now causes this question: https://github.com/datafuselabs/databend/issues/14204

TCeason avatar Jan 02 '24 13:01 TCeason

For reuse id, we just need add ctx.set_id in auth. https://github.com/datafuselabs/databend/pull/14203/files#diff-1df80469ceda756c5259158923d955dba88fa9fd8be44ad63f4b8908f6fc67f5R207-R208

TCeason avatar Jan 02 '24 13:01 TCeason