Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 939813 - dev-util/ostree - sys-apps/flatpak crashes with net-misc/curl-8.10.1
Summary: dev-util/ostree - sys-apps/flatpak crashes with net-misc/curl-8.10.1
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Zac Medico
URL:
Whiteboard:
Keywords: PATCH, PullRequest
: 939893 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-09-18 11:47 UTC by Luigi 'Comio' Mantellini
Modified: 2024-09-20 08:52 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luigi 'Comio' Mantellini 2024-09-18 11:47:50 UTC
Using last curl 8.10.1 I faced ostree crashes like this:

0x00007ffff4ca2afb in pthread_kill () from /usr/lib64/libc.so.6
(gdb) bt
#0  0x00007ffff4ca2afb in pthread_kill () at /usr/lib64/libc.so.6
#1  0x00007ffff4c46096 in raise () at /usr/lib64/libc.so.6
#2  0x00007ffff4c298fa in abort () at /usr/lib64/libc.so.6
#3  0x00007ffff4357e65 in ??? () at /usr/lib64/libglib-2.0.so.0
#4  0x00007ffff43bf62e in g_assertion_message_expr () at /usr/lib64/libglib-2.0.so.0
#5  0x00007fffcabaa919 in ??? () at /usr/lib64/libostree-1.so.1
#6  0x00007ffff0fd5041 in ??? () at /usr/lib64/libcurl.so.4
#7  0x00007ffff0f36395 in ??? () at /usr/lib64/libcurl.so.4
#8  0x00007ffff0f37bbd in ??? () at /usr/lib64/libcurl.so.4
#9  0x00007ffff0fb0673 in ??? () at /usr/lib64/libcurl.so.4
#10 0x00007ffff0f3690d in ??? () at /usr/lib64/libcurl.so.4
#11 0x00007ffff0f2bddd in ??? () at /usr/lib64/libcurl.so.4
#12 0x00007ffff0f3b7fa in ??? () at /usr/lib64/libcurl.so.4
#13 0x00007ffff0f3c5a4 in ??? () at /usr/lib64/libcurl.so.4
#14 0x00007ffff0f85bc9 in curl_multi_cleanup () at /usr/lib64/libcurl.so.4
#15 0x00007fffcabaa1c9 in ??? () at /usr/lib64/libostree-1.so.1
#16 0x00007ffff36bc33b in g_object_unref () at /usr/lib64/libgobject-2.0.so.0
#17 0x00007fffcab6a21f in ostree_repo_pull_with_options () at /usr/lib64/libostree-1.so.1
#18 0x00007fffcbf98bb7 in ??? () at /usr/lib64/libflatpak.so.0
#19 0x00007fffcbf5e3b6 in flatpak_installation_update_appstream_full_sync () at /usr/lib64/libflatpak.so.0
#20 0x00007fffd00962fd in ??? () at /usr/lib64/qt6/plugins/discover/flatpak-backend.so
#21 0x00007ffff544acdd in ??? () at /usr/lib64/libQt6Core.so.6
#22 0x00007ffff4ca0c5a in ??? () at /usr/lib64/libc.so.6
#23 0x00007ffff4d2186c in ??? () at /usr/lib64/libc.so.6
(gdb) quit
A debugging session is active.


