-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Crystal::ThreadLocalValue(Deque(Fiber)), Thread... Server hangs, crash, Deadlock? #8714
Comments
It seems similar to something I described in #8707 From the trace, I assume the http server performs some |
No, just the MITM server, and using IPC (UNIXSocket) to connect remote.
I haven't tried it yet, but there should be no problems, this doesn't happen often, every error happens only once. (Every error / crash was encountered only once). Normal situation (4-5 hours running) No memory leak / socket leak.
def transport(client, server : IO)
logger.try &.transporting
upgrade_proxy server
if client.responds_to? :skip_free=
client.skip_free = true
end
begin
attach_message client, server
rescue ex
client.close rescue nil
server.close rescue nil
return tls_free client
end
all_transport client, server
end
def all_transport(client, server : IO)
channel = Channel(Bool).new
spawn do
IO.copy client, server rescue nil
channel.send true
end
spawn do
IO.copy server, client rescue nil
channel.send true
end
if channel.receive
client.close rescue nil
server.close rescue nil
end
if channel.receive
tls_free client
logger.try &.finished
end
end |
@bcardiff Remove the |
simplified test case would help...what libevent version? what does the call graph have to do with the crashes? That was the hang? Might be interesting to run it within gdb/lldb so that when it crashes you can get a stack trace on all current threads... ( |
The message you are asking about is mentioned on this question.
Just simple And two related crashes that were triggered earlier. Running 20 times can appear 2-3 times (each execution time is 1-3 hours). The message you are asking about is mentioned on this question.
This is a server (MITM Server). I am convinced that #8707 can solve this problem. :) |
UpdateWaiting #8707 fixed.
|
I'll test it later #8707. :) |
Maybe after #8733 |
@rdp Sorry buddy, I have been making SOCKS5 Server / Client these days, Forgot to test if this fixes the problem (Pull #8707 and #8733) :) Now, I'm going to test if Pull solves the problem, Also encountered a new problem a few days ago, related to this.
|
You could try it with libevent debug turned one more;
https://archives.seul.org/libevent/users/Feb-2013/msg00013.html
…On Tue, Feb 11, 2020 at 3:59 AM _ ***@***.***> wrote:
@rdp <https://github.com/rdp> Sorry buddy, I have been making SOCKS5
Server / Client these days, Forgot to test if this fixes the problem (Pull
#8707 <#8707> and #8733
<#8733>) :)
SOCKS5 Client / Server is now complete 🚧 WIP - Crystal SOCKS5 Client
with Server <https://github.com/636f7374/tomato.cr>
Now, I'm going to test if Pull solves the problem, Also encountered a new
problem a few days ago, related to this.
[err] event_queue_remove_active: 0x7f9682f04c50 not on queue 8
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8714?email_source=notifications&email_token=AAADBUB7AQK3Y37LPDMLLE3RCKAH7A5CNFSM4KLFI3K2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELL727Q#issuecomment-584580478>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADBUHMK7RFNBDNWEES3SLRCKAH7ANCNFSM4KLFI3KQ>
.
|
@rdp OKay, I will try to enable libevent debug. In addition, if version 0.33 is released, I will test all the above problem. I will close this issue for the time being. If there are any new findings, I will write some of the details as much as possible, Thank you for your help :) 🙏 |
Summary
Server sometimes gets stuck and crash.
I captured the call stack, is it related
Crystal::ThreadLocalValue (Deque (Fiber))
?And two related crashes that were triggered earlier.
In addition lsof (UNIXSocket) will appear (none).
This problem only happens occasionally.
The server encounters this problem and will slowly process the client, and a hang issue occurs.
Sorry, i can't provide more information, if it can't be solved, just make a note.
Call graph (with
-Dpreview_mt
)Crashes
Lsof
Version
The text was updated successfully, but these errors were encountered: