-1

I tried compiling a rust project in windows, Rust gives a false error "disk has no space". Please let me know how do I overcome this.

I notice this: I don not have a D: drive in my laptop, but this path shows d: Where is it coming from?

invoke_main
at **d:\agent_work**\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
49: __scrt_common_main_seh
at d:\agent_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288

Rust version:

Default host: x86_64-pc-windows-msvc
rustup home:  C:\apps\rust

stable-x86_64-pc-windows-msvc (default)
rustc 1.44.1 (c7087fe00 2020-06-17)
c:\apps\meilisearch\MeiliSearch>cargo run --release
    Finished release [optimized + debuginfo] target(s) in 2.13s
     Running `target\release\meilisearch.exe`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Heed(Io(Os { code: 112, kind: Other, message: "**There is not enough space on the dis**k." }))', meilisearch-http\src\data.rs:69:27
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Panic in Arbiter thread.
error: process didn't exit successfully: `target\release\meilisearch.exe` (exit code: 101)

c:\apps\meilisearch\MeiliSearch>set RUST_BACKTRACE=1

c:\apps\meilisearch\MeiliSearch>cargo run --release
    Finished release [optimized + debuginfo] target(s) in 1.21s
     Running `target\release\meilisearch.exe`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Heed(Io(Os { code: 112, kind: Other, message: "There is not enough space on the disk." }))', meilisearch-http\src\data.rs:69:27
stack backtrace:
   0: backtrace::backtrace::trace_unsynchronized
             at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.46\src\backtrace\mod.rs:66
   1: std::sys_common::backtrace::_print_fmt
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\sys_common\backtrace.rs:78
   2: std::sys_common::backtrace::_print::{{impl}}::fmt
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\sys_common\backtrace.rs:59
   3: core::fmt::write
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libcore\fmt\mod.rs:1069
   4: std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\io\mod.rs:1504
   5: std::sys_common::backtrace::_print
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\sys_common\backtrace.rs:62
   6: std::sys_common::backtrace::print
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\sys_common\backtrace.rs:49
   7: std::panicking::default_hook::{{closure}}
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\panicking.rs:198
   8: std::panicking::default_hook
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\panicking.rs:218
   9: std::panicking::rust_panic_with_hook
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\panicking.rs:511
  10: std::panicking::begin_panic_handler
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\panicking.rs:419
  11: core::panicking::panic_fmt
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libcore\panicking.rs:111
  12: core::option::expect_none_failed
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libcore\option.rs:1268
  13: core::result::Result<meilisearch_core::database::Database, meilisearch_core::error::Error>::unwrap
             at C:\apps\rust\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libcore\result.rs:1005
  14: meilisearch_http::data::Data::new
             at .\meilisearch-http\src\data.rs:69
  15: meilisearch::main::{{closure}}
             at .\meilisearch-http\src\main.rs:54
  16: core::future::from_generator::{{impl}}::poll<generator-0>
             at C:\apps\rust\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libcore\future\mod.rs:66
  17: tokio::task::local::{{impl}}::poll::{{closure}}::{{closure}}
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\task\local.rs:526
  18: tokio::coop::with_budget::{{closure}}
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\coop.rs:127
  19: std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget>>::try_with
             at C:\apps\rust\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libstd\thread\local.rs:263
  20: std::thread::local::LocalKey<core::cell::Cell<tokio::coop::Budget>>::with
             at C:\apps\rust\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libstd\thread\local.rs:239
  21: tokio::coop::with_budget
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\coop.rs:120
  22: tokio::coop::budget
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\coop.rs:96
  23: tokio::task::local::{{impl}}::poll::{{closure}}
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\task\local.rs:526
  24: tokio::macros::scoped_tls::ScopedKey<tokio::task::local::Context>::set<tokio::task::local::Context,closure-0,core::task::poll::Poll<core::result::Result<(), main_error::MainError>>>
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\macros\scoped_tls.rs:63
  25: tokio::task::local::LocalSet::with
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\task\local.rs:440
  26: tokio::task::local::{{impl}}::poll
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\task\local.rs:516
  27: tokio::task::local::{{impl}}::run_until::{{closure}}
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\task\local.rs:390
  28: core::future::from_generator::{{impl}}::poll<generator-0>
             at C:\apps\rust\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libcore\future\mod.rs:66
  29: tokio::runtime::basic_scheduler::enter::{{closure}}
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\runtime\basic_scheduler.rs:213
  30: tokio::macros::scoped_tls::ScopedKey<tokio::runtime::basic_scheduler::Context>::set<tokio::runtime::basic_scheduler::Context,closure-0,core::result::Result<(), main_error::MainError>>
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\macros\scoped_tls.rs:63
  31: tokio::runtime::basic_scheduler::enter
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\runtime\basic_scheduler.rs:213
  32: tokio::runtime::basic_scheduler::BasicScheduler<tokio::park::either::Either<tokio::time::driver::Driver<tokio::park::either::Either<tokio::io::driver::Driver, tokio::park::thread::ParkThread>>, tokio::park::either::Either<tokio::io::driver::Driver, tokio:
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\runtime\basic_scheduler.rs:123
  33: tokio::runtime::{{impl}}::block_on::{{closure}}
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\runtime\mod.rs:444
  34: tokio::runtime::context::enter<closure-0,core::result::Result<(), main_error::MainError>>
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\runtime\context.rs:72
  35: tokio::runtime::handle::Handle::enter<closure-0,core::result::Result<(), main_error::MainError>>
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\runtime\handle.rs:76
  36: tokio::runtime::Runtime::block_on
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\runtime\mod.rs:441
  37: tokio::task::local::LocalSet::block_on
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\tokio-0.2.21\src\task\local.rs:351
  38: actix_rt::runtime::Runtime::block_on
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\actix-rt-1.1.1\src\runtime.rs:89
  39: actix_rt::builder::SystemRunner::block_on
             at C:\apps\rust_cargo\registry\src\github.com-1ecc6299db9ec823\actix-rt-1.1.1\src\builder.rs:187
  40: meilisearch::main
             at .\meilisearch-http\src\main.rs:16
  41: std::rt::lang_start::{{closure}}<core::result::Result<(), main_error::MainError>>
             at C:\apps\rust\toolchains\stable-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libstd\rt.rs:67
  42: std::rt::lang_start_internal::{{closure}}
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\rt.rs:52
  43: std::panicking::try::do_call
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\panicking.rs:331
  44: std::panicking::try
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\panicking.rs:274
  45: std::panic::catch_unwind
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\panic.rs:394
  46: std::rt::lang_start_internal
             at /rustc/c7087fe00d2ba919df1d813c040a5d47e43b0fe7\/src\libstd\rt.rs:51
  47: main
  48: invoke_main
             at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  49: __scrt_common_main_seh
             at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  50: BaseThreadInitThunk
  51: RtlUserThreadStart
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Panic in Arbiter thread.
error: process didn't exit successfully: `target\release\meilisearch.exe` (exit code: 101)

