nsinstall: cannot mkdir -p ../../../dist: Value too large for defined data type (EOVERFLOW)
Categories
(NSS :: Build, defect, P3)
Tracking
(Not tracked)
People
(Reporter: zsojka, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.2) Goanna/20170101 PaleMoon/31.4.1
Steps to reproduce:
Originally, I observed this error when building dev-libs/nss-3.79.2 on Gentoo.
Following https://firefox-source-docs.mozilla.org/security/nss/build.html#mozilla-projects-nss-building build instructions (the "make" way):
$ hg clone https://hg.mozilla.org/projects/nspr
$ hg clone https://hg.mozilla.org/projects/nss
$ cd nss
$ hg log
changeset: 16418:9922d79b459d
tag: tip
user: Robert Relyea <rrelyea@redhat.com>
date: Thu Jan 05 17:49:02 2023 +0000
summary: WIP: Bug 1804091 NSS needs to move off of DSA for integrity checks. r=nss-reviewers,jschanck
...
Important to note, my filesystem has inodes ouf of the 32bit range:
$ ls -1i
4483338683 COPYING
4483338603 Makefile
4483338394 automation
4483338741 build.sh
4483338410 cmd
4483339121 coreconf
4483339184 cpputil
4483339272 doc
...
$ make
Actual results:
$ make
coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
no real way to encode these in any sensible way
[...]
make[3]: Entering directory '/repo/nss/lib/base'
../../coreconf/config.mk:138: CPU_ARCH is not x86_64, disabling -mavx2
../../coreconf/nsinstall/Linux6.1_x86_cc_glibc_PTH_DBG.OBJ/nsinstall -R -m 444 baset.h ../../../dist/private/nss
directory creation race: ../../../dist
nsinstall: cannot mkdir -p ../../../dist: Value too large for defined data type
make[3]: *** [../../coreconf/rules.mk:392: ../../../dist/private/nss/baset.h] Aborted
make[3]: Leaving directory '/repo/nss/lib/base'
make[2]: *** [../coreconf/rules.mk:44: base] Error 2
make[2]: Leaving directory '/repo/nss/lib'
make[1]: *** [coreconf/rules.mk:44: lib] Error 2
make[1]: Leaving directory '/repo/nss'
make: *** [manifest.mn:26: prepare_build] Error 2
(gdb) bt
#0 fail (format=0x804b182 "cannot mkdir -p %s") at pathsub.c:37
#1 0x08049a25 in main (argc=2, argv=0xffffcb54) at nsinstall.c:229
(gdb) f 1
#1 0x08049a25 in main (argc=2, argv=0xffffcb54) at nsinstall.c:229
229 fail("cannot mkdir -p %s", todir);
From man 2 stat:
EOVERFLOW
pathname or fd refers to a file whose size, inode number, or number of blocks cannot be represented in, respectively, the types off_t, ino_t, or blkcnt_t. This error can
occur when, for example, an application compiled on a 32-bit platform without -D_FILE_OFFSET_BITS=64 calls stat() on a file whose size exceeds (1<<31)-1 bytes.
Adding "#define _FILE_OFFSET_BITS 64" to nsinstall.c prevents this issue.
A similar issue is triggered when building NSPR, but I will wait with creating a NSPR PR based on results of this one.
Expected results:
Build succeeds.
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Does this bug report mean, you cannot build NSS 32 bit version on a system that has a lot of files in its filesystem?
| Reporter | ||
Comment 2•2 years ago
|
||
(In reply to Kai Engert (:KaiE:) from comment #1)
Does this bug report mean, you cannot build NSS 32 bit version on a system that has a lot of files in its filesystem?
Since inodes are not recycled, that means that the build fails on a filesystem that has had 2**32 files during its lifetime (eg. each new file in /tmp/ allocates a new inode).
| Reporter | ||
Comment 3•2 years ago
|
||
This is till failing as of:
changeset: 16776:a033b7349b6d
tag: tip
user: Natalia Kulatova <nkulatova@mozilla.com>
date: Mon Feb 26 09:47:43 2024 +0000
summary: Bug 1880857 - Updating ACVP docker to rust 1.74 r=nss-reviewers,jschanck
Description
•