Hi,

While chasing a X11 keymap issue (where page-up/page-down became 
scroll-up/scroll-down), I noticed creations of fluxbox.core files.

My system is 7.2 without patches (none yet), if you need a dmesg I can
provide that to you later.

I then re-oriented myself chasing the fluxbox bug that does this, here
is a traceback:

Core was generated by `fluxbox'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/lib/libpthread.so.26.2...done.
...
(gdb) bt
#0  thrkill () at /tmp/-:3
#1  0x00000d0e49e79a9e in _libc_abort () at /usr/src/lib/libc/stdlib/abort.c:51
#2  0x00000d0b92c62e37 in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#3  <signal handler called>
#4  0x00000d0b92c98eb2 in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#5  0x00000d0b92c8c7e4 in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#6  0x00000d0b92c8cddf in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#7  0x00000d0b92c28c42 in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#8  0x00000d0b92c2987f in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#9  0x00000d0b92c5b6fe in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#10 0x00000d0b92c5ba4f in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#11 0x00000d0e49eb91b1 in _libc___cxa_finalize (dso=0x0)
    at /usr/src/lib/libc/stdlib/atexit.c:177
#12 0x00000d0e49eb1511 in _libc_exit (status=1)
    at /usr/src/lib/libc/stdlib/exit.c:54
---Type <return> to continue, or q <return> to quit---
#13 0x00000d0b92c5a931 in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#14 0x00000d0db6c7acea in _XIOError () from /usr/X11R6/lib/libX11.so.18.0
#15 0x00000d0db6c78d45 in _XReply () from /usr/X11R6/lib/libX11.so.18.0
#16 0x00000d0db6c6d666 in XQueryTree () from /usr/X11R6/lib/libX11.so.18.0
#17 0x00000d0b92c98a69 in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#18 0x00000d0b92c5c3ac in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#19 0x00000d0b92c5bfa6 in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#20 0x00000d0b92c61f76 in virtual thunk to std::__1::basic_ifstream<char, 
std::__1::char_traits<char> >::~basic_ifstream() () from /usr/local/bin/fluxbox
#21 0x00000d0b92be0302 in ?? () from /usr/local/bin/fluxbox
#22 0x0000000000000000 in ?? ()
Current language:  auto; currently asm

Now I'm not a c++ programmer (I stuck with C) but I was curious enough if the
similarities outweighed the differences between the two languages.  I did not
find any atexit() calls but investigating that it cores on signal 6 caused me
to turn on logging of fluxbox.  It said this:

Fluxbox: XIOError: lost connection to display.

So it was fairly easy then to produce this patch (patch-src_fluxbox_cc):

--- src/fluxbox.cc.orig Sun Oct 23 12:09:14 2022
+++ src/fluxbox.cc      Sun Oct 23 12:09:33 2022
@@ -162,7 +162,7 @@
 
 int handleXIOErrors(Display* d) {
     cerr << "Fluxbox: XIOError: lost connection to display.\n";
-    exit(1);
+    _exit(1);
 }
 
 
It's possibly not the right fix, but it prevents the corefile from being 
written, which is all I care about.  This is why I don't see a need to move
this upstream.

I'm not on the ports mailing list so reply to me directly for any feedback.

Best Regards,
-peter

Reply via email to