When I run RethinkDB on a ReiserFS file system that is mounted with the "data=journaled" option, I get the following error (debug executable):
info: Creating directory rethinkdb_data
info: Creating a default database for your convenience. (This is because you ran 'rethinkdb' without 'create', 'serve', or '--join', and the directory 'rethinkdb_data' did not already exist.)
error: This doesn't appear to be a RethinkDB data file.
Crashing while already crashed. Printing error message to stderr.
Segmentation fault from reading the address (nil).Trace/breakpoint trap (core dumped)
Weirdly enough, the file seems to open fine with O_DIRECT, but then something goes wrong later. On another ReiserFS partition where data journaling is not enabled, RethinkDB works fine.
The directory rethinkdb_data is actually created, and contains the file log_file of 408 bytes and metadata of 524,288 bytes (in contrast to 2,097,152 bytes that get written on a working partition).
If I start RethinkDB afterwards, using the broken rethinkdb_data, this is what happens:
info: Loading data from directory rethinkdb_data
error: Error in serializer/log/log_serializer.cc at line 361:
error: Assertion failed: [ls_token]
error: Backtrace:
error: Sat Nov 10 22:03:31 2012
1: lazy_backtrace_t::lazy_backtrace_t() at backtrace.cc:251
2: format_backtrace(bool) at backtrace.cc:198
3: report_fatal_error(char const*, int, char const*, ...) at errors.cc:65
4: log_serializer_t::block_read(intrusive_ptr_t<ls_block_token_pointee_t> const&, void*, linux_file_account_t*, linux_iocallback_t*) at log_serializer.cc:361
5: log_serializer_t::block_read(intrusive_ptr_t<ls_block_token_pointee_t> const&, void*, linux_file_account_t*) at log_serializer.cc:337
6: patch_disk_storage_t::patch_disk_storage_t(mc_cache_t*, unsigned int) at patch_disk_storage.cc:50
7: mc_cache_t::mc_cache_t(serializer_t*, mirrored_cache_config_t*, perfmon_collection_t*) at mirrored.cc:1330
8: scc_cache_t<mc_cache_t>::scc_cache_t(serializer_t*, mirrored_cache_config_t*, perfmon_collection_t*) at semantic_checking.tcc:194
9: metadata_persistence::persistent_file_t::construct_serializer_and_cache(io_backender_t*, bool, std::string const&, perfmon_collection_t*) at persist.cc:249
10: metadata_persistence::persistent_file_t::persistent_file_t(io_backender_t*, std::string const&, perfmon_collection_t*) at persist.cc:69
11: run_rethinkdb_porcelain(extproc::spawner_t::info_t*, std::string const&, name_string_t const&, std::vector<host_and_port_t, std::allocator<host_and_port_t> > const&, service_ports_t, linux_io_backend_t, bool*, std::string, bool) at command_line.cc:239
12: void boost::_bi::list9<boost::_bi::value<extproc::spawner_t::info_t*>, boost::_bi::value<std::string>, boost::_bi::value<name_string_t>, boost::_bi::value<std::vector<host_and_port_t, std::allocator<host_and_port_t> > >, boost::_bi::value<service_ports_t>, boost::_bi::value<linux_io_backend_t>, boost::_bi::value<bool*>, boost::_bi::value<std::string>, boost::_bi::value<bool> >::operator()<void (*)(extproc::spawner_t::info_t*, std::string const&, name_string_t const&, std::vector<host_and_port_t, std::allocator<host_and_port_t> > const&, service_ports_t, linux_io_backend_t, bool*, std::string, bool), boost::_bi::list0>(boost::_bi::type<void>, void (*&)(extproc::spawner_t::info_t*, std::string const&, name_string_t const&, std::vector<host_and_port_t, std::allocator<host_and_port_t> > const&, service_ports_t, linux_io_backend_t, bool*, std::string, bool), boost::_bi::list0&, int) at bind.hpp:820
13: boost::_bi::bind_t<void, void (*)(extproc::spawner_t::info_t*, std::string const&, name_string_t const&, std::vector<host_and_port_t, std::allocator<host_and_port_t> > const&, service_ports_t, linux_io_backend_t, bool*, std::string, bool), boost::_bi::list9<boost::_bi::value<extproc::spawner_t::info_t*>, boost::_bi::value<std::string>, boost::_bi::value<name_string_t>, boost::_bi::value<std::vector<host_and_port_t, std::allocator<host_and_port_t> > >, boost::_bi::value<service_ports_t>, boost::_bi::value<linux_io_backend_t>, boost::_bi::value<bool*>, boost::_bi::value<std::string>, boost::_bi::value<bool> > >::operator()() at bind_template.hpp:21
14: boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, void (*)(extproc::spawner_t::info_t*, std::string const&, name_string_t const&, std::vector<host_and_port_t, std::allocator<host_and_port_t> > const&, service_ports_t, linux_io_backend_t, bool*, std::string, bool), boost::_bi::list9<boost::_bi::value<extproc::spawner_t::info_t*>, boost::_bi::value<std::string>, boost::_bi::value<name_string_t>, boost::_bi::value<std::vector<host_and_port_t, std::allocator<host_and_port_t> > >, boost::_bi::value<service_ports_t>, boost::_bi::value<linux_io_backend_t>, boost::_bi::value<bool*>, boost::_bi::value<std::string>, boost::_bi::value<bool> > >, void>::invoke(boost::detail::function::function_buffer&) at function_template.hpp:154
15: boost::function0<void>::operator()() const at function_template.hpp:1014
16: starter_t::run_wrapper(boost::function<void ()()> const&) at runtime.cc:54
17: boost::_mfi::mf1<void, starter_t, boost::function<void ()()> const&>::operator()(starter_t*, boost::function<void ()()> const&) const at mem_fn_template.hpp:163
18: void boost::_bi::list2<boost::_bi::value<starter_t*>, boost::_bi::value<boost::function<void ()()> > >::operator()<boost::_mfi::mf1<void, starter_t, boost::function<void ()()> const&>, boost::_bi::list0>(boost::_bi::type<void>, boost::_mfi::mf1<void, starter_t, boost::function<void ()()> const&>&, boost::_bi::list0&, int) at bind.hpp:307
19: boost::_bi::bind_t<void, boost::_mfi::mf1<void, starter_t, boost::function<void ()()> const&>, boost::_bi::list2<boost::_bi::value<starter_t*>, boost::_bi::value<boost::function<void ()()> > > >::operator()() at bind_template.hpp:21
20: boost::detail::function::void_function_obj_invoker0<boost::_bi::bind_t<void, boost::_mfi::mf1<void, starter_t, boost::function<void ()()> const&>, boost::_bi::list2<boost::_bi::value<starter_t*>, boost::_bi::value<boost::function<void ()()> > > >, void>::invoke(boost::detail::function::function_buffer&) at function_template.hpp:154
21: boost::function0<void>::operator()() const at function_template.hpp:1014
22: callable_action_instance_t<boost::function<void ()()> >::run_action() at runtime_utils.hpp:57
23: callable_action_wrapper_t::run() at runtime_utils.cc:58
24: coro_t::run() at coroutines.cc:178
error: Exiting.
Crashing while already crashed. Printing error message to stderr.
Segmentation fault from reading the address (nil).Trace/breakpoint trap (core dumped)
If I copy the created rethinkdb_data to a different partition without this option, it remains unusable (suggesting that something went wrong during writing, not reading).
This is on Ubuntu 10.04 with the stock kernel: Linux starearth 2.6.32-42-generic #96-Ubuntu SMP Wed Aug 15 19:37:37 UTC 2012 x86_64 GNU/Linux
I suggest that RethinkDB explicitly checks for ReiserFS file systems with data=journaled on startup, and if it detects this setup, emits a warning that it might not operate properly.
(not sure what would happen if I did a remount into journaled mode while RethinkDB is running, but that case seems sufficiently edge-ish to not care about)
Or, as this configuration might be rather rare, add a note about this constellation to the release notes and/or readme for the time being.