Bug 256408 - devel/efl: efreetd crashes with "Abort trap", thus application menu icons disappear
Summary: devel/efl: efreetd crashes with "Abort trap", thus application menu icons dis...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-enlightenment (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-04 09:15 UTC by Euan Thoms
Modified: 2021-06-04 18:12 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (enlightenment)


Attachments
Patch for devel/efl to fix eftreetd crash. (246 bytes, text/plain)
2021-06-04 09:15 UTC, Euan Thoms
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Euan Thoms 2021-06-04 09:15:59 UTC
Created attachment 225539 [details]
Patch for devel/efl to fix eftreetd crash.

I have discovered a pretty major bug in efl which affects efreetd and in turn affects enlightenment. It happens when a large number of icons or theme resources / assets are installed into /usr/local/share/... The efreetd daemon crashes with "Abort trap" error message when run from a users terminal. It causes the application menu icons to disappear, partially or fully. It can also cause an error message about efreetd (cache) not connecting with a timeout. It also causes problems with the initial enlightenment prompts with a fresh .e profile.

I have a good solution that I have a patch for an immediate fix, until I make a PR with the upstream efl project. I'd like to hear the thoughts of the FreeBSD enlightenment team before I engage with them.

Steps to reproduce:
Install any major KDE app like Dolphin, Gwenview, Okular etc. Or specifically kf5-breeze-icons. Then run efreetd as a regular user from a TTY (no X sessions running).

I have a more thorough description of the problem on the FreeBSD Forums:
https://forums.freebsd.org/threads/solved-enlightenment-application-menu-icons-missing-due-to-efreetd-crashing.80743/

The patch is attached.

Is it possible to get an enlightenment port revision with this patch out the door ASAP. I have been running it in production on my media-centre for almost 2 weeks now, no issues. Everything else seems fine, the performance seems to be as good if not better than the same version of Enlightenment/EFL on Manjaro Linux (very similar hardware).

It's a pretty urgent bug fix. I am new to enlightenment and loving it now. But I very nearly turned my back on it an use KDE instead, before even giving it a chance. If I had known it would take me 2-3 solid weeks to find the bug I never would have started. This is not just personal time, it is work time that I would not be spending, had I known how long it would take. It only took about 5 mins to fix once I found the problem, but that's usually how it goes with debugging.
Comment 1 Peter TKATCHENKO 2021-06-04 09:22:56 UTC
I've asked the opinion of developers of EFL.
Please, stay tuned :)
Comment 2 Peter TKATCHENKO 2021-06-04 12:10:02 UTC
The answer from Carsten Haitzler:

oh > 1024 fd's ... with ye olde select. yeah. that may have issues. I can throw
this into git master. for now carrying a patch in the bsd package builds would
be the right thing. the fix will then be in the next efl release.

I'll try to patch the port in the next days.
Comment 3 Euan Thoms 2021-06-04 12:41:35 UTC
Thank you so much Peter. I'm so glad to this getting taken seriously by upstream, and the response time is amazing. I had a feeling this bug was affecting users for a long time. I've seen so many reports of strange efreetd behaviour by Enlightenment users over the last few years. I thought it was more widespread than just the BSD's. That's one of the reasons I kept going with this most difficult bug to track down.
Comment 4 commit-hook freebsd_committer 2021-06-04 16:44:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=393b0d030716b82e62737556abd22ab71f6aef93

commit 393b0d030716b82e62737556abd22ab71f6aef93
Author:     Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2021-06-04 16:39:30 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2021-06-04 16:43:20 +0000

    devel/efl: Add a workaround for efreetd crash.

    PR:             256408
    Tested by:      Euan Thoms <euan@potensol.com>

 devel/efl/Makefile                                      |  2 +-
 devel/efl/files/patch-src_lib_ecore_ecore__main.c (new) | 11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
Comment 5 Gleb Popov freebsd_committer 2021-06-04 16:47:35 UTC
(In reply to Euan Thoms from comment #3)

Pushed in, thank you.

> I had a feeling this bug was affecting users for a long time.

And AFAIK, you're not mistaken.

> That's one of the reasons I kept going with this most difficult bug to track down.

This is greatly appreciated. If you're still up to it, you might want to implement a correct fix to this issue - use kqueue/kevent mechanism, which is much more performant and scalable compared to select().

EFL probably already have some sort of wrapper for Linux epoll and BSD kevent, so this shouldn't be too hard.
Comment 6 Euan Thoms 2021-06-04 18:12:54 UTC
(In reply to Gleb Popov from comment #5)

> EFL probably already have some sort of wrapper for Linux epoll and BSD kevent, so this shouldn't be too hard.

I'll try to take a look into it if I get some time. Whilst I more or less know what kqueue is/does, I have not coded with it before. But I'd like to learn.