Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on RHEL8 Beta #338

Closed
megastallman opened this issue Mar 22, 2019 · 18 comments
Closed

Segfault on RHEL8 Beta #338

megastallman opened this issue Mar 22, 2019 · 18 comments

Comments

@megastallman
Copy link

RHEL has dropped KDE support at all, and there should be any decent way to use a decent WM or DE. An install script is fine for that purpose.

It is easy to reproduce on a freshly installed RHEL8 with development tools. First run "dnf -y install libXpm-devel fontconfig-devel perl" and then build IceWM from source.

When choosing IceWM or IceWM-Session from GDM - it breaks. When running "icewm --replace" or "icewm-session --replace" from gnome-terminal - it breaks with "Segmentation Fault(Core Dumped)" error.

@gijsbers
Copy link
Collaborator

Thx! Is this specific to RHEL8b or are others like Fedora 28 / 29 also affected?
If it segfaults then you could with little effort start it from valgrind or gdb and show us a stacktrace?

@megastallman
Copy link
Author

Same on Fedora 29

@megastallman
Copy link
Author

==28938== Memcheck, a memory error detector ==28938== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==28938== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==28938== Command: icewm --replace ==28938== ==28938== Invalid read of size 8 ==28938== at 0x42DDD4: YWindowManagerStatus::YWindowManagerStatus(YWindow*, mstring const&) (wmstatus.cc:42) ==28938== by 0x42DFEB: MoveSizeStatus::MoveSizeStatus(YWindow*) (wmstatus.cc:88) ==28938== by 0x44555B: YWMApp::YWMApp(int*, char***, char const*, char const*, char const*) (wmapp.cc:1208) ==28938== by 0x40E51D: main (wmapp.cc:1617) ==28938== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==28938== ==28938== ==28938== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==28938== Access not within mapped region at address 0x0 ==28938== at 0x42DDD4: YWindowManagerStatus::YWindowManagerStatus(YWindow*, mstring const&) (wmstatus.cc:42) ==28938== by 0x42DFEB: MoveSizeStatus::MoveSizeStatus(YWindow*) (wmstatus.cc:88) ==28938== by 0x44555B: YWMApp::YWMApp(int*, char***, char const*, char const*, char const*) (wmapp.cc:1208) ==28938== by 0x40E51D: main (wmapp.cc:1617) ==28938== If you believe this happened as a result of a stack ==28938== overflow in your program's main thread (unlikely but ==28938== possible), you can try to increase the size of the ==28938== main thread stack using the --main-stacksize= flag. ==28938== The main thread stack size used in this run was 8388608. ==28938== ==28938== HEAP SUMMARY: ==28938== in use at exit: 337,607 bytes in 1,506 blocks ==28938== total heap usage: 5,309 allocs, 3,803 frees, 1,319,735 bytes allocated ==28938== ==28938== LEAK SUMMARY: ==28938== definitely lost: 0 bytes in 0 blocks ==28938== indirectly lost: 0 bytes in 0 blocks ==28938== possibly lost: 0 bytes in 0 blocks ==28938== still reachable: 337,607 bytes in 1,506 blocks ==28938== suppressed: 0 bytes in 0 blocks ==28938== Rerun with --leak-check=full to see details of leaked memory ==28938== ==28938== For counts of detected and suppressed errors, rerun with: -v ==28938== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

This is my valgrind output. I've also got a coredump file. Should I upload it somewhere?

@gijsbers
Copy link
Collaborator

This output says icewm can't find the status font. It is a font loading issue.
The bug in icewm is that it handles it improperly. The good news is that
you can work around it by making sure the needed fonts are installed.
Maybe you can examine which font packages are installed and which other
font packages needed to be installed to get it working?
In this case look at preferences options like:

# StatusFontName="-*-monospace-bold-r-*-*-*-120-*-*-*-*-*-*"
# StatusFontNameXft="monospace:size=12:bold"

There should in fact be messages printed like:

"failed to load font '%s', trying fallback"
"Could not load fallback Xft font."

I.e. whenever some font could not be loaded then icewm should have told you so.

@gijsbers
Copy link
Collaborator

The output of icewm --configured should show that fonts are enabled.

@megastallman
Copy link
Author

Maybe that is the reason:
# icewm --configured icewm configured options: i18n libpng libxpm nls shape wordexp

@megastallman
Copy link
Author

megastallman commented Mar 26, 2019

Hi @gijsbers

Yes!
It works now. I've looked into Fedora srpm to see the build dependencies. Here is my installer script:

See the new version below

Just copypaste it and make fun on RHEL8!

Still I lack some /usr/share/applications integrations, but it is not that difficult to achieve. Have you got any ideas on it?

@gijsbers
Copy link
Collaborator

This is nice to hear! What is your new updated output of icewm --configured?

Does icewm-menu-fdo give you any output?

@megastallman
Copy link
Author

megastallman commented Mar 27, 2019

That is what I've got:

# icewm --configured
icewm configured options: fribidi i18n libpng libxpm nls shape wordexp xfreetype2 xinerama xrender
# icewm-menu-fdo
bash: icewm-menu-fdo: command not found...

@gijsbers
Copy link
Collaborator

You don't seem to have JPEG support configured. You don't want xrandr? session?
For /usr/share/applications integrations you do need icewm-menu-fdo.
I believe it requires glib2-devel. Which gives output to pkg-config --modversion gio-unix-2.0.

@megastallman
Copy link
Author

Thanks @gijsbers !

Now IceWM looks perfect! Even better than good old Gnome 2. Here is my new installer script:

dnf groupinstall "Development Tools"
dnf -y install perl gettext-devel autoconf automake libtool libXpm-devel fontconfig-devel libXext-devel libXinerama-devel xorg-x11-proto-devel libXft-devel libICE-devel gettext fribidi-devel popt-devel xterm libjpeg-turbo-devel glib2-devel libXrandr-devel gnome-session-xsession
cd /usr/src
git clone http://github.com/bbidulock/icewm.git
cd icewm
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc
make
make install
sed -i 's/# TaskBarAtTop=0/TaskBarAtTop=1/' /usr/share/icewm/preferences

The icewm-menu-fdo command works, integration is fine.

# icewm --configured
icewm configured options: fdomenus fribidi i18n libjpeg libpng libxpm nls shape wordexp xfreetype2 xinerama xrandr xrender

@tim77
Copy link
Contributor

tim77 commented Sep 1, 2019

Pushed latest 1.6.1 version into testing EPEL 8 repo. There is still many things which i considered TODO. Also keep in mind that default installation is really really bloatware version but you can always install minimal version without all optional dependencies:

sudo dnf install icewm-minimal-session --setopt=install_weak_deps=False

@megastallman
Copy link
Author

Hi @tim77
Unfortunately it doesn't get installed on Centos 8
`# dnf install icewm
Last metadata expiration check: 0:21:53 ago on Sun 06 Oct 2019 08:43:28 AM EDT.
Error:
Problem: conflicting requests

  • nothing provides gnome-icon-theme needed by icewm-1.6.1-4.el8.x86_64
    (try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)`

Looks like the "gnome-icon-theme" package is unavailable here. Did I mess up any repos?

@gijsbers
Copy link
Collaborator

gijsbers commented Oct 6, 2019

Dunno. CentOS 8 is new. What gives yum whatprovides gnome-icon-theme?

@megastallman
Copy link
Author

It gives 'Error: No Matches found'
Looks like it doesn't exist in repos.

@tim77
Copy link
Contributor

tim77 commented Oct 6, 2019

Looks like the "gnome-icon-theme" package is unavailable here. Did I mess up any repos?

Many packages still not available for EPEL8. Thanks a lot for feedback. I'll fix this soon...

@megastallman
Copy link
Author

Thanks much @tim77 !
Meawhile, I'm doing this: https://gitlab.com/megastallman/xfce4-el8-installer, and I can't build xkb-plugin, mixer and power-manager due to absent packages.

@tim77
Copy link
Contributor

tim77 commented Oct 11, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants