Bug 266555 - devel/pecl-swoole dont work mode SWOOLE_PROCESS
Summary: devel/pecl-swoole dont work mode SWOOLE_PROCESS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Vanilla I. Shu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-22 21:17 UTC by Ricardo Sette
Modified: 2022-10-02 03:46 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (vanilla)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ricardo Sette 2022-09-22 21:17:21 UTC
In FreeBSD the mode SWOOLE_PROCESS not working, i am testing in 12.3-RELEASE and 13.1-RELEASE.

This a simple code to test:
<?php

$http = new Swoole\Http\Server("127.0.0.1", 9501, SWOOLE_PROCESS);
$http->on('request', function ($request, $response) {
    $response->end("<h1>Hello Swoole. #".rand(1000, 9999)."</h1>");
});
$http->start();

I init this code in a terminal and call with cURL in another, but requisition is locked and dont return "Hello Swoole XyXy". If modify mode to SWOOLE_BASE call with cURL return correct.

I tested versions of Swoole 4.8.10, 4.8.11, 4.8.12 and 5.0.0, with ports and pkg, but any recent version dont work in FreeBSD with mode SWOOLE_PROCESS.

Currently i runing with sucess with mode SWOOLE_PROCESS, but in an old version Swoole in FreeBSD 12.2-STABLE, Swoole 4.8.9 and PHP 7.3.18.
Comment 1 Ricardo Sette 2022-09-22 21:21:33 UTC
(In reply to Ricardo Sette from comment #0)
*correction* Currently i runing with sucess with mode SWOOLE_PROCESS, but in an old version Swoole in FreeBSD 12.1-STABLE, Swoole 4.4.18 and PHP 7.3.8.
Comment 2 Ricardo Sette 2022-09-23 19:02:28 UTC
The bug started in version 4.8.0 as presented at https://github.com/swoole/swoole-src/issues/4838#issuecomment-1256569191
Comment 3 commit-hook freebsd_committer freebsd_triage 2022-10-02 03:45:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=8205a77b96b7a543a8306b1a5f37ac6ae1ef1103

commit 8205a77b96b7a543a8306b1a5f37ac6ae1ef1103
Author:     Vanilla I. Shu <vanilla@FreeBSD.org>
AuthorDate: 2022-10-02 03:43:40 +0000
Commit:     Vanilla I. Shu <vanilla@FreeBSD.org>
CommitDate: 2022-10-02 03:44:46 +0000

    devel/pecl-swoole: update to 4.8.12, also fix error with SWOOLE_PROCESS.

    PR:             266555
    Reported by:    Ricardo Sette <ricardohfsp at gmail.com>

 devel/pecl-swoole/Makefile                         |  2 +-
 devel/pecl-swoole/distinfo                         |  6 ++--
 .../files/patch-ext-src_php__swoole__private.h     |  4 +--
 .../files/patch-src_server_manager.cc (new)        | 14 +++++++++
 .../files/patch-src_server_master.cc (new)         | 36 ++++++++++++++++++++++
 5 files changed, 56 insertions(+), 6 deletions(-)
Comment 4 Vanilla I. Shu freebsd_committer freebsd_triage 2022-10-02 03:46:06 UTC
Hi:

I just update pecl-swoole to 4.8.12, and add some official patches for SWOOLE_PROCESS,

thanks.