Bug 1715774

Summary: perl-grpc-xs-0.31-1.fc31 FTBFS: t/17-fork_friendliness.t does not halt with grpc-1.20.1
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: perl-grpc-xsAssignee: Petr Pisar <ppisar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ppisar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: perl-grpc-xs-0.31-3.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-05 05:38:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Petr Pisar 2019-05-31 08:36:36 UTC
perl-grpc-xs-0.31-1.fc31 fails to build in F31 because tests do not halt:

t/16-xs_secure_end_to_end.t ... ok
^Cmake: *** [Makefile:1018: test_dynamic] Interrupt

Adding debugging messages to t/17-fork_friendliness.t shows:
$ perl -Iblib/{lib,arch} t/17-fork_friendliness.t
Child 13374 started at t/17-fork_friendliness.t line 12.
waiting on 13373 at t/17-fork_friendliness.t line 27.
Child 13373 started at t/17-fork_friendliness.t line 12.
Child 13373: startig a server at t/17-fork_friendliness.t line 17.
Child 13374: startig a server at t/17-fork_friendliness.t line 17.
Child 13373: server returned at t/17-fork_friendliness.t line 19.
Child 13374: server returned at t/17-fork_friendliness.t line 19.
^C

Both childs keepp running with this function stack trace:

#0  0x00007ff4d4e17555 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007ff4d484c503 in gpr_cv_wait () from /lib64/libgrpc.so.7
#2  0x00007ff4d47c9550 in grpc_server_shutdown_and_notify () from /lib64/libgrpc.so.7
#3  0x00007ff4d48cd972 in ?? ()
#4  0x0000564110c872a0 in ?? ()
#5  0xffffffffffffff00 in ?? ()
#6  0x0000564110c872a0 in ?? ()
#7  0x0000000000000000 in ?? ()

This is triggered by upgrading grpc from 1.18.0-2.fc30 to 1.20.1-1.fc31.

Comment 1 Petr Pisar 2019-05-31 12:08:37 UTC
Narrowed down between 1.19.0 and 1.20.0.

Comment 2 Petr Pisar 2019-05-31 12:25:41 UTC
Bisected to this grpc change:

commit cdd698810b99f2be1c67f05c28d031ebddb04cea (HEAD, refs/bisect/bad)
Author: yang-g <yangg@google.com>
Date:   Tue Nov 27 11:46:05 2018 -0800

    Move grpc_shutdown internals to a detached thread

Comment 3 Petr Pisar 2019-06-05 05:38:57 UTC
I removed the test because grpc library in general does not support fork.