erlang / docker-erlang-otp

the Official Erlang OTP image on Docker Hub

Home Page:https://hub.docker.com/_/erlang/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Latest image breaks when running observer

lucacorti opened this issue · comments

When upgrading to the lastest image (24.2.0.0) and running the observer it crashed probably due to missing runtime dependencies.

This can reproduced by symply starting the container and trying to start the observer. The first time it error out, the second time the VM segfaults:

21:38:06: Error: Unable to initialize GTK+, is DISPLAY set properly?
                                                                    =ERROR REPORT==== 20-Dec-2021::21:38:06.919830 ===
WX ERROR: Could not load library: load
Library load-call unsuccessful (1).
{error,{{error,{load,"Library load-call unsuccessful (1)."}},
        [{wxe_server,start,1,[{file,"wxe_server.erl"},{line,65}]},
         {wx,new,1,[{file,"wx.erl"},{line,115}]},
         {observer_wx,init,1,[{file,"observer_wx.erl"},{line,108}]},
         {wx_object,init_it,6,[{file,"wx_object.erl"},{line,404}]},
         {proc_lib,init_p_do_apply,3,
                   [{file,"proc_lib.erl"},{line,226}]}]}}
2> =CRASH REPORT==== 20-Dec-2021::21:38:06.922769 ===
  crasher:
    initial call: wxe_master:init/1
    pid: <0.88.0>
    registered_name: []
    exception error: {error,{load,"Library load-call unsuccessful (1)."}}
      in function  wxe_master:init/1 (wxe_master.erl, line 119)
      in call from gen_server:init_it/2 (gen_server.erl, line 423)
      in call from gen_server:init_it/6 (gen_server.erl, line 390)
    ancestors: [<0.87.0>,observer,<0.80.0>]
    message_queue_len: 0
    messages: []
    links: []
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 1598
    stack_size: 28
    reductions: 2740
  neighbours:

=CRASH REPORT==== 20-Dec-2021::21:38:06.922880 ===
  crasher:
    initial call: wxe_server:init/1
    pid: <0.87.0>
    registered_name: []
    exception error: {error,{load,"Library load-call unsuccessful (1)."}}
      in function  wxe_master:init/1 (wxe_master.erl, line 119)
      in call from gen_server:init_it/2 (gen_server.erl, line 423)
      in call from gen_server:init_it/6 (gen_server.erl, line 390)
    ancestors: [observer,<0.80.0>]
    message_queue_len: 0
    messages: []
    links: []
    dictionary: []
    trap_exit: false
    status: running
    heap_size: 610
    stack_size: 28
    reductions: 236
  neighbours:

=CRASH REPORT==== 20-Dec-2021::21:38:06.923013 ===
  crasher:
    initial call: observer_wx:init/1
    pid: <0.86.0>
    registered_name: observer
    exception exit: {{error,{load,"Library load-call unsuccessful (1)."}},
                     [{wxe_server,start,1,[{file,"wxe_server.erl"},{line,65}]},
                      {wx,new,1,[{file,"wx.erl"},{line,115}]},
                      {observer_wx,init,1,
                                   [{file,"observer_wx.erl"},{line,108}]},
                      {wx_object,init_it,6,
                                 [{file,"wx_object.erl"},{line,404}]},
                      {proc_lib,init_p_do_apply,3,
                                [{file,"proc_lib.erl"},{line,226}]}]}
      in function  wx_object:init_it/6 (wx_object.erl, line 417)
    ancestors: [<0.80.0>]
    message_queue_len: 0
    messages: []
    links: []
    dictionary: [{'_wx_object_',{observer_wx,'_wx_init_'}}]
    trap_exit: false
    status: running
    heap_size: 987
    stack_size: 28
    reductions: 293
  neighbours:

2> observer:start().

This also causes issues if you are running releases and happen to start observer as part of the release.

{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{{shutdown,{failed_to_start_child,kernel_safe_sup,{on_load_function_failed,gl}}},{kernel,start,[normal,[]]}}}"}

Maybe related to the wx dependencies changes for bullseye?

I don't use observer in erlang docker image, I don't know whether it work in the docker image.
But I test erlang:23 , the observer is not enabled either.
It might not be a fault of this upgrade.

It might not be a fault of this upgrade.

It is related to this upgrade, the error on startup in releases when having observer in the applications started with it.

I've been running this successfully on the erlang image since a long time (few erlang/OTP major releases).