New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Application stops after some requests #161
Comments
After rebooting my machine it seems to work properly... |
OK;) |
It seems so strange. The Hunt Framework 3.3 is comming and will be release soon. |
Fails with 3.3.0-rc.2 too. I will wait for 3.3 |
which linux distribution are you using to run/test hunt-framework? |
Please use 3.3.0 release version. |
Can you use gdb to debug it? It's really difficult to reproduce this problem in our environment. |
Create a file nambed
which can ignore most of the warnings. You can install the C++ extension for VS code. And check the debug box in Then you can debug the application. More about this, see https://forums.dlangchina.com/thread/10057. |
Thank you Heromyth. I was able to configure and place breakpoints... the main problem is the debug errors shown as popups by vscode about missing glibc files.
|
Finally, I tried with gdbgui (it works nicely without this annoying popups). The error that stops application is this:
And finally
As I understand, doing repeatedly CTRL+F5 on Firefox causes it to abandon previous sockets before server writes the responses. This causes the broken pipe signal on server when it tries to write the response. I suppose you must manage manually the error if necessary and ignore the SIGPIPE on POSIX systems. |
Do you have another OS? Can you test this problem in it? By the way, you can test the network with the other Hunt libraries like Hunt, Hunt-Http. All of them have an folder named |
Do you refer a non POSIX OS? |
Debian, Linux Mint (Ubuntu), Windows 10 etc. |
I added the code to ignore the SIGPIPE signal (only valid on POSIX systems) on main.d import hunt.framework;
version(Posix)
{
import core.sys.posix.signal;
}
void main(string[] args)
{
version(Posix){
sigset_t sigset;
sigemptyset(&sigset);
sigaction_t siginfo;
siginfo.sa_mask = sigset;
siginfo.sa_flags = SA_RESTART;
siginfo.sa_handler = SIG_IGN;
sigaction(SIGPIPE, &siginfo, null);
}
app().run(args);
} With this change, the application works without interruption when a pipe brokes (i.e.: Firefox discarding a socket before a response is written by the server). Once in a while, a warning is shown in console:
As I mentioned in a previous comment, it seems that hunt is not managing SIGPIPE properly. |
It seems that we need to do more searches about |
5 similar comments
It seems that we need to do more searches about |
It seems that we need to do more searches about |
It seems that we need to do more searches about |
It seems that we need to do more searches about |
It seems that we need to do more searches about |
It's really difficult to reproduce this problem. |
I'm running hunt-skeleton app
After first request, app stops:
If I try tu debug application (gdb):
My system:
Ubuntu 20.04.1 LTS
DMD64 D Compiler v2.090.1
DUB version 1.19.0
The text was updated successfully, but these errors were encountered: