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
GLib-ERROR **: The thread system is not yet initialized. #2848
Comments
Related to #2182 Glib version is too old in rhel6 (2.12), v2.26 is required. configure fails to detect incompatible glibc version. |
Hi @jbfuzier, Thanks for the detailed report. We also checked Centos 6 and it had 2.26 at the time, now I see version 2.28. Are you sure you have the latest package for glib2? I saw a glib2 update notice: About the crash, you've described: |
Thanks, the issue is likely related to the version not being available on our internal repo. Is the backtrace included in the debug bundle ? If so I put a link to it as it was too big to attach here. If not could you give me the command you want me to run ? |
No, there is no backtrace in the debun. |
If you need the debug symbols, I will have to see with a sysadmin if we have the required repos internally.
|
This seems to be caused by the fact that app_startup() calls
main_loop_resource_init() before g_thread_init() so seemingly this is a
genuine issue in the code.
The solution is to either move g_thread_init() somewhat earlier OR
main_loop_resource_init() a bit later. I am not sure about which one is
better, it depends on the ordering requirements at startup.
…On Tue, Jul 30, 2019, 17:39 jbfuzier ***@***.***> wrote:
If you need the debug symbols, I will have to see with a sysadmin if we
have the required repos internally.
***@***.*** lvapp]# gdb ./sbin/syslog-ng
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-75.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /logs/lvapp/sbin/syslog-ng...done.
(gdb) r
Starting program: /logs/lvapp/sbin/syslog-ng
[Thread debugging using libthread_db enabled]
Detaching after fork from child process 17971.
GLib-ERROR **: The thread system is not yet initialized.
aborting...
Program exited with code 01.
Missing separate debuginfos, use: debuginfo-install glib2-2.28.8-4.el6.x86_64 glibc-2.12-1.166.el6_7.1.x86_64 keyutils-libs-1.4-5.el6.x86_64 krb5-libs-1.10.3-42.el6.x86_64 libcom_err-1.41.12-22.el6.x86_64 libselinux-2.0.94-5.8.el6.x86_64 openssl-1.0.1e-42.el6.x86_64 zlib-1.2.3-29.el6.x86_64
(gdb) set follow-fork-mode child
(gdb) r
Starting program: /logs/lvapp/sbin/syslog-ng
[Thread debugging using libthread_db enabled]
[New process 17977]
[Thread debugging using libthread_db enabled]
[New process 17978]
[Thread debugging using libthread_db enabled]
GLib-ERROR **: The thread system is not yet initialized.
aborting...
Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffff76e5a60 (LWP 17978)]
0x0000003a41432625 in raise () from /lib64/libc.so.6
(gdb) bt full
#0 0x0000003a41432625 in raise () from /lib64/libc.so.6
No symbol table info available.
#1 0x0000003a41433e05 in abort () from /lib64/libc.so.6
No symbol table info available.
#2 0x00000035fe24b89a in g_logv () from /lib64/libglib-2.0.so.0
No symbol table info available.
#3 0x00000035fe24b933 in g_log () from /lib64/libglib-2.0.so.0
No symbol table info available.
#4 0x00000035fe268efe in ?? () from /lib64/libglib-2.0.so.0
No symbol table info available.
#5 0x00007ffff7d701de in main_loop_thread_resource_init () at lib/mainloop.c:672
No locals.
#6 0x00007ffff7d58db9 in app_startup () at lib/apphook.c:154
No locals.
#7 0x0000000000401a4d in main (argc=1, argv=0x7fffffffe068) at syslog-ng/main.c:279
rc = <value optimized out>
ctx = <value optimized out>
error = 0x0
main_loop = 0x7ffff7ffb980
exit_before_main_loop_run = <value optimized out>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#2848>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFOK5RSBWHYJFRYVOEHSB3QCBOCRANCNFSM4IHQVAXA>
.
|
Hmm, By looking at our own git history of I'll investigate this init problem, because it can cause other issues for us. However even if we resolve this issue for your case, syslog-ng 3.22 will not run with GLib 2.10 anymore, as we use some GLib API that's not available in 2.10, e.g. |
#2848 (comment) WOW almost the same time :) |
I did some more digging. The glibc reported as installed by yum is 2.12, however pkg_config reports that version 2.28 is available, that is why configure does not fail on min version :
I checked my crashing syslogng binary is linked against this version : (I do not know how to get the version from the elf to make sure it is indeed 2.28.8)
|
Can we clarify the used GLib version on your system?
yum package list
|
Sorry, you are right, I mixed those up. So to sumarize, the crash issue is occuring with glib2.x86_64 2.28.8-4.el6 which is provided in rhel6. |
Okay, I've compiled syslog-ng with glib2 2.28 and the abort occurred as well. I've tested the fix and it works with both 2.28 and e.g. 2.48.2. The reason of abort in older glib is, the function I'll send a patch soon. |
Great, thanks for your help :) |
The fix will be part of syslog-ng v3.23.1. |
Version of syslog-ng
Platform
Red Hat Enterprise Linux Server release 6.6 (Santiago)
Debug bundle
Issue
Failure
(Backtrace, error messages or detailed description of failure comes here.)
(To create debug bundles, use
syslog-ng-debun
. Details of its usage can be found on the documentation page)Steps to reproduce
start syslog-ng with default config file
syslog-ng crashes :
GLib-ERROR **: The thread system is not yet initialized.
aborting...
Configuration
The text was updated successfully, but these errors were encountered: