Bug 1923386 - rocksdb: FTBFS in Fedora rawhide/f34
Summary: rocksdb: FTBFS in Fedora rawhide/f34
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: rocksdb
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jonny Heggheim
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F34FTBFS
TreeView+ depends on / blocked
 
Reported: 2021-02-01 16:43 UTC by Fedora Release Engineering
Modified: 2021-03-19 20:02 UTC (History)
5 users (show)

Fixed In Version: rocksdb-6.15.5-1.fc34
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-19 20:02:55 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
build.log (32.00 KB, text/plain)
2021-02-01 16:43 UTC, Fedora Release Engineering
no flags Details
root.log (32.00 KB, text/plain)
2021-02-01 16:43 UTC, Fedora Release Engineering
no flags Details
state.log (969 bytes, text/plain)
2021-02-01 16:43 UTC, Fedora Release Engineering
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 98465 0 P2 ASSIGNED [11 Regression] Bogus -Wstringop-overread with -std=gnu++20 -O2 and std::string::insert 2021-02-09 01:03:48 UTC

Description Fedora Release Engineering 2021-02-01 16:43:05 UTC
rocksdb failed to build from source in Fedora rawhide/f34

https://koji.fedoraproject.org/koji/taskinfo?taskID=60908737


For details on the mass rebuild see:

https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Please fix rocksdb at your earliest convenience and set the bug's status to
ASSIGNED when you start fixing it. If the bug remains in NEW state for 8 weeks,
rocksdb will be orphaned. Before branching of Fedora 35,
rocksdb will be retired, if it still fails to build.

For more details on the FTBFS policy, please visit:
https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/

Comment 1 Fedora Release Engineering 2021-02-01 16:43:07 UTC
Created attachment 1753188 [details]
build.log

file build.log too big, will only attach last 32768 bytes

Comment 2 Fedora Release Engineering 2021-02-01 16:43:09 UTC
Created attachment 1753189 [details]
root.log

file root.log too big, will only attach last 32768 bytes

Comment 3 Fedora Release Engineering 2021-02-01 16:43:10 UTC
Created attachment 1753190 [details]
state.log

Comment 4 Martin Sebor 2021-02-09 01:03:48 UTC
This is an upstream GCC bug tracked in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98465.  It was also reported in bug 1909564.  A patch for it was posted for review on 1/19: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/563862.html

Comment 5 Ben Cotton 2021-02-09 15:49:46 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 6 Fedora Release Engineering 2021-02-14 04:24:24 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 34.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-03-29).

A week before the mass branching of Fedora 35 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 33 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html

Comment 7 Fedora Release Engineering 2021-02-14 04:24:25 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 34.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2021-03-29).

A week before the mass branching of Fedora 35 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 33 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html

Comment 8 Jeff Law 2021-02-22 23:22:40 UTC
This looks like a false positive diagnostic from GCC to me.

GCC tries to detect cases where strncpy is used suspiciously, but it's based on some heuristics and while this code triggers those heuristics, it looks correct to me.

I suggest something like this to silence the diagnostic in this specific case without silencing it in other cases:


diff --git a/util/status.cc b/util/status.cc
index ad948f0..9a310c9 100644
--- a/util/status.cc
+++ b/util/status.cc
@@ -32,8 +32,11 @@ const char* Status::CopyState(const char* state) {
   assert(ret == 0);
   return result;
 #else
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-overflow="
   const size_t cch = std::strlen(state) + 1;  // +1 for the null terminator
   return std::strncpy(new char[cch], state, cch);
+#pragma GCC diagnostic pop
 #endif
 }

Comment 9 Jonny Heggheim 2021-03-04 08:37:39 UTC
(In reply to Jeff Law from comment #8)
> This looks like a false positive diagnostic from GCC to me.
> 
> GCC tries to detect cases where strncpy is used suspiciously, but it's based
> on some heuristics and while this code triggers those heuristics, it looks
> correct to me.
> 
> I suggest something like this to silence the diagnostic in this specific
> case without silencing it in other cases:
> 
> 
> diff --git a/util/status.cc b/util/status.cc
> index ad948f0..9a310c9 100644
> --- a/util/status.cc
> +++ b/util/status.cc
> @@ -32,8 +32,11 @@ const char* Status::CopyState(const char* state) {
>    assert(ret == 0);
>    return result;
>  #else
> +#pragma GCC diagnostic push
> +#pragma GCC diagnostic ignored "-Wstringop-overflow="
>    const size_t cch = std::strlen(state) + 1;  // +1 for the null terminator
>    return std::strncpy(new char[cch], state, cch);
> +#pragma GCC diagnostic pop
>  #endif
>  }

Thanks, I will test this patch

Comment 10 Jonny Heggheim 2021-03-04 09:44:30 UTC
Upgraded to latest version and applied your patch https://koji.fedoraproject.org/koji/taskinfo?taskID=63053663

Comment 11 Fedora Update System 2021-03-04 11:38:51 UTC
FEDORA-2021-838f1448ab has been submitted as an update to Fedora 34. https://bodhi.fedoraproject.org/updates/FEDORA-2021-838f1448ab

Comment 12 Fedora Update System 2021-03-04 16:59:27 UTC
FEDORA-2021-838f1448ab has been pushed to the Fedora 34 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2021-838f1448ab`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2021-838f1448ab

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2021-03-19 20:02:55 UTC
FEDORA-2021-838f1448ab has been pushed to the Fedora 34 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.