Userspace break as a result of missing patch backport

Bug #1813873 reported by md_5 on 2019-01-30
270
This bug affects 56 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
High
Unassigned
Xenial
High
Unassigned
Bionic
High
Unassigned
Cosmic
High
Unassigned

Bug Description

Hi,

The most recent set of Ubuntu kernels applied a variety of tty patches including: https://github.com/torvalds/linux/commit/c96cf923a98d1b094df9f0cf97a83e118817e31b

But have not applied the more recent https://github.com/torvalds/linux/commit/d3736d82e8169768218ee0ef68718875918091a0 patch.

This second patch is required to prevent a rather serious regression where userspace applications reading from stdin can receive EAGAIN when they should not.

I will try to link correspondence from the mailing list archives once they are available, but for now if you have access to the linux-console mailing list you can find discussion under the thread "Userspace break? read from STDIN returns EAGAIN if tty is "touched"".

I would appreciate it if this could be examined soon as it is a regression on userspace.

Thanks
Michael

Good:
4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018

Bad:
4.15.0-44-generic #47-Ubuntu SMP Mon Jan 14 11:26:59 UTC 2019

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
md_5 (md-5) wrote :

See https://marc.info/?t=154883032500001&r=1&w=2 for LKML discussion and replies.

Stefan Bader (smb) wrote :

We will pick the follow-up patch up for the next cycle.

