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

Assertion error: start_block == end_block - 1 #43

Open
tarlano opened this issue Aug 3, 2017 · 2 comments
Open

Assertion error: start_block == end_block - 1 #43

tarlano opened this issue Aug 3, 2017 · 2 comments
Assignees
Labels

Comments

@tarlano
Copy link

tarlano commented Aug 3, 2017

I don't know how to reproduce this situation, but my entire infinite volume, on all devices in the network, stopped accepting writes today.

From the error log I found the following assertion error:

[        elle.assert         ] [fuse loop] assertion 'start_block == end_block - 1' failed at /builds/infinit/memo/src/infinit/filesystem/FileHandle.cc:385
[        elle.assert         ] [fuse loop]   #0  0x000000007fffffff: elle::AssertError::AssertError(char const*, char const*, unsigned long) +0x571
                                             #1  0x000000007fffffff: elle::_abort(std::string const&, char const*, int) +0xa7
                                             #2  0x000000007fffffff: infinit::filesystem::FileBuffer::_write_multi_multi(infinit::filesystem::FileHandle*, elle::ConstWeakBuffer, long, int, int) +0x125
                                             #3  0x000000007fffffff: infinit::filesystem::FileBuffer::write(infinit::filesystem::FileHandle*, elle::ConstWeakBuffer, unsigned long, long) +0x29f
                                             #4  0x000000007fffffff: infinit::filesystem::FileHandle::write(elle::ConstWeakBuffer, unsigned long, long) +0x2c
                                             #5  0x000000007fffffff: ???
                                             #6  0x000000007fffffff: fuse_fs_write_buf +0x230
                                             #7  0x000000007fffffff: ???
                                             #8  0x000000007fffffff: ???
                                             #9  0x000000007fffffff: ???
                                             #10 0x000000007fffffff: __fuse_process_cmd +0x17
                                             #11 0x000000007fffffff: elle::reactor::FuseContext::_loop_single() +0x1c3
                                             #12 0x000000007fffffff: elle::reactor::Thread::_action_wrapper(std::function<void ()> const&) +0x249
                                             #13 0x000000007fffffff: ???
                                             #14 0x000000007fffffff: make_fcontext +0x21
terminate called after throwing an instance of 'elle::AssertError'
  what():  assertion 'start_block == end_block - 1' failed at /builds/infinit/memo/src/infinit/filesystem/FileHandle.cc:385

The version is
$ infinit --version
0.8.0

Thanks,
Tony

@tarlano
Copy link
Author

tarlano commented Aug 5, 2017

I had the volume block_size set to a small 1KB. After increasing it back to the default 1.04MB I am seeing better performance and possibly it will alleviate the block overrun in the memo FileHandler method.

To reproduce this issue you maybe able to set the block_size to small 1K (1024) and write several large files.

@Dimrok
Copy link

Dimrok commented Aug 8, 2017

Hi @tarlano.

It's a known issue, you shouldn't use a block size smaller than 64KB (source @mnottale) for now (I'll add that to the documentation).
You can't write blobs of data larger than twice the block size (source @mnottale).

By experimenting, I found that, with my fuse configuration:

  • I wasn't able to reproduce with block_size bigger than 2KB.
  • The limit of data you can write with a block size of 1024 is 3024.

Here's a minimal test case to reproduce.

set -x

rm -rf .local

export MOUNTPOINT="$PWD/mountpoint"
export BLOCK_SIZE=2

infinit user create
infinit silo create filesystem silo
infinit network create --silo silo network
infinit volume create --network network --block-size $BLOCK_SIZE volume
infinit volume mount --name volume --mountpoint "$MOUNTPOINT" --cache --allow-root-creation &

sleep 1

DATA_SIZE=$(expr $BLOCK_SIZE \* 2)
echo $(printf '=%.0s' $(eval echo "{1..$DATA_SIZE}"))  >> "$MOUNTPOINT/data"

@Dimrok Dimrok self-assigned this Aug 25, 2017
@Dimrok Dimrok added the Bug label Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants