Crash on Tzdata.App.start
Description
Mobilizon crashes on Tzdata.App.start
Steps to Reproduce
- have a running 3.0.4 instance
- Update/Start mobilizon with
/usr/bin/env docker create \
--rm \
--name=mash-mobilizon \
--log-driver=none \
--user=998:1000 \
--cap-drop=ALL \
--read-only \
--network=mash-mobilizon \
--hostname=events.exaple.org \
--env-file=/mash/mobilizon/env \
--label-file=/mash/mobilizon/labels \
--health-interval=5s \
--mount type=bind,src=/mash/mobilizon/data/uploads,dst=/var/lib/mobilizon/uploads \
docker.io/framasoft/mobilizon:3.1.0
Expected behaviour:
Successful update
Actual behaviour:
Service fails with this error
un 01 07:15:36 s3 systemd[1]: Starting Mobilizon Server (mash-mobilizon)...
Jun 01 07:15:36 s3 mash-mobilizon[1933296]: 99aedba26a29bb61504e8f68dce570a37a0d6729fe9d40426e21736f2c2f3519
Jun 01 07:15:36 s3 systemd[1]: Started Mobilizon Server (mash-mobilizon).
Jun 01 07:15:37 s3 mash-mobilizon[1933311]: -- Waiting for database...
Jun 01 07:15:37 s3 mash-mobilizon[1933311]: mash-postgis:5432 - accepting connections
Jun 01 07:15:37 s3 mash-mobilizon[1933311]: CREATE EXTENSION
Jun 01 07:15:37 s3 mash-mobilizon[1933311]: NOTICE: extension "pg_trgm" already exists, skipping
Jun 01 07:15:37 s3 mash-mobilizon[1933311]: NOTICE: extension "unaccent" already exists, skipping
Jun 01 07:15:37 s3 mash-mobilizon[1933311]: CREATE EXTENSION
Jun 01 07:15:37 s3 mash-mobilizon[1933311]: -- Running migrations...
Jun 01 07:15:38 s3 mash-mobilizon[1933311]: Loading app..
Jun 01 07:15:38 s3 mash-mobilizon[1933311]: Starting dependencies..
Jun 01 07:15:39 s3 mash-mobilizon[1933311]: 07:15:39.387 [info] Migrations already up
Jun 01 07:15:39 s3 mash-mobilizon[1933311]: -- Starting!
Jun 01 07:15:45 s3 mash-mobilizon[1933311]: 07:15:45.859 [notice] Application tzdata exited: exited in: Tzdata.App.start(:normal, [])
Jun 01 07:15:45 s3 mash-mobilizon[1933311]: ** (EXIT) an exception was raised:
Jun 01 07:15:45 s3 mash-mobilizon[1933311]: ** (MatchError) no match of right hand side value: {:error, {:shutdown, {:failed_to_start_child, Tzdata.EtsHolder, {%File.Error{reason: :enoent, path: "/var/lib/mobilizon/tzdata/release_ets", action: "list directory"}, [{File, :ls!, 1, [file: 'lib/file.ex', line: 1637]}, {Tzdata.EtsHolder, :release_files_for_dir, 1, [file: 'lib/tzdata/ets_holder.ex', line: 117]}, {Tzdata.EtsHolder, :make_sure_a_release_is_on_file, 0, [file: 'lib/tzdata/ets_holder.ex', line: 80]}, {Tzdata.EtsHolder, :init, 1, [file: 'lib/tzdata/ets_holder.ex', line: 16]}, {:gen_server, :init_it, 2, [file: 'gen_server.erl', line: 962]}, {:gen_server, :init_it, 6, [file: 'gen_server.erl', line: 917]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 241]}]}}}}
Jun 01 07:15:45 s3 mash-mobilizon[1933311]: (tzdata 1.1.1) lib/tzdata/tzdata_app.ex:13: Tzdata.App.start/2
Jun 01 07:15:45 s3 mash-mobilizon[1933311]: (kernel 9.0) application_master.erl:293: :application_master.start_it_old/4
Jun 01 07:15:47 s3 mash-mobilizon[1933311]: Kernel pid terminated (application_controller) ({application_start_failure,tzdata,{bad_return,{{'Elixir.Tzdata.App',start,[normal,[]]},{'EXIT',{{badmatch,{error,{shutdown,{failed_to_start_child,'Elixir.Tzdata.EtsHolder',{#{reason => enoent,path => <<"/var/lib/mobilizon/tzdata/release_ets">>,action => <<"list directory">>,'__struct__' => 'Elixir.File.Error','__exception__' => true},[{'Elixir.File','ls!',1,[{file,"lib/file.ex"},{line,1637}]},{'Elixir.Tzdata.EtsHolder',release_files_for_dir,1,[{file,"lib/tzdata/ets_holder.ex"},{line,117}]},{'Elixir.Tzdata.EtsHolder',make_sure_a_release_is_on_file,0,[{file,"lib/tzdata/ets_holder.ex"},{line,80}]},{'Elixir.Tzdata.EtsHolder',init,1,[{file,"lib/tzdata/ets_holder.ex"},{line,16}]},{gen_server,init_it,2,[{file,"gen_server.erl"},{line,962}]},{gen_server,init_it,6,[{file,"gen_server.erl"},{line,917}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,241}]}]}}}}},[{'Elixir.Tzdata.App',start,2,[{file,"lib/tzdata/tzdata_app.ex"},{line,13}]},{application_master,start
Jun 01 07:15:47 s3 mash-mobilizon[1933311]:
Jun 01 07:15:47 s3 mash-mobilizon[1933311]: Crash dump is being written to: erl_crash.dump...
Jun 01 07:15:47 s3 systemd[1]: mash-mobilizon.service: Main process exited, code=exited, status=1/FAILURE
Jun 01 07:15:47 s3 systemd[1]: mash-mobilizon.service: Failed with result 'exit-code'.
Reproduces how often:
100%
Versions
3.1.0, I confirmed that does not affect 3.0.4
Additional Information
Could be related to #1280 (closed) and 4bb06252