Page MenuHomePhabricator

efreetd: FreeBSD segfault.
Open, HighPublic

Description

On FreeBSD 12.1 I am finding a efreetd coredump regularly but am unable to duplicate the crash manually.

Reading symbols from efreetd...
[New LWP 100126]
Core was generated by `/usr/local/bin/efreetd'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000008002ef39c in _scheduled_entry_cb (f=0x80738ac10, value=...) at ../src/lib/eina/eina_promise.c:428
428	   Eina_Future_Scheduler *scheduler = f->scheduled_entry->scheduler;
(gdb) bt
#0  0x00000008002ef39c in _scheduled_entry_cb (f=0x80738ac10, value=...) at ../src/lib/eina/eina_promise.c:428
#1  0x0000000800ad61d7 in _futures_dispatch_cb (data=0x80180fe60, ev=0x7fffffffdb50) at ../src/lib/eo/eo_base_class.c:1806
#2  0x0000000800ad452e in _event_callback_call (obj_id=0x400000000111, pd=0x8011f5440, desc=0x8003ea3a0 <_EFL_LOOP_EVENT_IDLE_ENTER>, event_info=0x0, legacy_compare=0 '\000') at ../src/lib/eo/eo_base_class.c:2073
#3  0x0000000800ad34b0 in _efl_object_event_callback_call (obj_id=0x400000000111, pd=0x8011f5440, desc=0x8003ea3a0 <_EFL_LOOP_EVENT_IDLE_ENTER>, event_info=0x0) at ../src/lib/eo/eo_base_class.c:2158
#4  0x0000000800ac9770 in efl_event_callback_call (obj=0x400000000111, desc=0x8003ea3a0 <_EFL_LOOP_EVENT_IDLE_ENTER>, event_info=0x0) at ../src/lib/eo/eo_base_class.c:2161
#5  0x0000000800377e48 in _ecore_main_loop_iterate_internal (obj=0x400000000111, pd=0x8011f54b0, once_only=0) at ../src/lib/ecore/ecore_main.c:2413
#6  0x00000008003782c2 in _ecore_main_loop_begin (obj=0x400000000111, pd=0x8011f54b0) at ../src/lib/ecore/ecore_main.c:1200
#7  0x00000008003833dd in _efl_loop_begin (obj=0x400000000111, pd=0x8011f54b0) at ../src/lib/ecore/efl_loop.c:57
#8  0x0000000800381c4d in efl_loop_begin (obj=0x400000000111) at src/lib/ecore/efl_loop.eo.c:28
#9  0x00000008003784b4 in ecore_main_loop_begin () at ../src/lib/ecore/ecore_main.c:1285
#10 0x0000000000204590 in main (argc=1, argv=0x7fffffffe750) at ../src/bin/efreet/efreetd.c:82
(gdb) print f
$1 = (Eina_Future *) 0x80738ac10
(gdb) print f->scheduled_entry
$2 = (Eina_Future_Schedule_Entry *) 0x0
(gdb) print f->scheduled_entry->scheduler
Cannot access memory at address 0x0
(gdb) show threads
Undefined show command: "threads".  Try "help show".
(gdb) info threads
  Id   Target Id         Frame
* 1    LWP 100126        0x00000008002ef39c in _scheduled_entry_cb (f=0x80738ac10, value=...) at ../src/lib/eina/eina_promise.c:428
(gdb)

Details

netstar created this task.Sun, Nov 24, 5:31 AM
netstar triaged this task as High priority.
netstar added a project: E on FreeBSD.

I could catch the same crash:

(lldb) run
Process 16266 launching
Process 16266 launched: '/usr/local/bin/efreetd' (x86_64)
Process 16266 stopped
* thread #1, name = 'efreetd', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
    frame #0: 0x00000008002c9cb8 libeina.so.1`_scheduled_entry_cb(f=0x00000008029ecd90, value=Eina_Value @ 0x00000008043580d0) at eina_promise.c:428
   425 	_scheduled_entry_cb(Eina_Future *f, Eina_Value value)
   426 	{
   427 	   // This function is called by the scheduler, so it has to be defined
-> 428 	   Eina_Future_Scheduler *scheduler = f->scheduled_entry->scheduler;
   429 	
   430 	   eina_lock_take(&_pending_futures_lock);
   431 	   _pending_futures = eina_list_remove(_pending_futures, f);
(lldb) bt
* thread #1, name = 'efreetd', stop reason = signal SIGSEGV: invalid address (fault address: 0x0)
  * frame #0: 0x00000008002c9cb8 libeina.so.1`_scheduled_entry_cb(f=0x00000008029ecd90, value=Eina_Value @ 0x00000008066dba40) at eina_promise.c:428
    frame #1: 0x00000008009fb085 libeo.so.1`_futures_dispatch_cb(data=<unavailable>, ev=<unavailable>) at eo_base_class.c:1806
    frame #2: 0x00000008009fa536 libeo.so.1`_event_callback_call(obj_id=0x00004000000000a0, pd=<unavailable>, desc=<unavailable>, event_info=<unavailable>, legacy_compare=<unavailable>) at eo_base_class.c:2073
    frame #3: 0x00000008009f27d6 libeo.so.1`efl_event_callback_call(obj=0x00004000000000a0, desc=0x00000008003703f0, event_info=0x0000000000000000) at eo_base_class.c:2161
    frame #4: 0x000000080032eb85 libecore.so.1`_ecore_main_loop_iterate_internal(obj=0x00004000000000a0, pd=0x00000008016120b0, once_only=0) at ecore_main.c:2413
    frame #5: 0x000000080032f12d libecore.so.1`_ecore_main_loop_begin(obj=0x00004000000000a0, pd=0x00000008016120b0) at ecore_main.c:1200
    frame #6: 0x00000008003346b6 libecore.so.1`_efl_loop_begin(obj=0x00004000000000a0, pd=0x00000008016120b0) at efl_loop.c:57
    frame #7: 0x0000000800334136 libecore.so.1`efl_loop_begin(obj=0x00004000000000a0) at efl_loop.eo.c:28
    frame #8: 0x000000080032f223 libecore.so.1`ecore_main_loop_begin at ecore_main.c:1285
    frame #9: 0x000000000020449c efreetd`main(argc=<unavailable>, argv=<unavailable>) at efreetd.c:82
    frame #10: 0x000000000020411b efreetd`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1.c:76

| LLDB (F1) | Target (F2) | Process (F3) | Thread (F4) | View (F5) | Help (F6) |
┌──<Sources>──────────────────────────────────────────────────────────────────────────────────────┐┌──<Threads>────────────┐
│ libeina.so.1`_scheduled_entry_cb                                                                ││ ◆─process 16266       │
│  418 │            }                                                                             ││                       │
│  419 │          _eina_promise_value_steal_and_link(scheduler, next_value, f);                   ││                       │
│  420 │       }                                                                                  ││                       │
│  421 │     else _eina_future_dispatch(scheduler, f, next_value);                                ││                       │
│  422 │  }                                                                                       ││                       │
│  423 │                                                                                          ││                       │
│  424 │ static void                                                                              ││                       │
│  425 │ _scheduled_entry_cb(Eina_Future *f, Eina_Value value)                                    ││                       │
│  426 │ {                                                                                        ││                       │
│  427 │    // This function is called by the scheduler, so it has to be defined                  ││                       │
│  428 │◆   Eina_Future_Scheduler *scheduler = f->scheduled_entry->scheduler;                      │                       │
   429 │                <<< Thread 1: signal SIGSEGV: invalid address (fault address: 0x0)        ││                       │
│  430 │    eina_lock_take(&_pending_futures_lock);                                               ││                       │
│  431 │    _pending_futures = eina_list_remove(_pending_futures, f);                             ││                       │
│  432 │    eina_lock_release(&_pending_futures_lock);                                            ││                       │
│  433 │    f->scheduled_entry = NULL;                                                            ││                       │
│  434 │    _eina_future_dispatch(scheduler, f, value);                                           ││                       │
│  435 │ }                                                                                        ││                       │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘│                       │
┌──<Variables>────────────────────────────────────────────────────────────────────────────────────┐│                       │
│ ├─◆─(Eina_Promise *) promise = 0x00000008029ece50                                               ││                       │
│ ├─◆─(Eina_Future *) next = 0x00000008029ecdd0                                                   ││                       │
│ ├─◆─(Eina_Future *) prev = 0x0000000000000000                                                   ││                       │
│ ├─◆─(Eina_Future_Cb) cb = 0x0000000000000000                                                    ││                       │
│ ├─◆─(const void *) data = 0x0000000000000000                                                    ││                       │
│ ├─◆─(Eina_Future **) storage = 0x0000000000000000                                               ││                       │
│ └─◆─(Eina_Future_Schedule_Entry *) scheduled_entry = 0x0000000000000000                         ││                       │
└─────────────────────────────────────────────────────────────────────────────────────────────────┘└───────────────────────┘
Process: 16266    stopped               Thread: 100970      Frame:   0  PC = 0x00000008002c9cb8

BTW, it seems that when it cannot build cache (this is the case actually here) - a new E profile cannot be created.

Another test - I started efreetd in 2nd screen, being in login manager (so, without E). It started correctly, without error, being the only process. Then I open session in login manager - E tries to start new efreetd processes, at one moment I see 5 ones, then only two stays started (one old from 2nd screen and one new), E starts, saying that efreetd cannot update cache. And later the first one (started manually) was crashed, the new one was started.

Maybe it helps...

cedric added a comment.Fri, Dec 6, 9:20 AM

Do you have something like valgrind? The future seems to be completely empty other than the next and promise which is weird.