c:\apps\meilisearch\MeiliSearch>
Espresso
  • 5,378
  • 4
  • 35
  • 66
  • The message ` d:\agent_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl` refers to Visual Studio runtime library, and it may come from debug information of a module that is not compiled on your computer. Some Rust binaries, presumably – Alex Guteniev Jul 12 '20 at 18:29

1 Answers1

2

TLDR:

  • The paths containing d: are relevant to the machine that the Microsoft C runtime library was compiled on, not your machine. They are not relevant to the error you experience.

  • The error you are getting is because the program is trying to create a 200GB database in the same volume as the directory you are running it from, and there is insufficient space.


The error you are seeing comes from running the program, not from compiling it. That is evident from this line in the output:

 Running `target\release\meilisearch.exe`

The location of the error is pinpointed by this line:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Heed(Io(Os { code: 112, kind: Other, message: "There is not enough space on the disk." }))', meilisearch-http\src\data.rs:69:27

Specifically: meilisearch-http\src\data.rs:69:27.

A bit of google detective work leads me to Meilisearch where I found the offending line:

let db = Arc::new(Database::open_or_create(opt.db_path, db_opt).unwrap());

The unwrap function call is triggering the panic. This is occurring because the function open_or_create is returning the error that you ultimately see.

A little bit more searching leads me to the user manual of this project where it describes the options, specifically the Database Path option, which has a default of ./data.

On that same page, I saw two entries for maximum database size (Max UDB Size and Max MDB size). They include the note:

On Windows it is a fixed size that will be allocated on launch. Because this allocates 100Gb on MeiliSearch launch, a Windows user can use this option to decrease the size of the database.

There seem to be two such databases, 100GB each, which is allocated at launch. It seems the suggestion is that you should set these to lower values if you do not want 200GB to be allocated from the get go.

So: the error is saying that there is insufficient space on the volume containing ./data (relative to the directory you are running the program) to allocate a 200GB database.

But where is this 'd:' coming from? Well, when you run the program with the environment variable RUST_BACKTRACE set, it displays a stack trace for the error. The stack trace shows you each of the function calls that led up to the crash, including some that are part of the C runtime library (ie. not even part of rust). These in particular:

48: invoke_main
         at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
49: __scrt_common_main_seh
         at d:\agent\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288

are part of the Microsoft C runtime library.

The backtrace includes file and line number information for the functions that were part of the stack trace. But this information is inserted into the library at the time it was compiled, presumably on some Microsoft build server.

The path given is relevant to the machine that the C runtime library was compiled on, not your machine.

harmic
  • 28,606
  • 5
  • 67
  • 91