Page MenuHomePhabricator

Enlightenment freezes
Closed, ResolvedPublic

Description

I've just tested the last Enlightenment (from Git) , complied with the last Efl (from Git) on my FreeBSD 11.0 VM (Virtualbox).
It still freezes regularly, the most often - on start menu (Applications) activating.
The screenshot is showing the VM's desktop and the backtrace of enlightenment process in GDB.

...the CPU is 100%, used by Enlightenment process.

raster added a subscriber: raster.Sep 13 2017, 2:49 AM

btw - i've been trying to update my freebsd vm to try... but network in my neck of the woods is failing to connect to pkg.freebsd.org ... something is up.

Peter2121 added a comment.EditedSep 23 2017, 12:46 PM

I noticed that E freezes regularly when I am debugging something in Netbeans on my laptop.
I rebuilt EFL and E with more debug info, I'll try to upload some backtraces here.

the fascinating thing is... you're using the software engine for e? well well... must not be too slow if you are not using acceleration. :)

and i'm sitting here going:

fr 7
l

and going "why can't i do that!!!!"... a line number... some listing of whats on that line...

Probably, at one moment I reset the rendering to software from OpenGL I'm using normally.
I've just changed it to OpenGL (NVIDIA drivers), I'll try to reproduce the freeze.

It seems that with OpenGL rendering the freeze is much more difficult (or impossible) to reproduce - the actions that always froze E before, don't freeze it now, I cannot reproduce it for the moment.
BTW, in the meantime I upgraded EFL and E to the last versions from Git - so maybe it helps too.
Anyway, as the problem was randomly present - I continue my tests, it's my everyday laptop, so if the problem is still here - it will be captured.

well the freeze is in the sw rendering code path... so by switching engine you're avoiding that code path. i've never seen this on linux though. so my other comment about wanting at least a line number still stands. then i might know what is triggering it there. maybe a read-only bit of memory being written to somehow...

What compile options should I use to have line numbers shown in the backtrace?
I used the ones from https://www.enlightenment.org/docs-efl-start :
export CFLAGS="-O2 -ffast-math -march=native -g -ggdb3"

One more freeze, this time - with OpenGL rendering active.



those flags should do it... but it's missing the info... did something strip the binaries? did you compile and install by hand?

this next issue... it's crashing deep inside the nvidia drivers. why - don't know. no symbols, data or info as to why...

I install EFL an E normally - autogen/configure/gmake
Nothing could strip binaries. Could it be CLANG issue?

ummmmm then it should have filenames and line numbers there too. unless you didnt have CFLAGS set when building efl (before configure runs)...

Voila my root environnement (set in profile):

LD_LIBRARY_PATH=/usr/local/lib
CFLAGS=-O2 -ffast-math -march=native -g -ggdb3
USER=root
PAGER=more
PWD=/root
HOME=/root
CPATH=/usr/local/include
LIBRARY_PATH=/usr/local/lib
MAIL=/var/mail/root
TERM=xterm
SHELL=/usr/local/bin/bash
SHLVL=1
BLOCKSIZE=K
LOGNAME=root
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
_=/usr/bin/env

I always compile under this profile.

you compile as root?

Yes, I compile as root

ummmmm ok. well CFLAGS is set... using clang or gcc?

By default - CLANG

perhaps clang is not respecting the gdb options... check clang's manual for debug options... maybe you have to not even use gdb... use lldb by hand. i don't know.

zmike edited projects, added enlightenment-git, Restricted Project; removed E on FreeBSD.Sep 29 2017, 10:14 AM

I've got two nice freezes on E22 beta. The both are related to "old" gadgets - ibar and main menu. There are more debug info here, hope it helps to find the source of problems.

oh no... those are not the old ibar gadgets... that's the new luncher replacement for ibar seemingly looking up something in a hash that is totally inaccessible (but within a valid memory segment)... somehow. @okra @zmike ...

zmike reassigned this task from zmike to stephenmhouston.Oct 25 2017, 7:31 AM

This happens when you minimize a window and then restore it?

zmike reassigned this task from stephenmhouston to raster.Oct 25 2017, 7:43 AM

Actually the latest issues are a duplicate of T6258. Disregard the previous three comments in discussion of this issue.

One more freeze, slightly different

Enlightenment 0.22.1 (EFL 1.20.5, OpenGL) freezes sometimes; one time on day.
It was freezed several times when I run Everything and after press 'Apply' in theme dialog.

Still exist in Enlightenment 0.22.1 with EFL 1.20.6.
Easy way to reproduce the issue -- open Theme dialog by Everything.

Can any FreeBSD user somehow get a valgrind trace? I've tried but valgrind is always stuck in piperd state after Ecore_Evas init. I even tried debugging valgrind, no such luck.

I think the cause is "Everything: applications", could you try disabling that in the Settings for the module and then try to reproduce the issue on FreeBSD???

I can trigger this bug either with E's menu, or by banging alt+escape lots of times really quickly to bring up/down the everything launcher lots of times. More eyes is good! It's a stinker of a bug.

@raster we spent a little time looking at efreet and the desktop menu functions if you recall?

