erlang无法启动产生崩溃转储,如何调试?

时间:2019-10-07 20:33:39

标签: erlang

我已将Erlang移植到基于X86的操作系统上。尝试启动它会产生一些输出和崩溃转储。我需要确定其失败原因的帮助。

我在启动时已包含-init_debug,并在Windows上正在运行的erlang实例上查看了故障转储。在故障转储中,pid <0.2.0>不存在,我认为应该存在。我欢迎您提前提出任何建议。

otp_src_18.0 / bootstrap / bin: . / erl - init_debug{
    progress,
    preloaded
}{
    progress,
    kernel_load_completed
}{
    progress,
    modules_loaded
}{
    start,
    heart
}{
    start,
    error_logger
}{
    start,
    application_controller
}{
    error_logger, { {
            2019,
            10,
            7
        }, {
            14,
            47,
            26
        }
    },
    "Error in process ~p with exit
    value:~n~p~n",
    [ < 0.2.0 > , {
            undef,
            [{
                    application_controller,
                    start,
                    application,
                    kernel,
                    [{
                            description,
                            "ERTS  CXC 138 10"
                        }, {
                            vsn,
                            "4.0"
                        }, {
                            id,
                            []
                        }, {
                            modules,
                            [application, application_controller, application_master, application_starter, auth, code, code_server, dist_util, erl_boot_server, erl_distribution, erl_reply, error_handler, error_logger, file, file_server, file_io_server, global, global_group, global_search, group, heart, hipe_unified_loader, inet6_tcp, inet6_tcp_dist, inet6_udp, inet6_sctp, inet_config, inet_hosts, inet_gethost_native, inet_tcp_dist, kernel, kernel_config, net, net_adm, net_kernel, os, ram_file, rpc, user, user_drv, user_sup, disk_log, disk_log_1, disk_log_server, disk_log_sup, dist_ac, erl_ddll, erl_epmd, erts_debug, gen_tcp, gen_udp, gen_sctp, inet, inet_db, inet_dns, inet_parse, inet_res, inet_tcp, inet_udp, inet_sctp, pg2, seq_trace, standard_error, wrap_log_reader]
                        }, {
                            registered,
                            [application_controller, erl_reply, auth, boot_server, code_server, disk_log_server, disk_log_sup, erl_prim_loader, error_logger, file_server_2, fixtable_server, global_group, global_name_server, heart, init, kernel_config, kernel_sup, net_kernel, net_sup, rex, user, os_server, ddll_server, erl_epmd, inet_db, pg2]
                        }, {
                            applications,
                            []
                        }, {
                            included_applications,
                            []
                        }, {
                            env,
                            [{
                                    error_logger,
                                    tty
                                }
                            ]
                        }, {
                            maxT,
                            infinity
                        }, {
                            maxP,
                            infinity
                        }, {
                            mod, {
                                kernel,
                                []
                            }
                        }
                    ]
                }
            ],
            []
        }, {
            init,
            start_in_kernel,
            5,
            []
        }, {
            init,
            eval_script,
            8,
            []
        }, {
            init,
            do_boot,
            3,
            []
        }
    ]
}
]
}{
    "init terminating in do_boot", {
        undef,
        [{
                application_controller,
                start,
                [{
                        application,
                        kernel,
                        [{
                                description,
                                "ERTS  CXC 138 10"
                            }, {
                                vsn,
                                "4.0"
                            }, {
                                id,
                                []
                            }, {
                                modules,
                                [application, application_controller, application_master, application_starter, auth, code, code_server, dist_util, erl_boot_server, erl_distribution, erl_reply, error_handler, error_logger, file, file_server, file_io_server, global, global_group, global_search, group, heart, hipe_unified_loader, inet6_tcp, inet6_tcp_dist, inet6_udp, inet6_sctp, inet_config, inet_hosts, inet_gethost_native, inet_tcp_dist, kernel, kernel_config, net, net_adm, net_kernel, os, ram_file, rpc, user, user_drv, user_sup, disk_log, disk_log_1, disk_log_server, disk_log_sup, dist_ac, erl_ddll, erl_epmd, erts_debug, gen_tcp, gen_udp, gen_sctp, inet, inet_db, inet_dns, inet_parse, inet_res, inet_tcp, inet_udp, inet_sctp, pg2, seq_trace, standard_error, wrap_log_reader]
                            }, {
                                registered,
                                [application_controller, erl_reply, auth, boot_server, code_server, disk_log_server, disk_log_sup, erl_prim_loader, error_logger, file_server_2, fixtable_server, global_group, global_name_server, heart, init, kernel_config, kernel_sup, net_kernel, net_sup, rex, user, os_server, ddll_server, erl_epmd, inet_db, pg2]
                            }, {
                                applications,
                                []
                            }, {
                                included_applications,
                                []
                            }, {
                                env,
                                [{
                                        error_logger,
                                        tty
                                    }
                                ]
                            }, {
                                maxT,
                                infinity
                            }, {
                                maxP,
                                infinity
                            }, {
                                mod, {
                                    kernel,
                                    []
                                }
                            }
                        ]
                    }
                ],
                []
            }, {
                init,
                start_in_kernel,
                5,
                []
            }, {
                init,
                eval_script,
                8,
                []
            }, {
                init,
                do_boot,
                3,
                []
            }
        ]
    }
}
Crash dump is being written to: erl_crash.dump...done
init terminating in do_boot()

2 个答案:

答案 0 :(得分:0)

尝试安装erlang-tools。例如,对于Ubuntu:

$ sudo apt-get install erlang-tools

或者您可以从操作系统中删除Erlang并通过https://www.erlang-solutions.com/resources/download.html

重新安装

答案 1 :(得分:0)

我取得了进步。我用'-g'进行了重新构建以添加符号,以便可以调试,清除所有.o,重新构建...然后它开始工作。我猜我配置错误。