Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Oct 2021 13:58:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 259270] bmake exits with status 0 upon ENOSPC
Message-ID:  <bug-259270-227-Y1Vp8Tip7u@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-259270-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-259270-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D259270

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|New                         |Open

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
I used dtrace to stop the make process when the error occurs:

markj@biggie> sudo dtrace -n 'syscall:::return /errno =3D=3D
ENOSPC/{raise(SIGSTOP);}' -w

Then
markj@biggie> gdb -q -p $(pgrep make)
Attaching to process 56889
Reading symbols from /usr/bin/make...
Reading symbols from /usr/lib/debug//usr/bin/make.debug...
Reading symbols from /lib/libc.so.7...

warning: the debug information found in "/usr/lib/debug//lib/libc.so.7.debu=
g"
does not match "/lib/libc.so.7" (CRC mismatch).

(No debugging symbols found in /lib/libc.so.7)
Reading symbols from /libexec/ld-elf.so.1...

warning: the debug information found in
"/usr/lib/debug//libexec/ld-elf.so.1.debug" does not match
"/libexec/ld-elf.so.1" (CRC mismatch).

(No debugging symbols found in /libexec/ld-elf.so.1)
[Switching to LWP 101646 of process 56889]
0x00000008011d0faa in _write () from /lib/libc.so.7
(gdb) bt
#0  0x00000008011d0faa in _write () from /lib/libc.so.7
#1  0x00000008011b4307 in ?? () from /lib/libc.so.7
#2  0x00000008011aa57e in fflush () from /lib/libc.so.7
#3  0x0000000001039a5e in ShellWriter_WriteFmt (wr=3D<optimized out>,
fmt=3D0x10286f4 "%s\n",=20
    arg=3D0x8018a0102 "cd /usr/home/markj/src/freebsd;
PATH=3D/sbin:/bin:/usr/sbin:/usr/bin MAKE_CMD=3D\"make\" make -m
/usr/home/markj/src/freebsd/share/mk -f Makefile.inc1  TARGET=3Damd64
TARGET_ARCH=3Damd64  buildkernel") at /root/freebsd/contrib/bmake/job.c:798
#4  JobWriteCommand (job=3D<optimized out>, wr=3D<optimized out>, ln=3D0x80=
190cf00,
ucmd=3D<optimized out>) at /root/freebsd/contrib/bmake/job.c:1010
#5  JobWriteCommands (job=3D<optimized out>, job@entry=3D0x801913fc0) at
/root/freebsd/contrib/bmake/job.c:1048
#6  0x0000000001037985 in JobWriteShellCommands (job=3D0x801913fc0,
gn=3D0x801905f00, out_run=3D<optimized out>) at
/root/freebsd/contrib/bmake/job.c:1646
#7  JobStart (gn=3D<optimized out>, special=3Dfalse) at
/root/freebsd/contrib/bmake/job.c:1725
#8  Job_Make (gn=3Dgn@entry=3D0x801905f00) at
/root/freebsd/contrib/bmake/job.c:2170
#9  0x000000000103f735 in MakeStartJobs () at
/root/freebsd/contrib/bmake/make.c:1028
#10 0x000000000103f4c4 in Make_Run (targs=3Dtargs@entry=3D0x7fffffffdeb0) at
/root/freebsd/contrib/bmake/make.c:1391
#11 0x000000000103ce4c in runTargets () at
/root/freebsd/contrib/bmake/main.c:953
#12 main_Run () at /root/freebsd/contrib/bmake/main.c:1642
#13 main (argc=3D17129376, argv=3D<optimized out>) at
/root/freebsd/contrib/bmake/main.c:1701

So we're writing to the "job file" set up by JobWriteShellCommands(), which
creates a tmpfile and unlinks it.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-259270-227-Y1Vp8Tip7u>