@netstar ummm... i dont remember any details of that ... not off the top of my head.

reeks of efreet as do a few other weird tickets out there, can't remember if they were irc, ml, or on phab, that seem to have the same behavior relating back to efreet.

Seems there is no problem in Enlightenment 0.22.1 with EFL 1.20.5.

I've just tested on 12-CURRENT with EFL and E from git - the problem is still here, simple to reproduce.

i wonder if it has to do with calling popen from a thread? linux seems to have no trouble with that. the man page says popen/pclose are mt safe... maybe some icons are svg and thus evas ends up using the external svg loader which is process based which relies on popen ... you get the idea... can you check if you have any svg icons and maybe not use any icon theme that has svg icons? see if problem goes away?

It seems that it is!!
I deleted all themes with svg files and deleted 'scalable' dir from 'hicolor', so there is no svg files in /usr/local/shared. Then I killed efreetd, deleted efreetd cache and efreetd socket and restarted the laptop. After reboot I cannot reproduce the problem of main menu freezes, new apps installed OK and new icons are shown in the menu.

raster added a comment.Feb 3 2018, 5:52 AM

hmmmm. so then the question... why is popen not mt safe on bsd like it is on linux. this really messes up our code... :/

Is there any possible workaround in the current state?
Could you prepare a small tool to put in evidence the popen problem? So I can try to open a ticket in FreeBSD tracker...
Maybe there are some side effects - using popen in unusual way? I doubt that nobody found this FreeBSD problem before...

hmmmm. so then the question... why is popen not mt safe on bsd like it is on linux. this really messes up our code... :/

It is not BSD only problem. On linux the problem exists in EFL 1.20.6 (I could not reproduce Enlightenment freeze on EFL 1.20.5).

From investigation I don't think it's due to the popen in the generic loader. I think that's a red-herring.

There are a few issues going on. FreeBSD doesn't like async rendering. There's also some memory corruption going on which without valgrind is pretty difficult to find (i'll keep looking when I have a moment).

The everything apps and main menu freeze seems to be caused by a simple eina_stringshare_add.

eina_inline_rbtree.x uses the _eina_share_common_cmp from eina_share_common.c. (line 340).

Seems ed->hash is corrupted.

For some reason efreet_menu* has issues on FreeBSD with the above happening sometimes with E's menu and the evrything apps plugin. That's all for now.

hmm well if something is corrupted, then that could do all sorts of bad things, like corrupt a lock/mutex and thus cause a hangup or lock, or create infinite loops and so n. all bets are off with that. the question is.. what is the corruption issue?

Got some stuff before valgrind locked up:

The normal noise plus some efreet stuff....

==1525== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==1525== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==1525== Command: /usr/local/bin/enlightenment -valgrind=1 -valgrind-log-file=log.txt
==1525== Parent PID: 1520
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC7F7F: ???
==1525==    by 0x8133974: ??? (in /lib/libc.so.7)
==1525==    by 0x2: ???
==1525==    by 0x5A59DC: e_util_env_set (e_utils.c:36)
==1525==    by 0x558498: main (e_main.c:284)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x5580F0: main (e_main.c:218)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x8137577: ??? (in /lib/libc.so.7)
==1525==    by 0x813742D: ??? (in /lib/libc.so.7)
==1525==    by 0xEF0026B: ???
==1525==    by 0x8133B21: ??? (in /lib/libc.so.7)
==1525==    by 0x2: ???
==1525==    by 0x5A59DC: e_util_env_set (e_utils.c:36)
==1525==    by 0x558498: main (e_main.c:284)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x5580F0: main (e_main.c:218)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x8137577: ??? (in /lib/libc.so.7)
==1525==    by 0x813742D: ??? (in /lib/libc.so.7)
==1525==    by 0x1F: ???
==1525==    by 0x4CCB214: eina_prefix_new (eina_prefix.c:505)
==1525==    by 0x580763: e_prefix_determine (e_prefix.c:42)
==1525==    by 0x5586E5: main (e_main.c:313)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x4CCAE6D: eina_prefix_new (eina_prefix.c:471)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x8137577: ??? (in /lib/libc.so.7)
==1525==    by 0x813742D: ??? (in /lib/libc.so.7)
==1525==    by 0xEF2A386: ???
==1525==    by 0x8133B21: ??? (in /lib/libc.so.7)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x55E374: _e_main_parse_arguments (e_main.c:1174)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x8137577: ??? (in /lib/libc.so.7)
==1525==    by 0x813742D: ??? (in /lib/libc.so.7)
==1525==    by 0xF: ???
==1525==    by 0x4CCB214: eina_prefix_new (eina_prefix.c:505)
==1525==    by 0x5189626: ecore_init (ecore.c:261)
==1525==    by 0x558BCC: main (e_main.c:360)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x4CCAE6D: eina_prefix_new (eina_prefix.c:471)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC6C7F: ???
==1525==    by 0x8052031: ??? (in /lib/libc.so.7)
==1525==    by 0xA2533D882B141416: ???
==1525==    by 0x4CCB965: eina_prefix_new (eina_prefix.c:659)
==1525==    by 0x5189626: ecore_init (ecore.c:261)
==1525==    by 0x558BCC: main (e_main.c:360)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x4CCAE6D: eina_prefix_new (eina_prefix.c:471)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC722F: ???
==1525==    by 0x4CE7477: eina_stringshare_add (eina_stringshare.c:613)
==1525==    by 0x9BD5A2E: _efl_vpath_core_meta_set (efl_vpath_core.c:302)
==1525==    by 0x9BD557C: efl_vpath_core_meta_set (in /usr/local/lib/libefl.so.1.20.99)
==1525==    by 0x9BD5D6B: _efl_vpath_core_efl_object_constructor (efl_vpath_core.c:89)
==1525==    by 0x9E1037C: efl_constructor (in /usr/local/lib/libeo.so.1.20.99)
==1525==    by 0x9E0660B: _efl_add_internal_start (eo.c:910)
==1525==    by 0x51896F8: ecore_init (ecore.c:279)
==1525==    by 0x558BCC: main (e_main.c:360)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x9BD5AF4: _efl_vpath_core_efl_object_constructor (efl_vpath_core.c:29)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC788F: ???
==1525==    by 0x4CC9873: eina_module_new (eina_module.c:269)
==1525==    by 0x4CCA661: _dir_arch_list_cb (eina_module.c:171)
==1525==    by 0x4D0B24D: eina_file_dir_list (eina_file.c:576)
==1525==    by 0x4CCA59A: eina_module_arch_list_get (eina_module.c:502)
==1525==    by 0x5189DF8: ecore_system_modules_load (ecore.c:184)
==1525==    by 0x5189849: ecore_init (ecore.c:349)
==1525==    by 0x558BCC: main (e_main.c:360)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x4CCA60D: _dir_arch_list_cb (eina_module.c:166)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC7DEF: ???
==1525==    by 0x4CE7477: eina_stringshare_add (eina_stringshare.c:613)
==1525==    by 0x5603769: _ecore_file_path_from_env (ecore_file_path.c:66)
==1525==    by 0x560360F: ecore_file_path_init (ecore_file_path.c:27)
==1525==    by 0x56009B4: ecore_file_init (ecore_file.c:97)
==1525==    by 0x662DDD7: efreet_mime_init (efreet_mime.c:373)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x5603667: _ecore_file_path_from_env (ecore_file_path.c:49)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC6BAF: ???
==1525==    by 0x8052031: ??? (in /lib/libc.so.7)
==1525==    by 0xA2533D882B141416: ???
==1525==    by 0x4CCB965: eina_prefix_new (eina_prefix.c:659)
==1525==    by 0x582D14E: _efl_net_proxy_helper_init (ecore_con_proxy_helper.c:429)
==1525==    by 0x58251D0: ecore_con_init (ecore_con.c:100)
==1525==    by 0x5602414: ecore_file_download_init (ecore_file_download.c:38)
==1525==    by 0x56009C1: ecore_file_init (ecore_file.c:99)
==1525==    by 0x662DDD7: efreet_mime_init (efreet_mime.c:373)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x4CCAE6D: eina_prefix_new (eina_prefix.c:471)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC79FF: ???
==1525==    by 0x4CE7477: eina_stringshare_add (eina_stringshare.c:613)
==1525==    by 0x6407D54: efreet_dir_get (efreet_base.c:352)
==1525==    by 0x6406DBB: efreet_dirs_init (efreet_base.c:292)
==1525==    by 0x6406D3E: efreet_base_init (efreet_base.c:74)
==1525==    by 0x640655A: efreet_init (efreet.c:73)
==1525==    by 0x662DDEA: efreet_mime_init (efreet_mime.c:376)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x6407D02: efreet_dir_get (efreet_base.c:348)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x8129F4F: ??? (in /lib/libc.so.7)
==1525==    by 0x4CAB0D0: _eina_string_key_cmp (eina_hash.c:512)
==1525==    by 0x4CAF385: _eina_hash_key_rbtree_cmp_key_data (eina_hash.c:179)
==1525==    by 0x4CAF18A: eina_rbtree_inline_lookup (eina_inline_rbtree.x:37)
==1525==    by 0x4CAD0F3: _eina_hash_find_by_hash (eina_hash.c:342)
==1525==    by 0x4CACFEC: eina_hash_find_by_hash (eina_hash.c:1060)
==1525==    by 0x4CAD299: eina_hash_find (eina_hash.c:1082)
==1525==    by 0x9BD6BCA: _efl_vpath_core_efl_vpath_fetch (efl_vpath_core.c:409)
==1525==    by 0x9BBC834: efl_vpath_fetch (in /usr/local/lib/libefl.so.1.20.99)
==1525==    by 0x9BD505B: _efl_vpath_manager_fetch (efl_vpath_manager.c:34)
==1525==    by 0x9BD4A84: efl_vpath_manager_fetch (in /usr/local/lib/libefl.so.1.20.99)
==1525==    by 0x6406E3E: efreet_dirs_init (efreet_base.c:312)
==1525==    by 0x6406D3E: efreet_base_init (efreet_base.c:74)
==1525==    by 0x640655A: efreet_init (efreet.c:73)
==1525==    by 0x662DDEA: efreet_mime_init (efreet_mime.c:376)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x9BD678F: _efl_vpath_core_efl_vpath_fetch (efl_vpath_core.c:320)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC4B3F: ???
==1525==    by 0x4CE7477: eina_stringshare_add (eina_stringshare.c:613)
==1525==    by 0x9BD4982: eina_stringshare_replace (eina_inline_stringshare.x:82)
==1525==    by 0x9BD47D7: _efl_vpath_file_result_set (efl_vpath_file.c:31)
==1525==    by 0x9BD3E44: efl_vpath_file_result_set (in /usr/local/lib/libefl.so.1.20.99)
==1525==    by 0x9BD6C32: _efl_vpath_core_efl_vpath_fetch (efl_vpath_core.c:414)
==1525==    by 0x9BBC834: efl_vpath_fetch (in /usr/local/lib/libefl.so.1.20.99)
==1525==    by 0x9BD505B: _efl_vpath_manager_fetch (efl_vpath_manager.c:34)
==1525==    by 0x9BD4A84: efl_vpath_manager_fetch (in /usr/local/lib/libefl.so.1.20.99)
==1525==    by 0x6406E3E: efreet_dirs_init (efreet_base.c:312)
==1525==    by 0x6406D3E: efreet_base_init (efreet_base.c:74)
==1525==    by 0x640655A: efreet_init (efreet.c:73)
==1525==    by 0x662DDEA: efreet_mime_init (efreet_mime.c:376)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x9BD6704: _efl_vpath_core_efl_vpath_fetch (efl_vpath_core.c:309)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC7A7F: ???
==1525==    by 0x4CE7477: eina_stringshare_add (eina_stringshare.c:613)
==1525==    by 0x6406EA3: efreet_dirs_init (efreet_base.c:321)
==1525==    by 0x6406D3E: efreet_base_init (efreet_base.c:74)
==1525==    by 0x640655A: efreet_init (efreet.c:73)
==1525==    by 0x662DDEA: efreet_mime_init (efreet_mime.c:376)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x6406D5B: efreet_dirs_init (efreet_base.c:286)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC676F: ???
==1525==    by 0x8052031: ??? (in /lib/libc.so.7)
==1525==    by 0xA2533D882B141416: ???
==1525==    by 0x4CCB965: eina_prefix_new (eina_prefix.c:659)
==1525==    by 0x641ED09: efreet_cache_init (efreet_cache.c:316)
==1525==    by 0x640656D: efreet_init (efreet.c:76)
==1525==    by 0x662DDEA: efreet_mime_init (efreet_mime.c:376)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x4CCAE6D: eina_prefix_new (eina_prefix.c:471)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC571F: ???
==1525==    by 0x8052031: ??? (in /lib/libc.so.7)
==1525==    by 0x1D: ???
==1525==    by 0x58764CA: ecore_con_local_path_new (ecore_con_local.c:107)
==1525==    by 0x53F4093: ecore_ipc_server_connect (ecore_ipc.c:671)
==1525==    by 0x641ED28: efreet_cache_init (efreet_cache.c:319)
==1525==    by 0x640656D: efreet_init (efreet.c:76)
==1525==    by 0x662DDEA: efreet_mime_init (efreet_mime.c:376)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x5876364: ecore_con_local_path_new (ecore_con_local.c:48)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC790F: ???
==1525==    by 0x4CA83C4: eina_file_path_sanitize (eina_file_common.c:380)
==1525==    by 0x4CA9364: eina_file_sanitize (eina_file_common.c:569)
==1525==    by 0x4D0BFA5: eina_file_open (eina_file.c:801)
==1525==    by 0x662E01F: _efreet_mimedb_update (efreet_mime.c:200)
==1525==    by 0x662DE68: efreet_mime_init (efreet_mime.c:391)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x662DF64: _efreet_mimedb_update (efreet_mime.c:185)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC78CF: ???
==1525==    by 0x8052031: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC7AFF: ???
==1525==    by 0x4CA8438: eina_file_path_sanitize (eina_file_common.c:390)
==1525==    by 0x4CA9364: eina_file_sanitize (eina_file_common.c:569)
==1525==    by 0x4D0BFA5: eina_file_open (eina_file.c:801)
==1525==    by 0x662E01F: _efreet_mimedb_update (efreet_mime.c:200)
==1525==    by 0x662DE68: efreet_mime_init (efreet_mime.c:391)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x662DF64: _efreet_mimedb_update (efreet_mime.c:185)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC6C9F: ???
==1525==    by 0x4CA83C4: eina_file_path_sanitize (eina_file_common.c:380)
==1525==    by 0x4CA9364: eina_file_sanitize (eina_file_common.c:569)
==1525==    by 0x4D0BFA5: eina_file_open (eina_file.c:801)
==1525==    by 0x66303F6: efreet_mime_shared_mimeinfo_magic_load (efreet_mime.c:892)
==1525==    by 0x663031E: efreet_mime_load_magics (efreet_mime.c:676)
==1525==    by 0x662E16A: efreet_mime_init_files (efreet_mime.c:704)
==1525==    by 0x662DE6D: efreet_mime_init (efreet_mime.c:393)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x6630284: efreet_mime_load_magics (efreet_mime.c:663)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC6C5F: ???
==1525==    by 0x8052031: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC6EAF: ???
==1525==    by 0x4CA8438: eina_file_path_sanitize (eina_file_common.c:390)
==1525==    by 0x4CA9364: eina_file_sanitize (eina_file_common.c:569)
==1525==    by 0x4D0BFA5: eina_file_open (eina_file.c:801)
==1525==    by 0x66303F6: efreet_mime_shared_mimeinfo_magic_load (efreet_mime.c:892)
==1525==    by 0x663031E: efreet_mime_load_magics (efreet_mime.c:676)
==1525==    by 0x662E16A: efreet_mime_init_files (efreet_mime.c:704)
==1525==    by 0x662DE6D: efreet_mime_init (efreet_mime.c:393)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x6630284: efreet_mime_load_magics (efreet_mime.c:663)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC6BCF: ???
==1525==    by 0x4CE7477: eina_stringshare_add (eina_stringshare.c:613)
==1525==    by 0x663066E: efreet_mime_shared_mimeinfo_magic_parse (efreet_mime.c:978)
==1525==    by 0x663044D: efreet_mime_shared_mimeinfo_magic_load (efreet_mime.c:898)
==1525==    by 0x663038B: efreet_mime_load_magics (efreet_mime.c:681)
==1525==    by 0x662E16A: efreet_mime_init_files (efreet_mime.c:704)
==1525==    by 0x662DE6D: efreet_mime_init (efreet_mime.c:393)
==1525==    by 0x684763E: eio_init (eio_main.c:320)
==1525==    by 0x558EA7: main (e_main.c:384)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x66304B4: efreet_mime_shared_mimeinfo_magic_parse (efreet_mime.c:944)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC4EBF: ???
==1525==    by 0x8133974: ??? (in /lib/libc.so.7)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x55EA1B: _xdg_data_dirs_augment (e_main.c:138)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x8137577: ??? (in /lib/libc.so.7)
==1525==    by 0x813742D: ??? (in /lib/libc.so.7)
==1525==    by 0xFE4482C: ???
==1525==    by 0x8133B21: ??? (in /lib/libc.so.7)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x55EA1B: _xdg_data_dirs_augment (e_main.c:138)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC4CAF: ???
==1525==    by 0x80D0FD9: ??? (in /lib/libc.so.7)
==1525==    by 0x4F: ???
==1525==    by 0x81345C4: ??? (in /lib/libc.so.7)
==1525==    by 0xDD8E0DF: ???
==1525==    by 0x55ED78: _xdg_data_dirs_augment (e_main.c:180)
==1525==    by 0x55958F: main (e_main.c:447)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x55EA1B: _xdg_data_dirs_augment (e_main.c:138)
==1525== 
==1525== Conditional jump or move depends on uninitialised value(s)
==1525==    at 0x81373A7: ??? (in /lib/libc.so.7)
==1525==    by 0x7FEFC6AFF: ???
==1525==    by 0x8052031: ??? (in /lib/libc.so.7)
==1525==    by 0xA2533D882B141416: ???
==1525==    by 0x4CCB965: eina_prefix_new (eina_prefix.c:659)
==1525==    by 0x6021298: _evas_module_libdir_get (evas_module.c:789)
==1525==    by 0x602107E: evas_module_paths_init (evas_module.c:132)
==1525==    by 0x60212EC: evas_module_init (evas_module.c:357)
==1525==    by 0x5F3232A: evas_init (evas_main.c:70)
==1525==    by 0x7584CF5: ecore_evas_init (ecore_evas.c:612)
==1525==    by 0x5595F9: main (e_main.c:450)
==1525==  Uninitialised value was created by a stack allocation
==1525==    at 0x4CCAE6D: eina_prefix_new (eina_prefix.c:471)
==1525==
raster added a comment.Feb 8 2018, 5:27 AM

ooooh. you're missing symbols in libc! thats bad because you can't easily now tell valgrind to ighnore thise. almost all your noise i think is optimized strcmp's or strcpy's that copy or compare 4 or 8 bytes at a time in a way that TECHNICALLY may mean they may read out-of-bounds BUT they end up ingoring everything after the last 0 byte for example. valgrind only gets to see the "read the 32 bit value in" and then gets unhappy. i've seen this before and it's these optimizations that just need to be ignored. but without symbols in libc.. you can't add suppressions for them

@Peter2121

Can you try latest git EFL and latest E.

Can you still trigger it???

Also this below doesn't make sense but does it fix the issue for you???

diff --git a/src/modules/fileman/e_mod_menu.c b/src/modules/fileman/e_mod_menu.c
index e28c96d..4afaafb 100644
--- a/src/modules/fileman/e_mod_menu.c
+++ b/src/modules/fileman/e_mod_menu.c
@@ -228,7 +228,8 @@ _e_mod_menu_populate_item(void *data, Eio_File *handler EINA_UNUSED, const Eina_
      {
         e_util_menu_item_theme_icon_set(mi, "folder");
         eina_stringshare_ref(dev);
-        e_object_data_set(E_OBJECT(mi), eina_stringshare_printf("%s/%s", path ?: "", info->path + info->name_start));
+        Eina_Stringshare *tmp = eina_stringshare_printf("%s/%s", path ?: "", info->path + info->name_start);
+        e_object_data_set(E_OBJECT(mi), tmp); 
      }
 end:
    e_menu_item_submenu_pre_callback_set(mi, _e_mod_menu_populate, dev);

I forgot to say if you do any testing at all probably best to:

export ECORE_EVAS_FORCE_SYNC_RANDER=1 / setenv

That's a different kettle of fish.

@Peter2121

Okay with any version of EFL, try this:

If this is ok then there's other issues to fix too that might seem similar....ugh.

Can you test this with ECORE_EVAS_FORCE_SYNC_RENDER set. It *should* resolve menu issues. Please let me know how it goes!

diff --git a/src/bin/e_object.c b/src/bin/e_object.c
index 3af9dce..55bbfa6 100644
--- a/src/bin/e_object.c
+++ b/src/bin/e_object.c
@@ -117,6 +117,7 @@ e_object_free(E_Object *obj)
    obj->magic = E_OBJECT_MAGIC_FREED;
 #endif
    obj->cleanup_func(obj);
+   obj = NULL;
 }
 
 E_API int
diff --git a/src/modules/fileman/e_mod_menu.c b/src/modules/fileman/e_mod_menu.c
index e28c96d..1f67818 100644
--- a/src/modules/fileman/e_mod_menu.c
+++ b/src/modules/fileman/e_mod_menu.c
@@ -109,19 +109,32 @@ _e_mod_menu_populate_filter(void *data EINA_UNUSED, Eio_File *handler, const Ein
    struct stat st;
    long count;
 
-   count = (long)eio_file_associate_find(handler, "count");
+   if (!handler) return EINA_FALSE;
+
+   if (eio_file_check(handler)) return EINA_FALSE;
+
+#if defined(__FreeBSD__) || defined(__DragonFly__)
+/* XXX: Accessing tmp is causing SIGBUS issues. The easiest way to
+   handle is to ignore this directory. */
+   if (!strncmp(info->path, "/tmp", 3)) return EINA_FALSE;
+#endif
+
+   count = (long) eio_file_associate_find(handler, "count");
    if (count > 100)
      {
         eio_file_cancel(handler);
         return EINA_FALSE;
      }
    count++;
+
    eio_file_associate_add(handler, "count", (void*)count, NULL);
    /* don't show .dotfiles */
    if (fileman_config->view.menu_shows_files)
      return (info->path[info->name_start] != '.');
+
    if (lstat(info->path, &st)) return EINA_FALSE;
    /* don't show links to prevent infinite submenus */
+
    return (info->path[info->name_start] != '.') &&
           ((info->type == EINA_FILE_DIR) || eina_str_has_extension(info->path + info->name_start, "desktop")) &&
           (!S_ISLNK(st.st_mode));
@@ -135,6 +148,8 @@ _e_mod_menu_populate_item(void *data, Eio_File *handler EINA_UNUSED, const Eina_
    const char *dev, *path;
    Efreet_Desktop *ed = NULL;
 
+   if (handler && eio_file_check(handler)) return;
+
    mi = m->parent_item;
    dev = e_object_data_get(E_OBJECT(m));
    path = mi ? e_object_data_get(E_OBJECT(mi)) : "/";
@@ -271,7 +286,7 @@ _e_mod_menu_populate_done(void *data, Eio_File *handler EINA_UNUSED)
 static void
 _e_mod_menu_populate_err(void *data, Eio_File *handler, int error EINA_UNUSED)
 {
-   _e_mod_menu_populate_done(data, handler);
+   (void) data; (void) handler;
 }

I've pulled EFL and Enlightenment from GIT, applied your patch and installed.
Then I tried to install a new app and access the main menu immediately after install. I always had a freeze on this operation, I have no such freeze today. So it seems to go better.
Tomorrow I'll try to test on another laptop with FreeBSD 12.0 installed.

That's great. It's not going to stop all issues but the menu should be considerably much more stable. Let me know how you fair with that.

Gosh a Linux bt:

Thread 1 (Thread 0x7fda8c892e00 (LWP 1102)):
#0  0x00007fda8bca97c2 in __libc_pause () at ../sysdeps/unix/sysv/linux/pause.c:30
        resultvar = 18446744073709551102
        sc_cancel_oldtype = 0
#1  0x000055a9506c64c4 in e_alert_show () at ../src/bin/e_alert.c:43
No locals.
#2  0x000055a9506703e0 in _e_crash () at ../src/bin/e_signals.c:81
No locals.
#3  0x000055a950670489 in e_sigabrt_act (x=6, info=0x7ffd9e978770, data=0x7ffd9e978640) at ../src/bin/e_signals.c:127
No locals.
#4  <signal handler called>
No locals.
#5  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
        set = {__val = {0, 0, 4607182418800017408, 0, 4607182418800017408, 0, 4606746181657771328, 0, 13572268605202350192, 0, 13693802794332711807, 0, 4323523077633180568, 0, 13822610412055554382, 0}}
        pid = <optimized out>
        tid = <optimized out>
#6  0x00007fda8894dcf7 in __GI_abort () at abort.c:90
        save_stage = 2
        act = {__sigaction_handler = {sa_handler = 0x0, sa_sigaction = 0x0}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = 0, sa_restorer = 0x0}
        sigs = {__val = {32, 0 <repeats 15 times>}}
#7  0x00007fda8bee9763 in eina_log_print_unlocked (domain=5, level=EINA_LOG_LEVEL_CRITICAL, file=0x7fda8bf415af "lib/eina/eina_stringshare.c", fnc=0x7fda8bf41860 <__FUNCTION__.5548> "_eina_stringshare_small_del", line=371, fmt=0x7fda8bf41580 "EEEK trying to del non-shared stringshare \"%s\"", args=0x7ffd9e9796d8) at lib/eina/eina_log.c:1458
        d = 0x55a952e57980
#8  0x00007fda8beeae8c in eina_log_print (domain=5, level=EINA_LOG_LEVEL_CRITICAL, file=0x7fda8bf415af "lib/eina/eina_stringshare.c", fnc=0x7fda8bf41860 <__FUNCTION__.5548> "_eina_stringshare_small_del", line=371, fmt=0x7fda8bf41580 "EEEK trying to del non-shared stringshare \"%s\"") at lib/eina/eina_log.c:2259
        args = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7ffd9e9797b8, reg_save_area = 0x7ffd9e9796f0}}
#9  0x00007fda8bf0e8fd in _eina_stringshare_small_del (str=0x55a9529e1d2c "\332\177", length=2 '\002') at lib/eina/eina_stringshare.c:371
        bucket = 0x7fda8c15b130 <_eina_small_share+1744>
        ret = 0x29e979820 <error: Cannot access memory at address 0x29e979820>
        i = 32730
        __FUNCTION__ = "_eina_stringshare_small_del"
#10 0x00007fda8bf0edbe in eina_stringshare_del (str=0x55a9529e1d2c "\332\177") at lib/eina/eina_stringshare.c:572
        slen = 2
        __FUNCTION__ = "eina_stringshare_del"
#11 0x00007fda6d5f67f9 in _e_mod_menu_cleanup_cb (obj=0x55a95271f250) at ../src/modules/fileman/e_mod_menu.c:103
No locals.
#12 0x000055a95064ece7 in e_object_free (obj=0x55a95271f250) at ../src/bin/e_object.c:95
No locals.
#13 0x000055a95064efd4 in e_object_unref (obj=0x55a95271f250) at ../src/bin/e_object.c:152
        ref = 0
        __FUNCTION__ = "e_object_unref"
#14 0x000055a95063d9f8 in _e_menu_list_free_unref (l=0x55a95349f700) at ../src/bin/e_menu.c:135
        o = 0x55a95271f250
        ll = 0x55a95349e710
        lll = 0x55a9534a02a0
#15 0x000055a950641da0 in e_menu_idler_before () at ../src/bin/e_menu.c:1194
        l = 0x0
        removals = 0x0
        tmp = 0x55a95349f700
        m = 0x0
#16 0x000055a95063bf6a in _e_main_cb_idle_before (data=0x0) at ../src/bin/e_main.c:1793
No locals.
#17 0x00007fda8b5e648c in _ecore_call_task_cb (func=0x55a95063bf59 <_e_main_cb_idle_before>, data=0x0) at lib/ecore/ecore_private.h:426
No locals.
#18 0x00007fda8b5e64f4 in _ecore_factorized_idle_process (data=0x55a951fe63e0, event=0x7ffd9e979a00) at lib/ecore/ecore_idler.c:35
        idler = 0x55a951fe63e0
#19 0x00007fda86ffbcd9 in _event_callback_call (obj_id=0x4000000003f7, pd=0x55a951fd9690, desc=0x7fda8b83c640 <_EFL_LOOP_EVENT_IDLE_ENTER>, event_info=0x0, legacy_compare=0 '\000') at lib/eo/eo_base_class.c:1494
        it = 0x7fda8b83f970 <internal+16>
        cb = 0x55a951fdc888
        lookup = 0x7ffd9e979a20
        saved = {__in_list = {next = 0x0, prev = 0x0, last = 0x7ffd9e979a20}, desc = 0x7fda8b83c640 <_EFL_LOOP_EVENT_IDLE_ENTER>, current = 5}
        ev = {object = 0x4000000003f7, desc = 0x7fda8b83c640 <_EFL_LOOP_EVENT_IDLE_ENTER>, info = 0x0}
        idx = 6
        callback_already_stopped = 0 '\000'
        ret = 1 '\001'
        frame = {next = 0x0, idx = 6, inserted_before = 0, generation = 1}
#20 0x00007fda86ffbfab in _efl_object_event_callback_call (obj_id=0x4000000003f7, pd=0x55a951fd9690, desc=0x7fda8b83c640 <_EFL_LOOP_EVENT_IDLE_ENTER>, event_info=0x0) at lib/eo/eo_base_class.c:1578
No locals.
#21 0x00007fda86ffc051 in efl_event_callback_call (obj=0x4000000003f7, desc=0x7fda8b83c640 <_EFL_LOOP_EVENT_IDLE_ENTER>, event_info=0x0) at lib/eo/eo_base_class.c:1581
        _r = 0 '\000'
        ___op = 32
        ___generation = 1
        ___call = {eo_id = 0x4000000003f7, obj = 0x55a951fd9650, func = 0x7fda86ffbf75 <_efl_object_event_callback_call>, data = 0x55a951fd9690, extn1 = 0x7ffd9e979b20, extn2 = 0x7fda8b61b9f7 <_efl_loop_timer_expired_timers_call+54>, extn3 = 0x40f9416511111111, extn4 = 0x40f9416511111111}
        _func_ = 0x7fda86ffbf75 <_efl_object_event_callback_call>
#22 0x00007fda8b5eafd8 in _ecore_main_loop_iterate_internal (obj=0x4000000003f7, pd=0x55a951fd9710, once_only=0) at lib/ecore/ecore_main.c:2356
        next_time = -1
        f = 0x0
        p = 0x0
        tmp = 0x0
#23 0x00007fda8b5e854d in _ecore_main_loop_begin (obj=0x4000000003f7, pd=0x55a951fd9710) at lib/ecore/ecore_main.c:1173
        __FUNCTION__ = "_ecore_main_loop_begin"
#24 0x00007fda8b5f009c in _efl_loop_begin (obj=0x4000000003f7, pd=0x55a951fd9710) at lib/ecore/efl_loop.c:97
No locals.
#25 0x00007fda8b5f2ce2 in efl_loop_begin (obj=0x4000000003f7) at lib/ecore/efl_loop.eo.c:50
        _r = 0x0
        ___op = 90
        ___generation = 1
        ___call = {eo_id = 0x4000000003f7, obj = 0x55a951fd9650, func = 0x7fda8b5f0079 <_efl_loop_begin>, data = 0x55a951fd9710, extn1 = 0x0, extn2 = 0x0, extn3 = 0x0, extn4 = 0x0}
        _func_ = 0x7fda8b5f0079 <_efl_loop_begin>
#26 0x00007fda8b5e86c6 in ecore_main_loop_begin () at lib/ecore/ecore_main.c:1246
        __FUNCTION__ = "ecore_main_loop_begin"
#27 0x000055a950639d40 in main (argc=1, argv=0x7ffd9e9b1e58) at ../src/bin/e_main.c:1092
        nostartup = 0 '\000'
        safe_mode = 0 '\000'
        waslocked = 0 '\000'
        strshare = 0x55a951fc043c "/usr\f\250\210\214\332\177"
        t = 1519860271.255841
        tstart = 1519860271.255841
        s = 0x0
        buff = "1519860271.3\000\000\000\000\001\000\000\000\000\000\000\000\335}lP\251U\000"
        action = {__sigaction_handler = {sa_handler = 0x55a950670471 <e_sigabrt_act>, sa_sigaction = 0x55a950670471 <e_sigabrt_act>}, sa_mask = {__val = {0 <repeats 16 times>}}, sa_flags = -1073741820, sa_restorer = 0x11c00}
        __FUNCTION__ = "main"

@raster it's harder to trigger on Linux but the same. I guess with FreeBSD by default setting the memory to invalid address on each free that's why it's crashing so much.

Can this be limited to one thread? I think the async eio stuff is spawning lots of threads, I don't think for this functionality it would harm to do that? What do you think?

So basically the above needs a remedy and probably once that works ok best to skip /tmp on freebsd due to the SIGBUS.

Also in eio_file there are a couple of FIXME due to not being able to compare thread with current worker thread, i guess that could cause problems too.

netstar closed this task as Resolved.Mar 1 2018, 10:07 AM

Hi @Peter2121

Okay, so closing this one. Just to remind you to enable _FORCE_SYNC_RENDER for now (that's something else that needs looking into).

bff91e0885679db55a1f7b73d1d3f8a5f94a0e7b

I don't see in your commit the patch for src/bin/e_object.c, is it forgotten?

Finally, I could test the last E build with the last EFL on my test laptop with FreeBSD 12 and HDD.
The stability is greatly improved, I could not freeze it. So I think that the problem is solved.
Note that I did NOT set _FORCE_SYNC_RENDER (I still don't understand how to do it).

@netstar, you closed it the 1 Mars ;)
...and yes, I found how to FORCE_SYNC_RENDER, you mentioned it later here (I did not see).
Were your E fixes included in 0.22.2? What will be the version of EFL with your fixes? I want to ping enlightenment@freebsd.org to update the ports, but it would be better to wait the both products updated.

No will have to wait for 22.3 and another efl minor release :/