public function test()
{
$hostname = 'localhost:2223';
$client = new \Proto\BlacklistClient($hostname, [
'credentials' => \Grpc\ChannelCredentials::createInsecure(),
]);
$request = new \Proto\MobileRequest();
$request->setMobiles([
13688889996,
13688889997,);
dump($client);
$resp = $client->WriteWhite($request)->wait();
dump($resp);
}
Cli模式下, 直接跑的代码
<?php
include 'vendor/autoload.php';
$hostname = 'localhost:2223';
$client = new \Proto\BlacklistClient($hostname, [
'credentials' => \Grpc\ChannelCredentials::createInsecure(),
]);
$request = new \Proto\MobileRequest();
$request->setMobiles([
13688889996,
13688889997,]);
list($response, $status) = $client->WriteBlack($request)->wait();
if ($status->code === \Grpc\STATUS_OK) {
dump($response);
}
Blacklist write b:{1561883092,1561883093,15618830982,15618830983}, w:{1361883092,1361883093,13618830982,13618830983}.
^ Proto\BlacklistClient^ {#380
-hostname: "localhost:2223"
-hostname_override: null
-channel: Grpc\Channel {#383}
-call_invoker: Grpc\DefaultCallInvoker^ {#386}
-update_metadata: null
}
[mutex.cc : 2417] RAW: Check w->waitp->cond == nullptr failed: Mutex::Fer while waiting on Condition
worker[webman:11067] exit with status 134
这里写具体的系统环境相关信息
操作系统是Centos8, PHP版本7.4, PHP grpc扩展是1.6.2.
可能是触发了php或者grpc扩展的某个bug,换个php版本试或者grpc扩展版本试下
感觉还是和eventloop那块有关系. PHP换了没用.
我也遇到了此问题,请问您是怎么解决的