<!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/rtburns">Ryan Burns</a> created an issue <a href="https://gitlab.com/gnutls/gnutls/-/issues/1125">#1125</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"><code>init_fds</code> test fails when run inside of a <a href="https://github.com/nix-community/nix-user-chroot" rel="nofollow noreferrer noopener" target="_blank">nix-user-chroot</a> user namespaced environment.</p>
<p dir="auto">Maybe the user namespace changes the way fds are assigned, or occupies some slots so the new ones are not at index 3?</p>
<p dir="auto">I'm also not sure whether this is a property of Linux user namespaces in general, or something that nix-user-chroot is doing in particular.</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">FAIL: init_fds</span>
<span id="LC2" class="line" lang="plaintext">==============</span>
<span id="LC3" class="line" lang="plaintext"></span>
<span id="LC4" class="line" lang="plaintext">doit:59: could not open fd, or OS doesn't assign fds in a serial way (-1)</span>
<span id="LC5" class="line" lang="plaintext">FAIL init_fds (exit status: 1)</span></code></pre>
<p dir="auto">Relevant test section:
<a href="https://gitlab.com/gnutls/gnutls/-/blob/3.6.15/tests/init_fds.c#L56-61">https://gitlab.com/gnutls/gnutls/-/blob/3.6.15/tests/init_fds.c#L56-61</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.15</p>
<p dir="auto">(But should apply to any version with <code>init_fds</code> test, as it hasn't been modified since it was introduced)</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>
<p dir="auto">Nixpkgs unstable x86_64-linux</p>
<h2 dir="auto">
<a id="user-content-to-reproduce" class="anchor" href="#to-reproduce" aria-hidden="true"></a>To reproduce:</h2>
<p dir="auto">Install Nix as a non-root user following nix-user-chroot's <a href="https://github.com/nix-community/nix-user-chroot#installation" rel="nofollow noreferrer noopener" target="_blank">installation instructions</a>.</p>
<p dir="auto">Inside the user chroot, run:</p>
<pre class="code highlight js-syntax-highlight shell" lang="shell" v-pre="true"><code><span id="LC1" class="line" lang="shell">nix-build <span class="s1">'<nixpkgs>'</span> <span class="nt">-A</span> gnutls <span class="nt">--check</span> <span class="c"># check flag forces local rebuild+test</span></span></code></pre>
<h2 dir="auto">
<a id="user-content-expectedactual-behavior" class="anchor" href="#expectedactual-behavior" aria-hidden="true"></a>Expected/Actual Behavior</h2>
<p dir="auto">The build/test command passes on</p>
<ul dir="auto">
<li>NixOS</li>
<li>non-NixOS with multi-user Nix installation (root daemon builders)</li>
<li>non-NixOS with single-user Nix installation (non-root, with user-owned /nix)</li>
</ul>
<p dir="auto">But fails on</p>
<ul dir="auto">
<li>non-NixOS with Nix via nix-user-chroot (non-root, user-owned folder user namespace mounted to /nix)</li>
</ul>
</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/1125">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/f5fb02853f884290354f8e7c9972c022/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/1125"}}</script>
</p>
</div>
</body>
</html>