server: (router) allow child process to report status via stdout#18110
server: (router) allow child process to report status via stdout#18110ngxson merged 2 commits intoggml-org:masterfrom
Conversation
|
I can confirm this works for Windows as well. |
|
I tested this PR with the following conditions: Tested different values of --host for these results:
Tested those abilities by attempting to connect on:
Results: --host 127.0.0.1 --host 192.168.xx.yy Thanks @ngxson for all your great work! :) |
ggerganov
left a comment
There was a problem hiding this comment.
This mechanism using stdout to communicate is a bit strange - not sure if it has any drawbacks.
I saw there were some issues with the old approach. Didn't get in the details. But assuming this fixes the problem, lets give it a try.
|
Can you confirm if this PR will also fix the similar bug when TLS is used ? ( #18131 ) |
Another way is to have the router actively check for I think using stdin/stdout/stderr is a valid use case for IPC. The main drawback could be that we're now mixing log and commands on stdout/stderr, but in the future we can assign stdout for log and stderr for commands (or vice-versa), I left a TODO in the code for that. Please note that I cannot use OS signals like SIGUSR1/2 because we cannot know which process sent the signal. |
It should partially fix the problem, we still need one more fix to disable SSL on child process (SSL should only be enabled on router process) |
…l-org#18110) * server: (router) allow child process to report status via stdout * apply suggestions
…110) * server: (router) allow child process to report status via stdout * apply suggestions
In case the router listen on a specific address other than 127.0.0.1, the child process will fail to report its status back to the router
This change complete replace this reporting mechanism to using pipe (stdout) instead.