FS#62730 - [gcc] >= 9.1 compiled kernel corrupts the filesystem if bcache is used

Attached to Project: Arch Linux
Opened by noctavian (noctavian) - Friday, 24 May 2019, 06:52 GMT
Last edited by Antonio Rojas (arojas) - Thursday, 20 June 2019, 08:53 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Andreas Radke (AndyRTR)
Jan Alexander Steffens (heftig)
Bartłomiej Piotrowski (Barthalion)
Architecture All
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

A bug has been reported upstream. If a system is using bcache, updating to a kernel compiled with gcc 9 will lead to filesystem corruption.

Additional info:

The current kernel in the [core] repo, linux 5.1.4.arch1-1, is compiled with gcc 8.3.0-1 according to the .BUILDINFO file.
gcc 9.1.0-1 has recently entered the [testing] repo.

Setting the cache_mode of bcache to none until the bug is fixed upstream might prevent the bug from happening but that would disable bcache.

https://bugzilla.redhat.com/show_bug.cgi?id=1708315
https://marc.info/?t=155759687500004&r=1&w=2
https://bugzilla.kernel.org/show_bug.cgi?id=203573

Steps to reproduce:
This task depends upon

Closed by  Antonio Rojas (arojas)
Thursday, 20 June 2019, 08:53 GMT
Reason for closing:  Fixed
Additional comments about closing:  linux 5.1.10
Comment by Oleksandr Natalenko (post-factum) - Friday, 24 May 2019, 10:06 GMT
Was upstream commit 51b86f9a8d1c tested against this?
Comment by Bastian Beranek (totsilence) - Saturday, 08 June 2019, 15:53 GMT
They identified a bug in bcache which was revealed when gcc 9 generated different assembly than gcc 8. Details here:

https://bugzilla.kernel.org/show_bug.cgi?id=203573

So it looks like a bcache bug after all. The final patch is still pending, but I hope it will arrive soon, so that we can patch the kernel and bring back gcc 9 to testing.
Comment by loqs (loqs) - Thursday, 13 June 2019, 18:37 GMT

Loading...