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

cobalt serve: No space left on device (inotify) #387

Closed
ReinierMaas opened this issue Mar 1, 2018 · 6 comments
Closed

cobalt serve: No space left on device (inotify) #387

ReinierMaas opened this issue Mar 1, 2018 · 6 comments
Labels
bug Not as expected

Comments

@ReinierMaas
Copy link

Installed with cargo:

$ cargo install cobalt-bin

Check version:

$ cobalt --version
Cobalt 0.11.1

Init a new repo:

$ cobalt init

Try to serve:

$ RUST_BACKTRACE=1 cobalt serve
[warn]   Syntax theme named 'base16-ocean.dark' ignored. Reason: Themes are unsupported in this build.
[info]   Building from "/home/{username}/Documents/git/kim/" into "/home/{username}/Documents/git/kim/_site"
[info]   Serving "/home/{username}/Documents/git/kim/_site" through static file server
[info]   Server Listening on 127.0.0.1:3000
[info]   Ctrl-c to stop the server
Error: serve command failed
Caused by: Notify error
Caused by: other os error
Caused by: No space left on device (os error 28)
stack backtrace:
   0:     0x55cbd85b639c - backtrace::backtrace::trace::h70189b7bdcf38a84
   1:     0x55cbd85b5a42 - backtrace::capture::Backtrace::new::h28accdc2455b6607
   2:     0x55cbd84fd579 - error_chain::make_backtrace::h5aaf102b17bd8b17
   3:     0x55cbd82b8db6 - <core::result::Result<T, E> as cobalt::error::ResultExt<T>>::chain_err::h19d5cb09d14ef776
   4:     0x55cbd82eb36e - cobalt::serve::serve_command::h02b04a07eb468d9b
   5:     0x55cbd82b4b84 - cobalt::main::ha9e8b6f578046cf7
   6:     0x55cbd82ae022 - std::rt::lang_start::{{closure}}::hc1f48c5420dd2e1d
   7:     0x55cbd85c5867 - std::rt::lang_start_internal::{{closure}}::h04f27adf334bb135
                        at /checkout/src/libstd/rt.rs:59
                         - std::panicking::try::do_call::h0b062116b4efed59
                        at /checkout/src/libstd/panicking.rs:480
   8:     0x55cbd85ed97e - __rust_maybe_catch_panic
                        at /checkout/src/libpanic_unwind/lib.rs:101
   9:     0x55cbd85cdb59 - std::panicking::try::hf432286c16355f4a
                        at /checkout/src/libstd/panicking.rs:459
                         - std::panic::catch_unwind::h55bfca99277eb60c
                        at /checkout/src/libstd/panic.rs:365
                         - std::rt::lang_start_internal::h6bcde385b3ee3341
                        at /checkout/src/libstd/rt.rs:58
  10:     0x55cbd82b6323 - main
  11:     0x7f113aa9b1c0 - __libc_start_main
  12:     0x55cbd82973d9 - _start
  13:                0x0 - <unknown>

I have about ~50GB of free space on the disk that was used.

@epage
Copy link
Member

epage commented Mar 1, 2018

What version of Rust are you using? What OS and version is this?

That seems strange that this error is coming up from the file system notifications.
https://github.com/cobalt-org/cobalt.rs/blob/master/src/bin/cobalt/serve.rs#L171

Why would that care about disk space?

What happens when do you call cobalt build instead?

@ReinierMaas
Copy link
Author

ReinierMaas commented Mar 1, 2018 via email

@Geobert
Copy link
Contributor

Geobert commented Mar 2, 2018

Rust 1.24.1 just came out to fix many regression, can you see if it's still happening?

@ReinierMaas
Copy link
Author

ReinierMaas commented Mar 2, 2018

Yes I have tried this but it didn't fix the problem

@epage When I build the page it gets build. So it is the serving part that crashes

$ cobalt build
[warn]   Syntax theme named 'base16-ocean.dark' ignored. Reason: Themes are unsupported in this build.
[info]   Building from "/home/{username}/Documents/git/kim/" into "/home/{username}/Documents/git/kim/_site"
[info]   Build successful

The built-in --trace statement. This is the tail of calling cobalt --trace serve:

[info]   Serving "/home/reinier/Documents/git/kim/_site" through static file server
[info]   Server Listening on 127.0.0.1:3000
[info]   Ctrl-c to stop the server
[debug]  threads = 10
[trace]  registering with poller
[trace]  registering with poller
[trace]  event loop tick
[trace]  tick_to; now=0; tick=0
[trace]  ticking; curr=Token(18446744073709551615)
[trace]  event loop tick
Error: serve command failed
Caused by: Notify error
Caused by: other os error
Caused by: No space left on device (os error 28)
[trace]  tick_to; now=0; tick=1

@epage epage changed the title Error when using cobalt. No space left on device (os error 28) cobalt serve: No space left on device (inotify) Mar 3, 2018
@epage epage added the bug Not as expected label Mar 3, 2018
@epage
Copy link
Member

epage commented Mar 3, 2018

Ok, good, there aren't problems with build. So the problem is only in serve where we watch for file system changes and auto-rebuild.

So a workaround for this is to call cobalt serve --no-watch. You'll then need to kill and restart that every time you want to view the latest version of your site.

Looks like this is a terrible way of saying you've reached a limit in inotify and might need to raise it. See notify-rs/notify#103

We should probably add this to the website as a FAQ item.

@epage
Copy link
Member

epage commented Mar 10, 2018

Created an issue for documenting this on the website. Closing this in favor of that issue.

@epage epage closed this as completed Mar 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Not as expected
Projects
None yet
Development

No branches or pull requests

3 participants