spawn_thread_queue not initialised in GThreadPool
It causes core dumping of the createrepo_c https://github.com/rpm-software-management/createrepo_c/issues/202 After downgrade to 2.63.3 binaries everything is fine.
Relevant command line output (from the createrepo_c
bug report):
Directory walk started
Directory walk done - 1193 packages
Temporary output repo path: /home/tkloczko/rpmbuild/g2v/SRPMS/.repodata/
Preparing sqlite DBs
Pool started (with 5 workers)
Pool finished
GLib: Critical: g_async_queue_lock: assertion 'queue' failed
GLib: Critical: g_async_queue_push_unlocked: assertion 'queue' failed
GLib: Critical: _g_async_queue_get_mutex: assertion 'queue' failed
And the full backtrace from the coredump:
$ coredumpctl gdb 448914
PID: 448914 (createrepo_c)
UID: 1000 (tkloczko)
GID: 1000 (tkloczko)
Signal: 11 (SEGV)
Timestamp: Wed 2020-01-22 11:55:20 GMT (59s ago)
Command Line: createrepo_c --compress-type xz /home/tkloczko/rpmbuild/g2v/SRPMS
Executable: /usr/bin/createrepo_c
Control Group: /user.slice/user-1000.slice/session-251.scope
Unit: session-251.scope
Slice: user-1000.slice
Session: 251
Owner UID: 1000 (tkloczko)
Boot ID: 7a19f12607da41aeb7dc99f5c3a20f5b
Machine ID: d033f66b249a4ec09acfa81ac205554f
Hostname: barrel
Storage: /var/lib/systemd/coredump/core.createrepo_c.1000.7a19f12607da41aeb7dc99f5c3a20f5b.448914.1579694120000000000000.lz4
Message: Process 448914 (createrepo_c) of user 1000 dumped core.
Stack trace of thread 448914:
#0 0x00007f2435bd1606 g_mutex_unlock (libglib-2.0.so.0)
#1 0x00007f2435bd163a g_cond_wait (libglib-2.0.so.0)
#2 0x00007f2435c426e7 g_thread_pool_start_thread.constprop.0 (libglib-2.0.so.0)
#3 0x00007f2435c429e3 g_thread_pool_push (libglib-2.0.so.0)
#4 0x0000562af956ecea main (createrepo_c)
#5 0x00007f2435d2b063 __libc_start_main (libc.so.6)
#6 0x0000562af957003e _start (createrepo_c)
Stack trace of thread 448915:
#0 0x00007f2435e0007d syscall (libc.so.6)
#1 0x00007f2435bd15cc g_mutex_lock_slowpath (libglib-2.0.so.0)
#2 0x00007f2435c466e9 g_thread_pool_thread_proxy (libglib-2.0.so.0)
#3 0x00007f2435bd1f0c g_thread_proxy (libglib-2.0.so.0)
#4 0x00007f24353be482 start_thread (libpthread.so.0)
#5 0x00007f2435e05583 __clone (libc.so.6)
GNU gdb (GDB) Fedora 9.0.50.20191119-2.fc32
Copyright (C) 2019 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".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/createrepo_c...
Reading symbols from /usr/lib/debug/usr/bin/createrepo_c-0.15.6-2.fc32.x86_64.debug...
[New LWP 448914]
[New LWP 448915]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `createrepo_c --compress-type xz /home/tkloczko/rpmbuild/g2v/SRPMS'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f2435bd1606 in g_mutex_unlock () from /lib64/libglib-2.0.so.0
[Current thread is 1 (Thread 0x7f24349c21c0 (LWP 448914))]
audit-libs-3.0-0.16.20191104git1c2f876.fc32.x86_64 brotli-1.0.7-9.fc32.x86_64 bzip2-libs-1.0.8-2.fc32.x86_64 cyrus-sasl-lib-2.1.27-3.fc32.x86_64 expat-2.2.9-2.fc32.x86_64 file-libs-5.38-2.fc32.x86_64 glib2-2.63.4-2.fc32.x86_64 glibc-2.30.9000-29.fc32.x86_64 keyutils-libs-1.6.1-2.fc32.x86_64 libacl-2.2.53-5.fc32.x86_64 libcap-2.31-2.fc32.x86_64 libcap-ng-0.7.10-2.fc32.x86_64 libcom_err-1.45.4-1.fc32.x86_64 libcurl-7.68.0-2.fc32.x86_64 libdb-5.3.28-40.fc32.x86_64 libidn2-2.3.0-2.fc32.x86_64 libnghttp2-1.40.0-2.fc32.x86_64 libpsl-0.21.0-3.fc32.x86_64 libselinux-3.0-1.fc32.x86_64 libssh2-1.9.0-4.fc32.x86_64 libunistring-0.9.10-7.fc32.x86_64 libxml2-2.9.10-3.fc32.x86_64 libzstd-1.4.4-2.fc32.x86_64 lua-libs-5.3.5-6.fc31.x86_64 openldap-2.4.48-2.fc32.x86_64 openssl-libs-1.1.1d-5.fc32.x86_64 pcre-8.43-3.fc32.x86_64 popt-1.16-19.fc32.x86_64 rpm-libs-4.15.1-1.fc32.x86_64 sqlite-libs-3.30.1-2.fc32.x86_64 sssd-client-2.2.2-3.fc32.x86_64 xz-libs-5.2.4-8.fc32.x86_64 zchunk-libs-1.1.5-2.fc32.x86_64 zlib-1.2.11-21.fc32.x86_64
(gdb) bt full
Missing separate debuginfos, use: dnf debuginfo-install#0 0x00007f2435bd1606 in g_mutex_unlock () from /lib64/libglib-2.0.so.0
No symbol table info available.
#1 0x00007f2435bd163a in g_cond_wait () from /lib64/libglib-2.0.so.0
No symbol table info available.
#2 0x00007f2435c426e7 in g_thread_pool_start_thread.constprop () from /lib64/libglib-2.0.so.0
No symbol table info available.
#3 0x00007f2435c429e3 in g_thread_pool_push () from /lib64/libglib-2.0.so.0
No symbol table info available.
#4 0x0000562af956ecea in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/createrepo_c-0.15.6-2.fc32.x86_64/src/createrepo_c.c:1351
cmd_options = <optimized out>
ret = <optimized out>
tmp_err = 0x0
exit_val = 0
in_dir = <optimized out>
in_repo = 0x562afa38bb80 "/home/tkloczko/rpmbuild/g2v/SRPMS/repodata/"
out_dir = 0x562afa38b290 "/home/tkloczko/rpmbuild/g2v/SRPMS/"
out_repo = 0x562afa38bbc0 "/home/tkloczko/rpmbuild/g2v/SRPMS/repodata/"
tmp_out_repo = 0x562afa38b350 "/home/tkloczko/rpmbuild/g2v/SRPMS/.repodata/"
lock_dir = 0x562afa38b310 "/home/tkloczko/rpmbuild/g2v/SRPMS/.repodata/"
output_pkg_list = <optimized out>
user_data = {pri_f = 0x562afa3ddb60, fil_f = 0x562afa3ddca0, oth_f = 0x562afa3ddde0, pri_db = 0x562afa3e4d70, fil_db = 0x562afa4ae400, oth_db = 0x562afa4e7300, pri_zck = 0x0, fil_zck = 0x0,
oth_zck = 0x0, prev_srpm = 0x0, cur_srpm = 0x0, changelog_limit = 10, location_base = 0x0, repodir_name_len = 34, checksum_type_str = 0x7f2435cf6113 "sha256",
checksum_type = CR_CHECKSUM_SHA256, checksum_cachedir = 0x0, skip_symlinks = 0, task_count = 1193, package_count = 1193, skip_stat = 0, old_metadata = 0x0, mutex_old_md = {p = 0x0, i = {0,
0}}, mutex_pri = {p = 0x0, i = {0, 0}}, mutex_fil = {p = 0x0, i = {0, 0}}, mutex_oth = {p = 0x0, i = {0, 0}}, cond_pri = {p = 0x0, i = {1193, 0}}, cond_fil = {p = 0x0, i = {1193, 0}},
cond_oth = {p = 0x0, i = {1193, 0}}, id_pri = 1193, id_fil = 1193, id_oth = 1193, buffer = 0x562afa436ec0, mutex_buffer = {p = 0x0, i = {0, 0}}, deltas = 0, max_delta_rpm_size = 100000000,
mutex_deltatargetpackages = {p = 0x0, i = {0, 0}}, deltatargetpackages = 0x0, cut_dirs = 0, location_prefix = 0x0, had_errors = 0, output_pkg_list = 0x0, mutex_output_pkg_list = {p = 0x0,
i = {0, 0}}}
pool = <optimized out>
task_count = <optimized out>
current_pkglist = 0x0
old_metadata_location = 0x0
old_metadata = 0x0
old_metadata_dir = <optimized out>
additional_metadata = 0x0
new_groupfile_metadatum = 0x0
xml_compression_suffix = <optimized out>
sqlite_compression_suffix = 0x7f2435cf6131 ".xz"
prestodelta_compression_suffix = <optimized out>
xml_compression = <optimized out>
sqlite_compression = CR_CW_XZ_COMPRESSION
groupfile_compression = CR_CW_XZ_COMPRESSION
prestodelta_compression = CR_CW_XZ_COMPRESSION
pri_cr_file = <optimized out>
fil_cr_file = 0x562afa3ddca0
oth_cr_file = 0x562afa3ddde0
pri_stat = 0x562afa3dda90
fil_stat = 0x562afa3ddb90
oth_stat = 0x562afa3ddcd0
pri_xml_filename = <optimized out>
fil_xml_filename = 0x562afa3dd9f0 "/home/tkloczko/rpmbuild/g2v/SRPMS/.repodata//filelists.xml.gz"
oth_xml_filename = 0x562afa3dda40 "/home/tkloczko/rpmbuild/g2v/SRPMS/.repodata//other.xml.gz"
pri_db_filename = 0x562afa3dde10 "/home/tkloczko/rpmbuild/g2v/SRPMS/.repodata//primary.sqlite"
fil_db_filename = 0x562afa3dde60 "/home/tkloczko/rpmbuild/g2v/SRPMS/.repodata//filelists.sqlite"
oth_db_filename = 0x562afa3ddeb0 "/home/tkloczko/rpmbuild/g2v/SRPMS/.repodata//other.sqlite"
pri_db = 0x562afa3e4d70
fil_db = 0x562afa4ae400
oth_db = 0x562afa4e7300
pri_zck_filename = 0x0
fil_zck_filename = 0x0
oth_zck_filename = 0x0
pri_cr_zck = <optimized out>
fil_cr_zck = <optimized out>
--Type <RET> for more, q to quit, c to continue without paging--
oth_cr_zck = <optimized out>
pri_zck_stat = 0x0
fil_zck_stat = 0x0
oth_zck_stat = 0x0
pri_dict = 0x0
fil_dict = 0x0
oth_dict = 0x0
pri_dict_size = 0
fil_dict_size = 0
oth_dict_size = 0
pri_dict_file = 0x0
fil_dict_file = <optimized out>
oth_dict_file = <optimized out>
repomd_obj = 0x562afa3e5d60
pri_xml_rec = <optimized out>
fil_xml_rec = 0x562afa4e89f0
oth_xml_rec = 0x562afa4e8a80
pri_db_rec = 0x0
fil_db_rec = 0x0
oth_db_rec = 0x0
pri_zck_rec = 0x0
fil_zck_rec = 0x0
oth_zck_rec = 0x0
prestodelta_rec = 0x0
prestodelta_zck_rec = 0x0
additional_metadata_rec = 0x0
fill_pool = 0x562afa38f630
pri_fill_task = 0x562afa3df8b0
fil_fill_task = 0x562afa3df940
oth_fill_task = <optimized out>
elem = <optimized out>
i = <optimized out>
repomd_xml = <optimized out>
repomd_path = <optimized out>
frepomd = <optimized out>
retentiontype = <optimized out>
retentionval = <optimized out>
old_repodata_renamed = <optimized out>
new_mask = {__val = {39, 139793498960050, 0, 0, 41, 0, 2, 0, 0, 640, 32, 16, 139793498477360, 10, 249108103209, 0}}
old_mask = {__val = {0, 139793498956338, 0, 0, 94742586609664, 18446744073709547520, 4096, 0, 6, 9577321768600786, 0, 139793500236256, 640, 18446744073709551536, 656, 41}}
tmp_dirname = <optimized out>
old_repodata_path = <optimized out>
(gdb)
Edited by Philip Withnall