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

Multi-byte character truncation bug in mongo introspection connector #13351

Closed
tomhoule opened this issue May 13, 2022 · 1 comment · Fixed by prisma/prisma-engines#2955
Closed
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/bug A reported bug. topic: error reporting Issues created via Prisma's CLI Crash Reporting topic: mongodb topic: prisma db pull CLI: prisma db pull
Milestone

Comments

@tomhoule
Copy link
Contributor

Command: prisma db pull
Version: 3.14.0
Binary Version: 2b0c12756921c891fec4f68d9444e18c7d5d4a6a
Report: https://prisma-errors.netlify.app/report/13806
OS: arm64 darwin 21.4.0

JS Stacktrace:

Error: [/rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c/library/core/src/str/mod.rs:653:13] byte index 36 is not a char boundary; it is inside 'с' (bytes 35..37) of `TradeInValuationRequestSequelize.b2сMi`
    at ChildProcess.<anonymous> (/<...>/node_modules/prisma/build/index.js:51905:30)
    at ChildProcess.emit (node:events:520:28)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)

Rust Stacktrace:

   0: backtrace::backtrace::trace
   1: backtrace::capture::Backtrace::new
   2: user_facing_errors::Error::new_in_panic_hook
   3: user_facing_errors::panic_hook::set_panic_hook::{{closure}}
   4: std::panicking::rust_panic_with_hook
   5: std::panicking::begin_panic_handler::{{closure}}
   6: std::sys_common::backtrace::__rust_end_short_backtrace
   7: _rust_begin_unwind
   8: core::panicking::panic_fmt
   9: core::str::slice_error_fail
  10: convert_case::words::Words::split_camel
  11: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
  12: <core::iter::adapters::filter::Filter<I,P> as core::iter::traits::iterator::Iterator>::next
  13: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  14: <alloc::string::String as convert_case::Casing>::to_case
  15: mongodb_introspection_connector::sampler::statistics::Statistics::composite_type_name
  16: mongodb_introspection_connector::sampler::statistics::Statistics::track_document_types
  17: mongodb_introspection_connector::sampler::statistics::Statistics::track_document_types
  18: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  19: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
  20: <futures_util::future::either::Either<A,B> as core::future::future::Future>::poll
  21: <futures_util::future::future::Then<Fut1,Fut2,F> as core::future::future::Future>::poll
  22: tokio::runtime::task::harness::poll_future
  23: tokio::runtime::task::raw::poll
  24: std::thread::local::LocalKey<T>::with
  25: tokio::runtime::thread_pool::worker::Context::run_task
  26: tokio::runtime::thread_pool::worker::Context::run
  27: tokio::macros::scoped_tls::ScopedKey<T>::set
  28: tokio::runtime::thread_pool::worker::run
  29: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
  30: tokio::runtime::task::harness::Harness<T,S>::poll
  31: tokio::runtime::blocking::pool::Inner::run
  32: std::sys_common::backtrace::__rust_begin_short_backtrace
  33: core::ops::function::FnOnce::call_once{{vtable.shim}}
  34: std::sys::unix::thread::Thread::new::thread_start
  35: __pthread_deallocate

@tomhoule tomhoule added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: error reporting Issues created via Prisma's CLI Crash Reporting domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. topic: mongodb labels May 13, 2022
@janpio
Copy link
Contributor

janpio commented May 13, 2022

Existing manual issue where I asked for more info: #13294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. domain/schema Issue in the "Schema" domain: Prisma Schema, Introspection, Migrations etc. kind/bug A reported bug. topic: error reporting Issues created via Prisma's CLI Crash Reporting topic: mongodb topic: prisma db pull CLI: prisma db pull
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants