Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 856373 - sys-fs/zfs-2.1.5-r2 certain CFLAGS on gcc 12 cause segfaults in zfs send
Summary: sys-fs/zfs-2.1.5-r2 certain CFLAGS on gcc 12 cause segfaults in zfs send
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-12 915000
  Show dependency tree
 
Reported: 2022-07-04 10:49 UTC by Bartosz Stebel
Modified: 2023-11-12 07:29 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bartosz Stebel 2022-07-04 10:49:42 UTC
First reported upstream in: https://github.com/openzfs/zfs/issues/13620
It didn't happen before (with the same cflags), I suspect it's either gcc (upgraded from 11 to 12.1.1_p20220625 recently), or zfs itself.
I normally have CFLAGS="-O2 -march=native -pipe -ggdb", native should be equivalent to znver2 for me.
Removing the -march fixed it, so perhaps we should force that in the ebuild until it's fixed upstream.

Reproducible: Always
Comment 1 Larry the Git Cow gentoo-dev 2022-07-04 17:30:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1cbf3fbc336adfdcd122da5b0989c2993de358dc

commit 1cbf3fbc336adfdcd122da5b0989c2993de358dc
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-04 17:29:28 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-04 17:29:30 +0000

    sys-fs/zfs: force -fno-tree-vectorize
    
    Workaround issue with GCC 12 until solved upstream. Segfault
    occurs w/ 'zfs send' otherwise (and very possibly other commands).
    
    Bug: https://github.com/openzfs/zfs/issues/13605
    Bug: https://github.com/openzfs/zfs/issues/13620
    Closes: https://bugs.gentoo.org/856373
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-fs/zfs/{zfs-2.1.5-r2.ebuild => zfs-2.1.5-r3.ebuild} | 7 +++++++
 sys-fs/zfs/zfs-9999.ebuild                              | 7 +++++++
 2 files changed, 14 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2022-07-04 17:34:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=968e991786b0256ad2ec989e699a2b07e5c1c8da

commit 968e991786b0256ad2ec989e699a2b07e5c1c8da
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-07-04 17:33:52 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-07-04 17:34:21 +0000

    sys-fs/zfs: force -fno-tree-vectorize (backport for older versions)
    
    Workaround issue with GCC 12 until solved upstream. Segfault
    occurs w/ 'zfs send' otherwise (and very possibly other commands).
    
    Let's backport for older versions to be safe after discussion
    w/ gyakovlev.
    
    Bug: https://github.com/openzfs/zfs/issues/13605
    Bug: https://github.com/openzfs/zfs/issues/13620
    Closes: https://bugs.gentoo.org/856373
    See: 1cbf3fbc336adfdcd122da5b0989c2993de358dc
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-fs/zfs/{zfs-2.0.7.ebuild => zfs-2.0.7-r1.ebuild} | 7 +++++++
 sys-fs/zfs/{zfs-2.1.4.ebuild => zfs-2.1.4-r1.ebuild} | 7 +++++++
 2 files changed, 14 insertions(+)