<!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: #666;">
<a href="https://gitlab.com/tgrabiec">Tomasz Grabiec</a> created an issue <a href="https://gitlab.com/gnutls/gnutls/-/issues/1111">#1111</a>:
</p>
<div></div>
<h2 dir="auto">
<a id="user-content-description-of-problem" class="anchor" href="#description-of-problem" aria-hidden="true"></a>Description of problem:</h2>
<p dir="auto">sha256_block_data_order_avx2 doesn't contain .cfi annotations which would provide DWARF debug info needed to backtrace through this function.</p>
<p dir="auto">This breaks with our watchdog code which calls libgcc's _Unwind_Backtrace() from a timer-triggered signal handler.</p>
<p dir="auto">Also, GDB is unable to backtrace when breakpoint is located inside the function:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">#20 <signal handler called></span>
<span id="LC2" class="line" lang="plaintext">#21 0x00007f25e879c16f in sha256_block_data_order_avx2 () from /opt/scylladb/libreloc/libgnutls.so.30</span>
<span id="LC3" class="line" lang="plaintext">Cannot access memory at address 0x382d94f1a063c1cf</span></code></pre>
<p dir="auto">See the fix for a similar issue in openssl: <a href="https://github.com/openssl/openssl/commit/1ef638982757ddc2536a70e6463cf4deca58640f" rel="nofollow noreferrer noopener" target="_blank">https://github.com/openssl/openssl/commit/1ef638982757ddc2536a70e6463cf4deca58640f</a></p>
<h2 dir="auto">
<a id="user-content-version-of-gnutls-used" class="anchor" href="#version-of-gnutls-used" aria-hidden="true"></a>Version of gnutls used:</h2>
<p dir="auto">3.6.14</p>
<h2 dir="auto">
<a id="user-content-distributor-of-gnutls-eg-ubuntu-fedora-rhel" class="anchor" href="#distributor-of-gnutls-eg-ubuntu-fedora-rhel" aria-hidden="true"></a>Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)</h2>
<h2 dir="auto">
<a id="user-content-how-reproducible" class="anchor" href="#how-reproducible" aria-hidden="true"></a>How reproducible:</h2>
<p dir="auto">Steps to Reproduce:</p>
<ul dir="auto">
<li>Add a breakpoint in the middle of sha256_block_data_order_avx2</li>
<li>Trigger invocation of sha256_block_data_order_avx2, e.g. by opening an ssl connection</li>
<li>Invoke the "bt" gdb command</li>
</ul>
<h2 dir="auto">
<a id="user-content-actual-results" class="anchor" href="#actual-results" aria-hidden="true"></a>Actual results:</h2>
<p dir="auto">GDB is unable to backtrace to earlier frames.</p>
<h2 dir="auto">
<a id="user-content-expected-results" class="anchor" href="#expected-results" aria-hidden="true"></a>Expected results:</h2>
<p dir="auto">GDB is able to backtrace to earlier frames.</p>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1111">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/5f89fb22806d73e211d863dcdf6fbc6f/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/1111"}}</script>
</p>
</div>
</body>
</html>