> do you have a project we can run and reproduce?

The following Python command can be used to reproduce the error:

  python3 -c 'import os,sys;os.sendfile(sys.stdout.fileno(),
os.open("/proc/uptime", os.O_RDONLY), 0, 4096)'

Replace '/proc/uptime' with any other file you like. On success the
content will be printed to STDOUT. It will fail after running a broken
version of `make` with:

  OSError: [Errno 22] Invalid argument


> The issue is a change to `make` in LTS Ubuntu will affect every single 
> project (as all debian builds utilize make).

I did a private rebuild with the patches `make` of the 1635 source packages 
which I have currently installed: non failed to build because of that change, 
only due to other FTBFS issues.
No: it will affect the **build** of every project, but not the projects 
themselves: There will be no change and the built-result will be bit-identical 
to the previous build — as long as the project builds reproducible.

> we've been running that version of make in automated builds in Ubuntu
for 2 LTS and many interims and haven't run into the behaviour.

Probably because your auto-builders redirect the output of `dpkg-buildpackage` 
(and as such any recursively called `make`) to either a log-file or some 
short-lived pseudo-TTY (PTY):
1. for files adding `O_APPEND` is totally desirable as multiple `make` running 
in parallel might otherwise overwrite each others output - that path is not 
changed by the above mention patch.
2. with short-lived PTYs you will not notice any difference as they are kind of 
O_APPEND anyway by default: They are not seek()able and the Linux kernel has to 
serialize the output from multiple processes anyway.

But on an *interactively* PTY like that of any graphical console you do
notice the problem: After running the broken version of `make` some
programs — like the above one-liner — will fail. The only option is to
close the terminal windows and to open a new one, loosing the current
working directory and any environment variables set so far.

> if we have a project utilizing make where this happens, and can easily
demonstrate things, and demonstrate across many projects that there is
no possibility of regression from applying the patch, we can consider an
SRU.

Please look at the patch:
1. It has been applied upstream only 3 mont4hs after the release of 4.3
2. It is part of GNU make 4.3.91 and remains mostly unchanged since then: 
4da2055a10bd only moved the code to `src/posixos.c` and 242603fa46bb even added 
resetting O_APPEND for regular files.
3. Debian and Ubuntu both have used 4.4 to rebuild their packages using the 
fixed version successfully.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2133803

Title:
  Missing patch 80b90b7866a8 [SV 57967] Only set APPEND mode for regular
  files.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/make-dfsg/+bug/2133803/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to