Open jengelh opened 1 year ago
Looked into this, it seems to be an issue related to curl. I get a similar gdb trace:
#0 0x00007ffff70965b6 in pthread_rwlock_wrlock@GLIBC_2.2.5 () at /lib64/libc.so.6
#1 0x00007ffff69acac9 in CRYPTO_THREAD_write_lock () at /lib64/glibc-hwcaps/x86-64-v3/libcrypto.so.3.1.4
#2 0x00007ffff69d9963 in RAND_get_rand_method () at /lib64/glibc-hwcaps/x86-64-v3/libcrypto.so.3.1.4
#3 0x00007ffff69da896 in RAND_status () at /lib64/glibc-hwcaps/x86-64-v3/libcrypto.so.3.1.4
#4 0x00007ffff6fc3c9c in () at /lib64/libcurl.so.4
#5 0x00007ffff6f7155e in () at /lib64/libcurl.so.4
#6 0x00007ffff6f67f61 in () at /lib64/libcurl.so.4
#7 0x00007ffff6fd6618 in () at /lib64/libcurl.so.4
#8 0x00007ffff6f6dba4 in curl_easy_cleanup () at /lib64/libcurl.so.4
#9 0x00007ffff79d7806 in zypp::media::MediaMultiCurl::~MediaMultiCurl() () at /lib64/libzypp.so.1722
#10 0x00007ffff79d7939 in zypp::media::MediaMultiCurl::~MediaMultiCurl() () at /lib64/libzypp.so.1722
...
My assumption is that as curl_easy_cleanup
is trying to handle SIGPIPE
, which isn't possible as the parent process has already been instructed to terminate.
A solution might be to check for SIGINT
in libzypp before calling the curl function.
My first hypothesis would be that this is a double-free/use-after-free ("static deinitialization fiasco"). Control has entered global_dtors and it looks a bit like libssl got unwound before MediaCurl (but now libcurl tries to once again invoke ssl functions).
I'm having a related issue; hitting Ctrl+C while running eg sudo zypper in krita
will interrupt an install.
It doesn't crash; but trying to run sudo zypper in krita
a second time will result in a nasty error:
System management is locked by the application with pid 25951 (zypper).
Close this application before trying again.
The only way to solve this is to reboot or sudo kill -9 25951
. However, this seems like a glaring problem; passing a SIGINT
to zypper should be handled gracefully; the program should abort the download process and unlock the system.
It's a really bad habit to be killing zypper processes. I'm considering wrapping zypper in an alias that will prevent me from accidentally ctrl+c'ing it.
@sricks We'd need the /var/log/zypper.log
showing the incident in order to see the versions you are using and to judge what happened. Ideally open a bugreport at bugzilla.suse.com (component libzypp) and attach the logfile to the bugreport.
Version: zypper-1.14.61-2.3.x86_64 libzypp-17.31.15-14.5.x86_64 OS: cpe:/o:opensuse:tumbleweed:20230724
SIGINT'ing zypper a few times can sometimes crash it. (At other times, it might hang, etc.)
Backtrace
(libcurl without detailed line info because download.opensuse.org's /debug published a new libcurl4-debuginfo before /tumbleweed actually published the new corresponding libcurl4)