Посмотрите пожалуйста, может что-нибудь поймёте.
Это я сделал run -nonat -c и потом list по всем фреймам.
Код:
#0 0x0f84e564 in raise () from /lib/libc.so.6
#1 0x0f8501b4 in abort () from /lib/libc.so.6
#2 0x0fcfecdc in switch_core_memory_init () at src/switch_core_memory.c:634
#3 0x0fd23160 in switch_core_init (flags=68097, console=SWITCH_TRUE,
err=0xbff110f8) at src/switch_core.c:1597
#4 0x0fd237d4 in switch_core_init_and_modload (flags=0, console=1541,
err=0x6) at src/switch_core.c:2048
#5 0x100053d4 in main (argc=3, argv=0xbff12de4) at src/switch.c:1083
(gdb) list
421 /* skip whitespaces */
422 while ((*p == 13) || (*p == 10) || (*p == 9) || (*p == 32) || (* p == 11)) p++;
423 return (p[0] == '-');
424 }
425
426
427 /* the main application entry point */
428 int main(int argc, char *argv[])
429 {
430 char pid_path[PATH_MAX] = ""; /* full path to the pid file */
(gdb) up
#1 0x0f8501b4 in abort () from /lib/libc.so.6
(gdb) list
431 char pid_buffer[32] = ""; /* pid string */
432 char old_pid_buffer[32] = ""; /* pid string */
433 switch_size_t pid_len, old_pid_len;
434 const char *err = NULL; /* error value for return from f reeswitch initialization */
435 #ifndef WIN32
436 switch_bool_t nf = SWITCH_FALSE; / * TRUE if we are running in nofork mode */
437 switch_bool_t do_wait = SWITCH_FALSE;
438 char *runas_user = NULL;
439 char *runas_group = NULL;
440 int fds[2] = { 0, 0 };
(gdb) up
#2 0x0fcfecdc in switch_core_memory_init () at src/switch_core_memory.c:634
634 abort();
(gdb) list
629 }
630
631 if ((apr_pool_create_ex(&memory_manager.memory_pool, NULL, NULL, my_allocator)) != APR_SUCCESS) {
632 apr_allocator_destroy(my_allocator);
633 my_allocator = NULL;
634 abort();
635 }
636
637 if ((apr_thread_mutex_create(&my_mutex, APR_THREAD_MUTEX_NESTED, memory_manager.memory_pool)) != APR_SUCCESS) {
638 abort();
(gdb) up
#3 0x0fd23160 in switch_core_init (flags=68097, console=SWITCH_TRUE,
err=0xbff110f8) at src/switch_core.c:1597
1597 if (!(runtime.memory_pool = switch_core_memory_init())) {
(gdb) list
1592 if (apr_initialize() != SWITCH_STATUS_SUCCESS) {
1593 *err = "FATAL ERROR! Could not initialize APR\n";
1594 return SWITCH_STATUS_MEMERR;
1595 }
1596
1597 if (!(runtime.memory_pool = switch_core_memory_init())) {
1598 *err = "FATAL ERROR! Could not allocate memory pool\n";
1599 return SWITCH_STATUS_MEMERR;
1600 }
1601 switch_assert(runtime.memory_pool != NULL);
(gdb) up
#4 0x0fd237d4 in switch_core_init_and_modload (flags=0, console=1541,
err=0x6) at src/switch_core.c:2048
2048 if (switch_core_init(flags, console, err) != SWITCH_STATUS_SUCCE SS) {
(gdb) list
2043 int x = 0;
2044 const char *use = NULL;
2045 #include "cc.h"
2046
2047
2048 if (switch_core_init(flags, console, err) != SWITCH_STATUS_SUCCESS) {
2049 return SWITCH_STATUS_GENERR;
2050 }
2051
2052 if (runtime.runlevel > 1) {
(gdb) up
#5 0x100053d4 in main (argc=3, argv=0xbff12de4) at src/switch.c:1083
1083 if (switch_core_init_and_modload(flags, nc ? SWITCH_FALSE : SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
(gdb) list
1078 return 255;
1079 }
1080
1081 switch_file_write(fd, pid_buffer, &pid_len);
1082
1083 if (switch_core_init_and_modload(flags, nc ? SWITCH_FALSE : SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) {
1084 fprintf(stderr, "Cannot Initialize [%s]\n", err);
1085 return 255;
1086 }
1087