Page MenuHomePhabricator

efreetd Segmentation fault on NetBSD
Open, Incoming QueuePublic

Description

Hi!
I built efl-1.24.3 on NetBSD 9.0 amd64 with these meson args:
-Dsystemd=false -Deeze=false -Dbuild-tests=false -Dbuild-examples=false
-Dphysics=true -Ddebug-threads=true -Dglib=true

I used these NetBSD compatibility patches: https://github.com/NetBSD/pkgsrc-wip/tree/master/efl-current/patches

When I run efreetd, I got segmentation fault:

> run
Starting program: /usr/pkg/bin/efreetd 
[New process 856]
[Detaching after fork from child process 702]

Thread 1 "" received signal SIGSEGV, Segmentation fault.
_efl_loop_timer_enable_new (obj=obj@entry=0x4000000002ac, pd=pd@entry=0x0) at ../src/lib/ecore/ecore_timer.c:531
531        if (!pd->timers_added) return;
> bt
#0  _efl_loop_timer_enable_new (obj=obj@entry=0x4000000002ac, pd=pd@entry=0x0) at ../src/lib/ecore/ecore_timer.c:531
#1  0x00007ea57d61e88c in _ecore_main_loop_iterate_internal (obj=obj@entry=0x4000000002ac, pd=0x0, pd@entry=0x7ea57e10c4a8, once_only=once_only@entry=0)
    at ../src/lib/ecore/ecore_main.c:2403
#2  0x00007ea57d61efca in _ecore_main_loop_begin (obj=obj@entry=0x4000000002ac, pd=pd@entry=0x7ea57e10c4a8) at ../src/lib/ecore/ecore_main.c:1210
#3  0x00007ea57d622c1e in _efl_loop_begin (obj=0x4000000002ac, pd=0x7ea57e10c4a8) at ../src/lib/ecore/efl_loop.c:57
#4  0x00007ea57d6221ae in efl_loop_begin (obj=0x4000000002ac) at src/lib/ecore/efl_loop.eo.c:28
#5  0x00007ea57d61f086 in ecore_main_loop_begin () at ../src/lib/ecore/ecore_main.c:1295
#6  0x0000000000406033 in main (argc=<optimized out>, argv=<optimized out>) at ../src/bin/efreet/efreetd.c:82
> fr 2
#2  0x00007ea57d61efca in _ecore_main_loop_begin (obj=obj@entry=0x4000000002ac, pd=pd@entry=0x7ea57e10c4a8) at ../src/lib/ecore/ecore_main.c:1210
1210                   _ecore_main_loop_iterate_internal(obj, pd, 0);
> l
1205    #ifndef USE_G_MAIN_LOOP
1206                 in_main_loop++;
1207                 pd->in_loop = in_main_loop;
1208                 _update_loop_time(pd);
1209                 while (!pd->do_quit)
1210                   _ecore_main_loop_iterate_internal(obj, pd, 0);
1211                 pd->do_quit = 0;
1212                 in_main_loop--;
1213                 pd->in_loop = in_main_loop;
1214    #else
> p pd
$1 = (Efl_Loop_Data *) 0x7ea57e10c4a8
> p *pd
$2 = {loop_time = 2505.4097029290001, future_message_handler = 0x4000000006ad, poll_high = 0x0, poll_medium = 0x0, poll_low = 0x0, exes = 0x7ea57e0c9b10,
  fd_handlers_obj = 0x7ea57e0d4790, fd_handlers = 0x7ea57e0c0050, fd_handlers_with_prep = 0x0, file_fd_handlers = 0x0, always_fd_handlers = 0x0, 
  fd_handlers_with_buffer = 0x0, fd_handlers_to_delete = 0x0, fd_handlers_to_call = 0x7ea57e0c0350, fd_handlers_to_call_current = 0x0, thread_children = 0x0, 
  message_queue = 0x7ea57dd55f70, message_pending_queue = 0x0, message_walking = 0, throttle = 0, epoll_fd = -1, epoll_pid = 0, timer_fd = -1, 
  last_check = 2505.4090019959999, timers = 0x7ea57e07f9e8, suspended = 0x0, timer_current = 0x0, timers_added = 1, exit_code = {type = 0x0, value = {
      buf = "\000\000\000\000\000\000\000", ptr = 0x0, _guarantee = 0}}, idlers = 0, in_loop = 2, loop_active = 1, pollers = {high = 0, medium = 0, low = 0}, env = {
    environ_ptr = 0x0, environ_copy = 0x0}, do_quit = 0 '\000', quit_on_last_thread_child_del = 0 '\000'}
> fr 1
#1  0x00007ea57d61e88c in _ecore_main_loop_iterate_internal (obj=obj@entry=0x4000000002ac, pd=0x0, pd@entry=0x7ea57e10c4a8, once_only=once_only@entry=0)
    at ../src/lib/ecore/ecore_main.c:2403
2403            _efl_loop_timer_enable_new(obj, pd);
> l
2398            _ecore_throttle();
2399            _throttle_do(pd);
2400            // now quickly poll to see which input fd's are active
2401            _ecore_main_select(obj, pd, 0.0);
2402            // allow newly queued timers to expire from now on
2403            _efl_loop_timer_enable_new(obj, pd);
2404            // go straight to processing the events we had queued
2405            goto process_all;
2406         }
2407
> p pd
$3 = (Efl_Loop_Data *) 0x0
> p *pd
Cannot access memory at address 0x0
kikadf created this task.Sep 16 2020, 2:09 AM
kikadf updated the task description. (Show Details)Sep 21 2020, 10:35 AM
ProhtMeyhet added subscribers: netstar, ProhtMeyhet.

I blatantly put this under FreeBSD so maybe someone knows :-)