Bug 2506505

Summary: perl-grpc-xs-0.38-12.fc45 randomly FTBFS on i686: t/15-xs_end_to_end.t segfaults
Product: [Fedora] Fedora Reporter: Jitka Plesnikova <jplesnik>
Component: perl-grpc-xsAssignee: Petr Pisar <ppisar>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: perl-maint, ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: perl-grpc-xs-0.38-13.fc45 perl-grpc-xs-0.38-11.fc44 perl-grpc-xs-0.38-10.fc43 Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2026-07-24 12:14:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jitka Plesnikova 2026-07-23 15:38:40 UTC
During Perl 5.44 rebuild, build of perl-grpc-xs failed on architecture i386 with error:

t/15-xs_end_to_end.t .......... 
Failed 38/82 subtests 
Expected hash for create_metadata_array() args at t/16-xs_secure_end_to_end.t line 270.
t/16-xs_secure_end_to_end.t ... ok
t/17-fork_friendliness.t ...... ok
Test Summary Report
-------------------
t/15-xs_end_to_end.t        (Wstat: 139 (Signal: SEGV, dumped core) Tests: 44 Failed: 0)
  Non-zero wait status: 139

Link to build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=148180898

Reproducible: Always

Comment 1 Petr Pisar 2026-07-24 07:32:11 UTC
This also happens in plain Fedora 45 with an old perl (a scratch build <https://koji.fedoraproject.org/koji/taskinfo?taskID=148237086>).

Comment 2 Petr Pisar 2026-07-24 08:43:34 UTC
The crash is random. I recommend you retrying the build.

Comment 3 Petr Pisar 2026-07-24 12:14:36 UTC
When debugging this issue I found and fixed two bugs exhibiting in the t/15-xs_end_to_end.t test.

Now I got to an i686 system with a debugger and I confirm its was the same bug:

Thread 1 "perl" received signal SIGSEGV, Segmentation fault.                                                                                                                                                      
0xf7e1f315 in Perl_hv_common () from /lib/libperl.so.5.44                                                                                                                                                         
(gdb) bt                                                                                                                                                                                                          
#0  0xf7e1f315 in Perl_hv_common () from /lib/libperl.so.5.44                                                                                                                                                     
#1  0xf77830b0 in Perl_hv_common_key_len (my_perl=0x56559010, hv=0x56937d90, key=0xf77771ae "flags", klen_i32=5, action=32, val=0x0, hash=0) at /usr/lib/perl5/CORE/inline.h:314                                  
#2  XS_Grpc__XS__Call_startBatch (my_perl=<optimized out>, cv=<optimized out>) at ./ext/call.xs:129                                                                                                               
#3  0xf7e9ec5b in Perl_pp_entersub () from /lib/libperl.so.5.44                                                                                                                                                   
#4  0xf7f31f99 in Perl_runops_standard () from /lib/libperl.so.5.44                                                                                                                                               
#5  0xf7de6a31 in perl_run () from /lib/libperl.so.5.44                                                                                                                                                           
#6  0x56556298 in main () 

                                                                                                                                                                                        ./ext/call.xs:129 was this:

        case GRPC_OP_SEND_MESSAGE:
          value = SvRV(value);
          if (SvTYPE(value)!=SVt_PVHV) {
            croak("Expected a hash for send message");
            goto cleanup;
          }
          // ops[op_num].flags = hash->{flags} & GRPC_WRITE_USED_MASK;// int
→         SV **flags = hv_fetchs((HV*)value, "flags", 0);

As you an see, SvRV(value) was called without checking that it is a Perl reference (SvROK(value)). That is what my patch fixes.

Comment 4 Fedora Update System 2026-07-27 10:59:06 UTC
FEDORA-2026-88f94ff231 (perl-grpc-xs-0.38-11.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-88f94ff231

Comment 5 Fedora Update System 2026-07-27 10:59:17 UTC
FEDORA-2026-281ea78e96 (perl-grpc-xs-0.38-10.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-281ea78e96

Comment 6 Fedora Update System 2026-07-28 01:35:50 UTC
FEDORA-2026-88f94ff231 has been pushed to the Fedora 44 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-88f94ff231`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-88f94ff231

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

Comment 7 Fedora Update System 2026-07-28 01:57:33 UTC
FEDORA-2026-281ea78e96 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-281ea78e96`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-281ea78e96

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

Comment 8 Fedora Update System 2026-08-05 00:56:55 UTC
FEDORA-2026-88f94ff231 (perl-grpc-xs-0.38-11.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2026-08-05 01:10:33 UTC
FEDORA-2026-281ea78e96 (perl-grpc-xs-0.38-10.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.