From nobody Sun Dec 26 20:23:41 2021 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 918701902E61 for ; Sun, 26 Dec 2021 20:23:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JMXLk26hyz3wW5 for ; Sun, 26 Dec 2021 20:23:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2A07510E6B for ; Sun, 26 Dec 2021 20:23:42 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1BQKNgCl004026 for ; Sun, 26 Dec 2021 20:23:42 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1BQKNgWc004025 for bugs@FreeBSD.org; Sun, 26 Dec 2021 20:23:42 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260708] Opening /dev/urandom fails with errno=31 (EMLINK) Date: Sun, 26 Dec 2021 20:23:41 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: noloader@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640550222; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qgmM/2ZrT7dPAMhCLnNCa0neIZ11gUoMzUzzoa0xeUc=; b=Q1N1qkoN81zDfA6iOBWUfPWdFI0RL4sFwyYaLoSm2zYaMxOhu86bFGag2i3zPYwUMiOMc/ mYBpNGjX/oVt5XvKRlDxGvnwZmJcbrSpNGry6OGB1tWZpTVnWKIKiqiHxovgkAjmKysLTE 4JCqxXEU0NsRPERznVuUmkHqnug0QL+HFVsX82TFXiNOvzCWi8pM6lrAQkeJ6xlCnvtlvn qvxDbA2aPifzv5XJmetdB4aq8bmGN/Tx1qfneEhNWknKnSMOdZUbqvehNedU/9Td6oSsaR bnKra3G6YJ8XyTMvVhUov42S+cXKiIVvwHHO0egfiPREfAwyxORS/R8AUMO8Yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640550222; a=rsa-sha256; cv=none; b=NEJoJumoGJ0w3M/+wVfjDQKu/522ey7NyuzWWBSTn7Cv8cEuGgjM0xqxz7ti5Yw4u+DLQY YaMEwtz/w0TmjGJix868o4csWvdyM4diBDAbjqexLzADaAm83KVyb6lf0720io/WQP/o6Z AO9/7+9iM2v/GCDPWP3xbqA/PDpkTlhFRMZ+wMC0qNsj9wTd2LrT5LogFqoCP8lntL+DRb 907eRGcGPKEDwx1mFQEsT8fb/NYznqUmDjLMSWZlVrSWD7jZ7CKvdHZFqldh9S7Y0V1tr9 BuSbo0DOiq53y5Yqf7oby/U+DfLIofKc2h1GVfmvnhZYF8jLsIDFcEwR/+YV3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260708 Bug ID: 260708 Summary: Opening /dev/urandom fails with errno=3D31 (EMLINK) Product: Base System Version: 12.2-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: noloader@gmail.com Hi Everyone, I seem to be getting a nonsensical error when opening /dev/urandom. The code is: # ifdef O_NOFOLLOW const int flags =3D O_RDONLY|O_NOFOLLOW; # else const int flags =3D O_RDONLY; # endif m_fd =3D open("/dev/urandom", flags); if (m_fd =3D=3D -1) throw OS_RNG_Err("open /dev/urandom"); Under GDB, I am seeing an error of EMLINK: (gdb) p m_fd $2 =3D -1 (gdb) p flags $3 =3D 256 (gdb) p (int)errno $4 =3D 31 (gdb) set output-radix 10 Output radix now set to decimal 10, hex a, octal 12. (gdb) p (int)errno $5 =3D 31 When I lookup the error at https://www.freebsd.org/cgi/man.cgi?query=3Derrno&sektion=3D2&manpath=3Dfre= ebsd-release-ports, it says: Maximum allowable hard links to a single file has been exceeded (limit of 32767 hard links per file). Something sounds a bit off. I am not creating a link, and I doubt there are= 32K links to the file. --=20 You are receiving this mail because: You are the assignee for the bug.=