-1

Whenever a user tries to create a chatroom either thru a client or ejabberctl the module crashes:

** State machine <0.505.0> terminating
** Last event in was {route,<<"tom">>,{presence,<<"g245b-188">>,available,<<"en">>,{jid,<<"tom">>,<<"pccim">>,<<"Spark">>,<<"tom">>,<<"pccim">>,<<"Spark">>},{jid,<<"tom_q1r">>,<<"confere
** When State == normal_state
**      Data  == {state,<<"tom_q1r">>,<<"conference.pccim">>,<<"pccim">>,{[{allow,[all]}],muc_create,[{allow,[{acl,admin}]}],muc_create},{jid,<<"tom_q1r">>,<<"conference.pccim">>,<<>>,<<
** Reason for termination =
** {undef,[{maps,update_with,[<<"tom">>,#Fun<mod_muc_room.21.9948724>,[{<<"tom">>,<<"pccim">>,<<"Spark">>}],#{}],[]},{mod_muc_room,update_online_user,3,[{file,"src/mod_muc_room.erl"},{li
2019-01-25 16:14:22 =CRASH REPORT====
  crasher:
    initial call: gen:init_it/6
    pid: <0.505.0>
    registered_name: []
    exception exit: {{undef,[{maps,update_with,[<<"tom">>,#Fun<mod_muc_room.21.9948724>,[{<<"tom">>,<<"pccim">>,<<"Spark">>}],#{}],[]},{mod_muc_room,update_online_user,3,[{file,"src/mod_
    ancestors: [mod_muc_pccim,ejabberd_gen_mod_sup,ejabberd_sup,<0.38.0>]
    messages: []
    links: []
    dictionary: [{'$internal_queue_len',0}]
    trap_exit: true
    status: running
    heap_size: 2586
    stack_size: 27
    reductions: 1648
  neighbours:

I have no idea what is wrong and it's the GA version. The only odd thing I did was munge the v15 RPM spec to make an RPM out of it.

Badlop
  • 3,840
  • 1
  • 8
  • 9

1 Answers1

0

Those lines are relevant:

** Reason for termination =
** {undef,[{maps,update_with,[<<"tom">>,#Fun<mod_muc_room.21.9948724>,[{<<"tom">>,<<"pccim">>,<<"Spark">>}],#{}],[]},

It appears that erlang can't call the function maps:update_with/4, which is required since 18.12 (https://github.com/processone/ejabberd/commit/43498b39c18dcc90c94ed2ce32acdfe6e7381e87).

Maybe you are using an old erlang version, or that erlang library is missing. Try this:

$ erl
Erlang/OTP 20 [erts-9.3.3.3] [source] [64-bit] [smp:2:2] [ds:2:2:10] [async-threads:10] [kernel-poll:false]

Eshell V9.3.3.3  (abort with ^G)
1> maps:module_info().
[{module,maps},
 {exports,[{update_with,3},
           {update_with,4},
...
2> q().

This example in my system shows that I have the maps library installed, and it has support for update_with with 4 arguments. Try this in your system, and let's see what you get.

Badlop
  • 3,840
  • 1
  • 8
  • 9
  • I used the esl-erlang all in one package v18 . I don't see a update_with module at all unfortunately: `1> maps:module_info(). [{module,maps}, {exports,[{get,3}, {filter,2}, {fold,3}, {map,2}, {size,1}, {without,2}, {with,2}, {module_info,0}, {module_info,1}, {values,1}, {update,3}, {remove,2}, {put,3}, {new,0}, {merge,2}, {keys,1}, ` – Tom Astle Jan 28 '19 at 14:52
  • Those functions were added to the maps module in Erlang/OTP 19.0. You need Erlang/OTP 19 or newer, as mentioned in the ejabberd documentation. https://github.com/erlang/otp/commit/8d5bc31684f8b6969b5bfde70e25b153d4018f61 – Badlop Jan 30 '19 at 10:19