basho / cuttlefish

never lose your childlike sense of wonder baby cuttlefish, promise me?
Apache License 2.0
205 stars 124 forks source link

crash on riak cs advanced.conf [JIRA: RIAK-2216] #203

Closed binarytemple closed 7 years ago

binarytemple commented 9 years ago

Created in Riak CS issue tracker but cross posting here in case it is more relevant to the cuttlefish team.

Basically, cuttlefish (or more specifically riak config effective) crashes when parsing the following configuration:

[{riak_kv, [
    {add_paths, ["/basho/riak_cs/dev/dev1/lib/riak_cs-2.0.1/ebin"]},
    {storage_backend, riak_cs_kv_multi_backend},
    {multi_backend_prefix_list, [{<<"0b:">>, be_blocks}]},
    {multi_backend_default, be_default},
    {multi_backend, [
        {be_default, riak_kv_eleveldb_backend, [
            {total_leveldb_mem_percent, 30},
            {data_root, "/basho/riak/dev/dev1/data/leveldb"}
        ]},
        {be_blocks, riak_kv_bitcask_backend, [
            {data_root, "/basho/riak/dev/dev1/data/bitcask"}
        ]}
    ]}
]}].

The stack trace is:

escript: exception error: bad argument
in function atom_to_list/1
called as atom_to_list(<<"0b:">>)
in call from cuttlefish_effective:'-proplist_to_kvcpaths/2-fun-0-'/4 (src/cuttlefish_effective.erl, line 124)
in call from lists:foldl/3 (lists.erl, line 1248)
in call from cuttlefish_effective:'-proplist_to_kvcpaths/2-fun-0-'/4 (src/cuttlefish_effective.erl, line 125)
in call from lists:foldl/3 (lists.erl, line 1248)
in call from cuttlefish_effective:'-proplist_to_kvcpaths/2-fun-0-'/4 (src/cuttlefish_effective.erl, line 125)
in call from lists:foldl/3 (lists.erl, line 1248)
in call from cuttlefish_effective:process_advanced/2 (src/cuttlefish_effective.erl, line 97)
binarytemple commented 8 years ago

Closed in riak_cs repo - guess the expectation is to work it here.

pyrrho commented 8 years ago

Another instance of this failure has been found when using a vm_args section an advanced.config.

The configuration in use is,

[
 {riak_core,
  [
     . . .
  ]},
  . . .
  {vm_args,
   [
    {"+sbt","nnt"}
  ]}
]

And results in,

escript: exception error: bad argument 
in function atom_to_list/1 
called as atom_to_list("+sbt") 
in call from cuttlefish_effective:'-proplist_to_kvcpaths/2-fun-0-'/4 (src/cuttlefish_effective.erl, line 124) 
in call from lists:foldl/3 (lists.erl, line 1248) 
in call from cuttlefish_effective:'-proplist_to_kvcpaths/2-fun-0-'/4 (src/cuttlefish_effective.erl, line 125) 
in call from lists:foldl/3 (lists.erl, line 1248) 
in call from cuttlefish_effective:process_advanced/2 (src/cuttlefish_effective.erl, line 97) 
in call from cuttlefish_effective:build/3 (src/cuttlefish_effective.erl, line 39) 
in call from cuttlefish_escript:effective/1 (src/cuttlefish_escript.erl, line 124)
angrycub commented 7 years ago

Fixed by https://github.com/basho/cuttlefish/pull/231