<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<p class="details" style="font-style: italic; color: #777;">
<a href="https://gitlab.com/stefanberger">Stefan Berger</a> created an issue <a href="https://gitlab.com/gnutls/gnutls/-/issues/1060">#1060</a>:
</p>
<div></div>
<p dir="auto">I am running into a locking issue when building my <code>swtpm</code> with the gnutls version in Rawhide. It's a single-threaded app that seems to run into an uninitialized lock that it doesn't get out of. Here's the backtrace:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">(gdb) thread apply all bt</span>
<span id="LC2" class="line" lang="plaintext"></span>
<span id="LC3" class="line" lang="plaintext">Thread 1 (Thread 0x7fe6d4f54940 (LWP 214219)):</span>
<span id="LC4" class="line" lang="plaintext">#0 0x00007fe6d46e0ea0 in __lll_lock_wait () from /lib64/libpthread.so.0</span>
<span id="LC5" class="line" lang="plaintext">#1 0x00007fe6d46d9763 in pthread_mutex_lock () from /lib64/libpthread.so.0</span>
<span id="LC6" class="line" lang="plaintext">#2 0x00007fe6d55a2f7e in gnutls_system_mutex_lock (priv=<optimized out>) at system/threads.c:119</span>
<span id="LC7" class="line" lang="plaintext">#3 0x00007fe6d55dc674 in _gnutls_pkcs11_privkey_sign (key=0x1d62b80, se=<optimized out>, hash=0x7ffc17f0c040, signature=0x7ffc17f0c0c0, spki_params=0x7ffc17f0c100) at pkcs11_privkey.c:368</span>
<span id="LC8" class="line" lang="plaintext">#4 0x00007fe6d55b054e in privkey_sign_and_hash_data (signer=0x1d62b10, se=0x7fe6d5709f80 <sign_algorithms>, data=<optimized out>, signature=0x7ffc17f0c0c0, params=0x7ffc17f0c100) at privkey.c:1296</span>
<span id="LC9" class="line" lang="plaintext">#5 0x00007fe6d561d215 in _gnutls_x509_pkix_sign (src=0x1e065d0, src_name=src_name@entry=0x7fe6d569c78c "tbsCertificate", dig=GNUTLS_DIG_SHA256, flags=flags@entry=0, issuer=issuer@entry=0x1e02fd0, issuer_key=issuer_key@entry=0x1d62b10) at sign.c:183</span>
<span id="LC10" class="line" lang="plaintext">#6 0x00007fe6d562bfa4 in gnutls_x509_crt_privkey_sign (crt=0x1e032b0, issuer=0x1e02fd0, issuer_key=0x1d62b10, dig=<optimized out>, flags=0) at x509_write.c:1831</span>
<span id="LC11" class="line" lang="plaintext">#7 0x0000000000403f25 in main (argc=<optimized out>, argv=<optimized out>) at ek-cert.c:1661</span>
<span id="LC12" class="line" lang="plaintext">(gdb)</span>
<span id="LC13" class="line" lang="plaintext"></span>
<span id="LC14" class="line" lang="plaintext"># rpm -q -a | grep gnutls</span>
<span id="LC15" class="line" lang="plaintext">gnutls-3.6.14-2.fc33.x86_64</span>
<span id="LC16" class="line" lang="plaintext">gnutls-dane-3.6.14-2.fc33.x86_64</span>
<span id="LC17" class="line" lang="plaintext">gnutls-c++-3.6.14-2.fc33.x86_64</span>
<span id="LC18" class="line" lang="plaintext">gnutls-devel-3.6.14-2.fc33.x86_64</span>
<span id="LC19" class="line" lang="plaintext">gnutls-utils-3.6.14-2.fc33.x86_64</span>
<span id="LC20" class="line" lang="plaintext">gnutls-debugsource-3.6.14-2.fc33.x86_64</span>
<span id="LC21" class="line" lang="plaintext">gnutls-debuginfo-3.6.14-2.fc33.x86_64</span></code></pre>
<p dir="auto">The program I am using is this one here:</p>
<p dir="auto"><a href="https://github.com/stefanberger/swtpm/blob/stable-0.3.0/src/swtpm_cert/ek-cert.c#L1662" rel="nofollow noreferrer noopener" target="_blank">https://github.com/stefanberger/swtpm/blob/stable-0.3.0/src/swtpm_cert/ek-cert.c#L1662</a></p>
<p dir="auto">Cheers!</p>
<p dir="auto">Stefan</p>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1060">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/-/sent_notifications/ea4ca8d5d47270259a54aa1f1659af56/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/-/issues/1060"}}</script>
</p>
</div>
</body>
</html>