bugmake - Bugs: bug #63287, Only use open with O_TMPFILE when...

 
 

bug #63287: Only use open with O_TMPFILE when supported.

Submitter:  Dmitry Goncharov <dgoncharov>
Submitted:  Sat 29 Oct 2022 12:40:40 AM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  4.4 Operating System:  POSIX-Based
Fixed Release:  4.4 Triage Status:  Small Effort
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 29 Oct 2022 03:09:11 PM UTC, comment #3: 

An autoconf macro isn't going to work for this.  Autoconf macros can only be used for tests that are definitive at build time, and this detection is based on which filesystem you happen to be using and that is very much a RUNTIME decision; someone could be building GNU make to install into their GNU/Linux distribution and on the build system TMPDIR has O_TMPFILE working fine for TMPDIR but that doesn't mean anything for the filesystems that the various users will be using with TMPDIR at runtime.

I have installed a change where after O_TMPFILE fails once, we don't retry it again for that instance of make.  So we should see this debug message only once per instance of make.

Thanks for noticing this!

Paul D. Smith <psmith>
Group administrator
Sat 29 Oct 2022 01:01:05 AM UTC, comment #2: 

This failure gets especially annoying when make is building multiple targets, because make keeps bumping into it.


$ cat makefile
all: 1.x 2.x 3.x 4.x 5.x; $(info $@)
%.x:; $(info $@)
$
$
$ ~/src/gmake/make/m64/make -Orecurse --debug=b
GNU Make 4.3.92
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating makefiles....
Updating goal targets....
 File 'all' does not exist.
   File '1.x' does not exist.
  Must remake target '1.x'.
Cannot open '/tmp' with O_TMPFILE: Operation not supported.
1.x
  Successfully remade target file '1.x'.
   File '2.x' does not exist.
  Must remake target '2.x'.
Cannot open '/tmp' with O_TMPFILE: Operation not supported.
2.x
  Successfully remade target file '2.x'.
   File '3.x' does not exist.
  Must remake target '3.x'.
Cannot open '/tmp' with O_TMPFILE: Operation not supported.
3.x
  Successfully remade target file '3.x'.
   File '4.x' does not exist.
  Must remake target '4.x'.
Cannot open '/tmp' with O_TMPFILE: Operation not supported.
4.x
  Successfully remade target file '4.x'.
   File '5.x' does not exist.
  Must remake target '5.x'.
Cannot open '/tmp' with O_TMPFILE: Operation not supported.
5.x
  Successfully remade target file '5.x'.
Must remake target 'all'.
Cannot open '/tmp' with O_TMPFILE: Operation not supported.
all
Successfully remade target file 'all'.
make: 'all' is up to date.


Dmitry Goncharov <dgoncharov>
Sat 29 Oct 2022 12:47:44 AM UTC, comment #1: 

This patch adds a configure check to detect whether O_TMPFILE is supported by the filesystem/kernel.
The goal is to avoid doomed syscalls and related failure logging. Users tend to freak out on failure logging.

Dmitry Goncharov <dgoncharov>
Sat 29 Oct 2022 12:40:40 AM UTC, original submission:  

.

Dmitry Goncharov <dgoncharov>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #53919:  sv63287.diff added by dgoncharov (2KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)
  • -email is unavailable- added by dgoncharov (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-10-31 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Component VersionNone 4.4
        Fixed ReleaseNone 4.4
        Triage StatusNone Small Effort
    2022-10-29 dgoncharov Attached File- Added sv63287.diff, #53919

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code