Changed in linux (Ubuntu Xenial):
importance: Undecided → High
Changed in linux (Ubuntu Bionic):
importance: Undecided → High
Changed in linux (Ubuntu Cosmic):
importance: Undecided → High
Stefan Bader (smb) on 2019-01-30
Changed in linux (Ubuntu Xenial):
status: New → Triaged
Changed in linux (Ubuntu Bionic):
status: New → Triaged
Changed in linux (Ubuntu Cosmic):
status: New → Triaged
Changed in linux (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
Seth Forshee (sforshee) on 2019-01-30
Changed in linux (Ubuntu):
status: Triaged → Fix Committed
Changed in linux (Ubuntu Xenial):
status: Triaged → Fix Committed
Changed in linux (Ubuntu Bionic):
status: Triaged → Confirmed
status: Confirmed → Fix Committed
Changed in linux (Ubuntu Cosmic):
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 4.18.0-15.16

---------------
linux (4.18.0-15.16) cosmic; urgency=medium

  * Ubuntu boot failure. 4.18.0-14 boot stalls. (does not boot) (LP: #1814555)
    - Revert "drm/i915/ringbuffer: Delay after EMIT_INVALIDATE for gen4/gen5"

  * Userspace break as a result of missing patch backport (LP: #1813873)
    - tty: Don't hold ldisc lock in tty_reopen() if ldisc present

 -- Stefan Bader <email address hidden> Thu, 07 Feb 2019 11:24:34 +0100

Changed in linux (Ubuntu Cosmic):
status: Fix Committed → Fix Released
status: Fix Committed → Fix Released
Joe Wood (joew60) wrote :

Hi,

Still present in latest i386 Bionic 18.04.02 LTS

Guilherme G. Piccoli (gpiccoli) wrote :

Hi Joe, can you please paste the output of "uname -a" from your system that is presenting this issue?

Thanks in advance

md_5 (md-5) wrote :

No package containing the fix for 18.04 has been released yet, only 18.10.
It is therefore expected that 18.04.X still displays the issue.

Rehan Khamaruddin (rsk02) wrote :

I am running 18.04 with linux-image-generic-hwe-18.04 installed. I can confirm that the issue has been resolved with the latest kernel which is 4.18.0-15-generic.

Great, thanks Rehan!

Robie Basak (racb) on 2019-02-11
tags: added: regression-update
Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-xenial' to 'verification-done-xenial'. If the problem still exists, change the tag 'verification-needed-xenial' to 'verification-failed-xenial'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-xenial
Putatieve Prins (narrenschip2) wrote :

I tried xenial-proposed, but the fix doesn't seem to be available yet. It's still pulling 4.15.0 from xenial-updates (and that one still has the problem).

I double checked that xenial-proposed is properly configured by installing 'linux-generic':
...
Get:24 http://be.archive.ubuntu.com/ubuntu xenial-proposed/main amd64 linux-generic amd64 4.4.0.143.150 [1,786 B]
Get:25 http://be.archive.ubuntu.com/ubuntu xenial-proposed/main amd64 linux-image-generic amd64 4.4.0.143.150 [2,478 B]
...

W.

md_5 (md-5) wrote :

Putatieve,

Seems like you have the bionic HWE installed, so that is why your server is defaulting to 4.15.
Your apt log shows 4.4 downloading so you should be able to manually boot into it from grub...

Personally I'm hoping an update drops to bionic proposed as Xenial was not part of my original testing....

Putatieve Prins (narrenschip2) wrote :

I most definitly do have linux-generic-hwe-16.04 installed. I installed linux-generic to test if xenial-proposed was properly configured, as 'apt-get install -t xenial-proposed linux-genric-hwe-16.04' didn't install anything.

Putatieve Prins (narrenschip2) wrote :

PS: linux-genric-hwe-16.04 is a typo in this post

Putatieve Prins (narrenschip2) wrote :

And I am running ubuntu 16.04

md_5 (md-5) wrote :

Right, the fixed kernel mentioned in -proposed is NOT the 4.15 HWE kernel, it's the 4.4.0 kernel.

You need to select the correct kernel if you wish to test the fix.

Putatieve Prins (narrenschip2) wrote :

You don't seem to understand what I said: I DO HAVE 4.15.0 installed (linux-generic-hwe-16.04):
https://packages.ubuntu.com/search?keywords=linux-generic-hwe-16.04&searchon=names&suite=xenial-updates&section=all

running 'apt-get install -t xenial-proposed linux-generic-hwe-16.04' does NOT pull any new/updated 4.15.0 kernel from xenial-proposed.

To double check that I configured xenial-proposed correctly, I installed linux-generic, wich DOES have an update waiting (4.4.0-143 in xenial-proposed over 4.4.0-142 from xenial/main):

nubu lobo (nubulobo) wrote :

I'm under unbuntu 16.04 kernel 4.4.0 and the xenial-proposed solved problem reading /dev/tty for me

tags: added: verification-done-xenial
removed: verification-needed-xenial
Putatieve Prins (narrenschip2) wrote :

Of course, the bug/regression only appeared in 4.15.0-45 (4.15.0-43 is fine).

In post #11, Brad Figg specifically asked us to test a fix, released in the 'proposed' repository, ASAP and report back with the result. Otherwise the proposed fix would be dropped.

But on Ubuntu 16.04 (xenial-proposed) the fix is not available (yet?) or am I missing something?

Hi Putatieve, thanks for you attention here. Let me try to clarify what happens here: the issue is present in kernel 4.4.0-142, 4.15.0-45 and 4.18.0-14. The three versions were already released,
but the fix for the regression observed in this LP is present in the new versions that are getting released in this cycle.

For Ubuntu 16.04/Xenial (and Trusty-HWE), the candidate version is: 4.4.0-143. This version is already available through the -proposed pocket, nubu validated that it fixes the issue (thanks nubu!).

For Ubuntu 18.04/Bionic (and Xenial-HWE), the candidate version for kernel 4.15 wasn't released yet, so we can't validate yet. This was the reason you couldn't test - your Ubuntu is configured to use 4.15 series, the called HWE kernel. Given the proposed version of 4.15 series for this cycle wasn't released yet, you couldn't test. You *can* install 4.4.0-143 from -proposed if you want, but you'll need to manually set grub to boot that instead of 4.15 (as per md_5 comment).

Finally, for Ubuntu 18.10/Cosmic, the fix was released in -updates already, in kernel 4.18.0-15, so the -proposed test isn't even necessary, the fix was released normally by now.

Please, let me know if you have questions on Ubuntu kernel cycles in order we can clarify it for you.
Cheers,

Guilherme

Putatieve Prins (narrenschip2) wrote :

Hi Guilherme,

Thanks for your response. I was under the impression that there would also be fix in 'proposed' for Xenial-HWE.

I can confirm that the issue is fixed in 4.4.0-143 (and indeed present in 4.4.0-142).

Best,

W;-)

Hi all.

I'm following your discussion, but I couldn't realize if I can fix or just waiting the fix.

In my case I have two stations with ubuntu 18.04(bionic), both with linux-image-4.15.0-45-generic and linux-image-4.15.0-43-generic.

So, I wait or can I apply somehow the fix it?

All this is very new to me, sorry

Regards,

Samuel

You're welcome Putatieve, thanks for testing the Xenial 4.4.0-143 version!

And you're right, we will have a fix for Xenial-HWE - as soon it is available, you will observe a new message from Brad Figg here, this time adding a tag "verification-needed-bionic".
And then, likely the version for Xenial-HWE will be ready to test.

Notice the "likely" word above: happens that the build process is usually parallel, with Bionic 4.15 and Xenial 4.15~16.04 at same time; but there are small code changes (mostly toolchain related) between Bionic 4.15 and Xenial-HWE, so it may happen that Bionic version is ready before Xenial-HWE. It's likely to be at same time (or with some hours of difference) though.

If you're interested in more knowledge about Ubuntu kernel cycles, I'd like to suggest you this interesting wiki page: https://wiki.ubuntu.com/Kernel/FAQ#Kernel.2FSupport.Ubuntu_Kernel_Release_Schedule
You can check the releases and also, how the HWE works (18.04 kernel 4.15 is present as a long-term supported HWE kernel for 16.04.5 version; same relation we observe between 16.04 and 14.04.5).

Feel free to expose any remaining questions you have - also, your testing when the 4.15 version gets released to -proposed is much appreciated!
Cheers,

Guilherme

On Thu 2019-02-14 (10:46), SAMUEL TEIXEIRA SANTOS wrote:

> In my case I have two stations with ubuntu 18.04(bionic), both with
> linux-image-4.15.0-45-generic and linux-image-4.15.0-43-generic.
>
> So, I wait or can I apply somehow the fix it?

Install linux-image-generic-hwe-18.04

This package has the bug-fix,

--
Ullrich Horlacher Server und Virtualisierung
Rechenzentrum TIK
Universitaet Stuttgart E-Mail: <email address hidden>
Allmandring 30a Tel: ++49-711-68565868
70569 Stuttgart (Germany) WWW: http://www.tik.uni-stuttgart.de/
REF:<email address hidden>

Samuel, for now the suggestion is to keep kernel 4.15.0-43, as it doesn't show the issue reported in this LP.

Soon (probably later today or tomorrow) the new version for 4.15 will show up in -proposed pocket, so you can update to that version for testing purposes, since that version will have the fix for the issue reported here.

Cheers,

Guilherme

Brad Figg (brad-figg) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-bionic
KayNettle (pkn) wrote :

I enabled proposed, did an apt-get update, it got the index file:

Get:9 http://archive.ubuntu.com/ubuntu bionic-proposed InRelease [242 kB]

Then I did an apt-get dist-upgrade and no kernel showed up in the list of pacages to upgrade. What do I need to do to test the new kernel.

Singer Michael (bluelupo) wrote :

Error seems to be fixed. I have made the following solution:

# apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

Login as user/root in the text console (tty) with kernel 4.18.0-15 was possible without any problems.

My system: KDE Neon Useredition

Edgar Hipp (edi9999) wrote :

The kernel in -proposed solves the problem, I've tested it !

I don't know how to add the flag "verification-done-bionic" to this bug though.

Nat Wilson (njwilson23) on 2019-02-16
tags: added: verification-done-bionic
removed: verification-needed-bionic
Rehan Khamaruddin (rsk02) wrote :

I think I may have run into another issue related to the same bug. While the login loop problem appears to have been fixed, the fix does not seem to have cascaded down to other prompts that one may encounter in special circumstances. In my case, I had an external USB drive connected to my server and this happened to have been powered off (physically) when booting. As expected, the system did not complete the boot process and stopped (momentarily) at the "Enter Ctrl-D etc" prompt to allow repair. Well, it just kept going. I was unable to get in at all and eventually just had to physically reset the box and reconnect power to the USB drive. So the looping that used to happen at the console login persists when dropping to the emergency shell. I will be grateful if anyone else can confirm. Just add a spurious entry to fstab and try to reboot.

Edgar Hipp (edi9999) wrote :

Hello, I mistakenly change the status of Bionic to Fix released, I didn't know that I could change something like this since I'm not a maitainer of some sort, I'm just an end user. I tried to cancel the change but I don't have the right to do so.

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released

Hi Edgar, I've changed it back =)
It should be Fix Committed if the patch is present/merged in the kernel, but kernel wasn't released yet. Once it gets released, it'll get changed to Fix Released.

Cheers,

Guilherme

Changed in linux (Ubuntu Bionic):
status: Fix Released → Fix Committed
Lars Behrens (lars-behrens-u) wrote :

Confirming the login loop bug for 18.04.2 with 4.15.0-45-generic
And also confirming the fix in proposed with 4.15.0-46-generic

Confirming the login loop bug for 16.04.5 LTS with 4.4.0-142-generic

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers