You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2022/10/22 02:58:25 UTC

[GitHub] [skywalking] jmjoy opened a new issue, #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).

jmjoy opened a new issue, #9831:
URL: https://github.com/apache/skywalking/issues/9831

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Apache SkyWalking Component
   
   PHP (apache/skywalking-php)
   
   ### What happened
   
   As discussed there (https://github.com/apache/skywalking-php/pull/24), non-blocking stream fails on write_all occasionally (https://github.com/apache/skywalking-php/pull/24#discussion_r1000112320).
   
   Now @phanalpha temporarily set the sender blocking to pass the CI, but this will cause the PHP worker process to block when the uds buffer is full or the grpc process exits unexpectedly.
   
   Therefore, we need to choose another non blocking sender mode to replace the existing one.
   
   ### What you expected to happen
   
   Non blocking sender and reliable.
   
   ### How to reproduce
   
   Set sender nonblocking to true.
   
   https://github.com/phanalpha/skywalking-php/blob/357cda037306bfb5c2cff41b162dacd6543145f4/src/channel.rs#L36
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng commented on issue #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).

Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #9831:
URL: https://github.com/apache/skywalking/issues/9831#issuecomment-1290229593

   Is this fixed?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] wu-sheng closed issue #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).

Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).
URL: https://github.com/apache/skywalking/issues/9831


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9831:
URL: https://github.com/apache/skywalking/issues/9831#issuecomment-1287637904

   Indeed, in the case of large concurrency, multiple fpm worker processes or multiple swoole coroutines write data to the sender at the same time.
   
   I think the solution is to use UnixDatagram which can determine the data boundary, carry the requested ID on the data packet, and then reassemble it at the receiver.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] phanalpha commented on issue #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).

Posted by GitBox <gi...@apache.org>.
phanalpha commented on issue #9831:
URL: https://github.com/apache/skywalking/issues/9831#issuecomment-1287598305

   I've made a mistake (before). After digging into the code, I think the problem is not about `Datagram` or `Stream`. A 'pipe' is used as an mpsc channel for now. The actual problem is multi-process concurrent writing to the same pipe. A `Mutex` has no help with that or it would cause performance impact. IMHO, we may need to switch to `UnixListener` and I'm working on it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] phanalpha commented on issue #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).

Posted by GitBox <gi...@apache.org>.
phanalpha commented on issue #9831:
URL: https://github.com/apache/skywalking/issues/9831#issuecomment-1290234132

   I think we have fixed it.
   
   Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
   
   From: 吴晟 Wu ***@***.***>
   Sent: 2022年10月25日 17:07
   To: ***@***.***>
   Cc: ***@***.***>; ***@***.***>
   Subject: Re: [apache/skywalking] [Bug] [PHP] Bugs on Reporter (channel/worker). (Issue #9831)
   
   
   Is this fixed?
   
   ―
   Reply to this email directly, view it on GitHub<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Fskywalking%2Fissues%2F9831%23issuecomment-1290229593&data=05%7C01%7C%7C1e243b42caaa4e7b473508dab66844b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638022856198694390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Luq2A7IvfeuerEee3WiEL%2BSrtD0Jw9HFDCY%2BTM7MfL0%3D&reserved=0>, or unsubscribe<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAHU4NWO67UVDTSFHRLG4ILWE6PLBANCNFSM6AAAAAARLU43VY&data=05%7C01%7C%7C1e243b42caaa4e7b473508dab66844b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638022856198694390%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=JgEoDi4pojmnvJ%2F9XGwr%2Bpe%2FeXM6iLA8UcYenXPM6dQ%3D&reserved=0>.
   You are receiving this because you were mentioned.Message ID: ***@***.***>
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] phanalpha commented on issue #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).

Posted by GitBox <gi...@apache.org>.
phanalpha commented on issue #9831:
URL: https://github.com/apache/skywalking/issues/9831#issuecomment-1287874012

   There are two problems here: one is concurrent writing, and the other is blocking. `UnixDatagram` may solve the concurrent writing problem. Since we could not be sure that all data fit one write, we must multiplex the stream manually which could be tricky. On the other hand, busy writing to a non-blocking stream without retries almost always causes problems. IMHO, `UnixListener` and per fpm (side) threads solve each.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [skywalking] jmjoy commented on issue #9831: [Bug] [PHP] Bugs on Reporter (channel/worker).

Posted by GitBox <gi...@apache.org>.
jmjoy commented on issue #9831:
URL: https://github.com/apache/skywalking/issues/9831#issuecomment-1287595746

   My current idea is to use `UnixDatagram` instead of `UnixStream`.
   
    As the document (https://man7.org/linux/man-pages/man7/unix.7.html) says:
   
   > SOCK_DGRAM, for a datagram-oriented
   >        socket that preserves message boundaries (as on most UNIX
   >        implementations, UNIX domain datagram sockets are always reliable
   >        and don't reorder datagrams)
   
   But also have to solve the problem in mentioned in https://github.com/apache/skywalking-php/pull/15 for MacOS.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org