(Sorry, I don't have symbols).

Rollback cur to 8.9.1-r1 solves the issue.

Reproducible: Always

Steps to Reproduce:
1. Install net-misc/curl-8.10.1
2. flatpak update

Actual Results:  
Crash on curl_multi_cleanup() call.

Expected Results:  
flatpak should download the updates.

curl is called by ostree lib.
Comment 1 Luigi 'Comio' Mantellini 2024-09-18 12:07:22 UTC
a better backtrace:

#0  0x00007ffff7269afb in pthread_kill () at /usr/lib64/libc.so.6
#1  0x00007ffff720d096 in raise () at /usr/lib64/libc.so.6
#2  0x00007ffff71f08fa in abort () at /usr/lib64/libc.so.6
#3  0x00007ffff73e5e65 in ??? () at /usr/lib64/libglib-2.0.so.0
#4  0x00007ffff744d62e in g_assertion_message_expr () at /usr/lib64/libglib-2.0.so.0
#5  0x00007ffff7be6d02 in sock_cb (easy=0x555555b95f20, s=144, what=4, cbp=0x555555b95bd0, sockp=0x0) at src/libostree/ostree-fetcher-curl.c:534
#6  0x00007ffff7a4136b in Curl_multi_closed (data=0x555555b95f20, s=144) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/multi.c:3035
#7  0x00007ffff79de90f in socket_close (data=0x555555b95f20, conn=0x555555a0ffd0, use_callback=1, sock=144) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/cf-socket.c:424
#8  0x00007ffff79df96a in cf_socket_close (cf=0x555555bd2d30, data=0x555555b95f20) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/cf-socket.c:1005
#9  0x00007ffff79ea83f in cf_he_close (cf=0x555555bd2b50, data=0x555555b95f20) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/connect.c:1004
#10 0x00007ffff7a90991 in ssl_cf_close (cf=0x555555bd2dd0, data=0x555555b95f20) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/vtls/vtls.c:1666
#11 0x00007ffff79eb4c5 in cf_setup_close (cf=0x555555bd24b0, data=0x555555b95f20) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/connect.c:1359
#12 0x00007ffff7a271a7 in cf_h2_close (cf=0x555555a0a5b0, data=0x555555b95f20) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/http2.c:2497
#13 0x00007ffff79ddd9f in cf_hc_close (cf=0x555555a10a80, data=0x555555b95f20) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/cf-https-connect.c:496
#14 0x00007ffff79e2f4b in Curl_conn_close (data=0x555555b95f20, index=0) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/cfilters.c:180
#15 0x00007ffff79e758b in cpool_close_and_destroy (cpool=0x555555b95e18, conn=0x555555a0ffd0, data=0x555555b95f20, do_shutdown=false) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/conncache.c:1063
#16 0x00007ffff79e6459 in cpool_shutdown_discard_all (cpool=0x555555b95e18) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/conncache.c:641
#17 0x00007ffff79e7a71 in cpool_shutdown_all (cpool=0x555555b95e18, data=0x555555b95f20, timeout_ms=0) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/conncache.c:1195
#18 0x00007ffff79e6673 in cpool_close_and_destroy_all (cpool=0x555555b95e18) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/conncache.c:679
#19 0x00007ffff79e53e3 in Curl_cpool_destroy (cpool=0x555555b95e18) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/conncache.c:189
#20 0x00007ffff7a40bc4 in curl_multi_cleanup (multi=0x555555b95c90) at /usr/src/debug/net-misc/curl-8.10.1/curl-8.10.1/lib/multi.c:2758
#21 0x00007ffff7be5a32 in _ostree_fetcher_finalize (object=0x555555b95bd0) at src/libostree/ostree-fetcher-curl.c:183
#22 0x00007ffff752533b in g_object_unref () at /usr/lib64/libgobject-2.0.so.0
#23 0x00007ffff7b7e5ce in reinitialize_fetcher (pull_data=0x7fffffffc600, remote_name=0x5555558c0280 "flathub", error=0x7fffffffcf10) at src/libostree/ostree-repo-pull.c:3235
#24 0x00007ffff7b830e6 in ostree_repo_pull_with_options (self=0x555555b93bf0, remote_name_or_baseurl=0x5555558c0280 "flathub", options=0x555555a17a80, progress=0x555555991470, cancellable=0x0, error=0x7fffffffcf10)
    at src/libostree/ostree-repo-pull.c:4655
#25 0x00005555555fd35e in repo_pull
    (self=0x555555b93bf0, state=0x555555a57c00, dirs_to_pull=0x0, ref_to_fetch=0x555555b909b0 "runtime/org.telegram.desktop.webview/x86_64/stable", rev_to_fetch=0x5555559e1770 "226c3a01418fccb84578f5acca50adc30826d2da87c1c43edb2207dc7f1392ef", sideload_repo=0x0, token=0x0, flatpak_flags=(FLATPAK_PULL_FLAGS_DOWNLOAD_EXTRA_DATA | FLATPAK_PULL_FLAGS_SIDELOAD_EXTRA_DATA), flags=OSTREE_REPO_PULL_FLAGS_BAREUSERONLY_FILES, progress=0x5555559cb2e0, cancellable=0x0, error=0x7fffffffcf10) at common/flatpak-dir.c:5460
#26 0x00005555555ff97f in flatpak_dir_pull
    (self=0x5555558c1950, state=0x555555a57c00, ref=0x555555b909b0 "runtime/org.telegram.desktop.webview/x86_64/stable", opt_rev=0x555555a0be50 "226c3a01418fccb84578f5acca50adc30826d2da87c1c43edb2207dc7f1392ef", subpaths=0x7fffffffce20, sideload_repo=0x0, require_metadata=0x5555559c0860, token=0x0, repo=0x555555b93bf0, flatpak_flags=(FLATPAK_PULL_FLAGS_DOWNLOAD_EXTRA_DATA | FLATPAK_PULL_FLAGS_SIDELOAD_EXTRA_DATA), flags=OSTREE_REPO_PULL_FLAGS_NONE, progress=0x5555559cb2e0, cancellable=0x0, error=0x7fffffffcf10) at common/flatpak-dir.c:6058
#27 0x000055555560d248 in flatpak_dir_install
    (self=0x5555558c1950, no_pull=0, no_deploy=0, no_static_deltas=0, reinstall=0, app_hint=1, pin_on_deploy=0, state=0x555555a57c00, ref=0x555555b90990, opt_commit=0x555555a0be50 "226c3a01418fccb84578f5acca50adc30826d2da87c1c43edb2207dc7f1392ef", opt_subpaths=0x0, opt_previous_ids=0x0, sideload_repo=0x0, require_metadata=0x5555559c0860, token=0x0, progress=0x5555559cb2e0, cancellable=0x0, error=0x7fffffffcf10) at common/flatpak-dir.c:9862
#28 0x000055555566be15 in _run_op_kind
    (self=0x5555558c1760, op=0x55555598c4b0, remote_state=0x555555a57c00, out_needs_prune=0x7fffffffcfb4, out_needs_triggers=0x7fffffffcfb0, out_needs_cache_drop=0x7fffffffcfac, cancellable=0x0, error=0x7fffffffcfd0)
    at common/flatpak-transaction.c:4657
#29 0x000055555566d64c in flatpak_transaction_real_run (self=0x5555558c1760, cancellable=0x0, error=0x7fffffffd348) at common/flatpak-transaction.c:5165
#30 0x00005555555c1527 in flatpak_cli_transaction_run (transaction=0x5555558c1760, cancellable=0x0, error=0x7fffffffd348) at app/flatpak-cli-transaction.c:1642
#31 0x000055555566bbc8 in flatpak_transaction_run (transaction=0x5555558c1760, cancellable=0x0, error=0x7fffffffd348) at common/flatpak-transaction.c:4625
#32 0x0000555555580572 in flatpak_builtin_install (argc=2, argv=0x7fffffffd638, cancellable=0x0, error=0x7fffffffd348) at app/flatpak-builtins-install.c:592
#33 0x0000555555573c72 in flatpak_run (argc=2, argv=0x7fffffffd638, res_error=0x7fffffffd458) at app/flatpak-main.c:859
#34 0x00005555555740f1 in main (argc=3, argv=0x7fffffffd638) at app/flatpak-main.c:964
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-18 12:58:22 UTC
> g_assertion_message_expr () at /usr/lib64/libglib-2.0.so.0

Could we see what the assertion was?
Comment 3 inkflaw 2024-09-18 13:27:08 UTC
Refer to : https://github.com/flatpak/flatpak/issues/5926
Comment 4 Luigi 'Comio' Mantellini 2024-09-18 13:36:28 UTC
Refer to: https://github.com/ostreedev/ostree/issues/3299
Comment 5 Luigi 'Comio' Mantellini 2024-09-18 13:42:59 UTC
Refer to: https://github.com/ostreedev/ostree/issues/3299
Comment 6 Luigi 'Comio' Mantellini 2024-09-18 13:43:40 UTC
(In reply to Sam James from comment #2)
> > g_assertion_message_expr () at /usr/lib64/libglib-2.0.so.0
> 
> Could we see what the assertion was?

OSTree:ERROR:src/libostree/ostree-fetcher-curl.c:534:sock_cb: code should not be reached
Bail out! OSTree:ERROR:src/libostree/ostree-fetcher-curl.c:534:sock_cb: code should not be reached
Comment 7 Luigi 'Comio' Mantellini 2024-09-19 12:48:46 UTC
See this PR: https://github.com/ostreedev/ostree/pull/3307
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-19 20:34:43 UTC
Thanks. Let's pull it in per https://github.com/ostreedev/ostree/pull/3307#issuecomment-2359475163 if it fixes the issue for you?
Comment 9 Michael Cook 2024-09-19 20:40:57 UTC
Seems fixed here.
Comment 10 inkflaw 2024-09-20 02:26:23 UTC
New release fix that https://github.com/ostreedev/ostree/releases/tag/v2024.8
Comment 11 inkflaw 2024-09-20 02:27:20 UTC
(In reply to inkflaw from comment #10)
> New release fix that https://github.com/ostreedev/ostree/releases/tag/v2024.8

I can confirmed.
Comment 12 Larry the Git Cow gentoo-dev 2024-09-20 06:15:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1a6000b2ca54c0f9ab0e8c943e0fa329dcf856d

commit c1a6000b2ca54c0f9ab0e8c943e0fa329dcf856d
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-20 06:14:30 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-20 06:15:13 +0000

    dev-util/ostree: fix crash w/ net-misc/curl-8.10.1
    
    I'll leave the bump to maintainers.
    
    Closes: https://bugs.gentoo.org/939813
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-util/ostree/files/ostree-2024.3-curl.patch |  58 ++++++++++++
 dev-util/ostree/ostree-2024.3-r1.ebuild        | 122 +++++++++++++++++++++++++
 2 files changed, 180 insertions(+)
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-20 08:52:11 UTC
*** Bug 939893 has been marked as a duplicate of this bug. ***