Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration is invalid related panic #1311

Open
penberg opened this issue Apr 12, 2024 · 1 comment
Open

Migration is invalid related panic #1311

penberg opened this issue Apr 12, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@penberg
Copy link
Collaborator

penberg commented Apr 12, 2024

We have an user report a database returning HTTP 500. The show the following panic:

[info] 2024-04-12T08:18:57.859415Z ERROR libsql_server::error: HTTP API: 500 Internal Server Error, Anyhow(migration error: migration is invalid: it contains transaction items (BEGIN, COMMIT, SAVEPOINT...) which are not allowed. The migration is already run within a transaction
[info] Caused by:
[info] migration is invalid: it contains transaction items (BEGIN, COMMIT, SAVEPOINT...) which are not allowed. The migration is already run within a transaction
[info] Stack backtrace:
[info] 0: anyhow::error::<impl core::convert::From<E> for anyhow::Error>::from
[info] 1: libsql_server::hrana::batch::catch_batch_error
[info] 2: libsql_server::hrana::batch::execute_batch::{{closure}}
[info] 3: libsql_server::hrana::http::handle_pipeline::{{closure}}
[info] 4: libsql_server::hrana::http::Server::handle_request::{{closure}}
[info] 5: <F as axum::handler::Handler<(M,T1,T2,T3,T4),S,B>>::call::{{closure}}
[info] 6: <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll
[info] 7: <axum::routing::route::RouteFuture<B,E> as core::future::future::Future>::poll
[info] 8: <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll
[info] 9: <axum::routing::route::RouteFuture<B,E> as core::future::future::Future>::poll
[info] 10: <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll
[info] 11: <axum::routing::route::RouteFuture<B,E> as core::future::future::Future>::poll
[info] 12: <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll
[info] 13: <axum::routing::route::RouteFuture<B,E> as core::future::future::Future>::poll
[info] 14: <tower::util::map_response::MapResponseFuture<F,N> as core::future::future::Future>::poll
[info] 15: <axum::routing::route::RouteFuture<B,E> as core::future::future::Future>::poll
[info] 16: <libsql_server::h2c::H2c<S,B> as tower_service::Service<http::request::Request<hyper::body::body::Body>>>::call::{{closure}}
[info] 17: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_inner
[info] 18: <hyper::server::server::new_svc::NewSvcTask<I,N,S,E,W> as core::future::future::Future>::poll
[info] 19: tokio::runtime::task::raw::poll
[info] 20: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
[info] 21: tokio::runtime::scheduler::multi_thread::worker::run
[info] 22: tokio::runtime::task::raw::poll
[info] 23: std::sys_common::backtrace::__rust_begin_short_backtrace
[info] 24: core::ops::function::FnOnce::call_once{{vtable.shim}}
[info] 25: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
[info] at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
[info] 26: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
[info] at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/alloc/src/boxed.rs:2007:9
[info] 27: std::sys::unix::thread::Thread::new::thread_start
[info] at /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/std/src/sys/unix/thread.rs:108:17
[info] 28: start_thread
[info] 29: clone)
[info] 2024-04-12T08:23:25.289637Z ERROR libsql_server::hrana::http: hrana server: migration error: migration is invalid: it contains transaction items (BEGIN, COMMIT, SAVEPOINT...) which are not allowed. The migration is already run within a transaction
@penberg penberg added the bug Something isn't working label Apr 12, 2024
@MarinPostma
Copy link
Collaborator

Not a panic, we need to make hrana categorize this error as a bad request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants