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
Mysterious Thread.kill #2779
Comments
Comment author: administrator
Actually, Thread.exit() is implemented as Thread.kill(Thread.self()). To say more, I'd really need to be able to reproduce the crash -- but
|
Comment author: administrator
I've put together a tgz with instructions and a Makefile that Michael |
Comment author: administrator Thanks for the nicely packaged test case! It compiled and ran out of There are some "Bad file descriptor,close" errors on each connection
|
Comment author: administrator Cannot reproduce. -XL, 2001-07-02 |
Original bug ID: 380
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Michael McDougall
Version: 3.01
OS: Linux (Redhat 7.1)
Submission from: halifax.cis.upenn.edu (158.130.66.10)
I've written a client/server system in Ocaml. The
server is multi-threaded. On the server's side, each new TCP connection
between the client and server is handled by separate
thread.
Ideally, the server would be able to run for weeks at a time without
being restarted. Unfortunately it crashes after a day or two under
light load, and it crashes within minutes if the load is heavy.
I can't figure out why it is crashing. When it does crash I get
the following message on stdout:
Fatal error: uncaught exception Failure("Thread.kill: killed thread")
I don't call "Thread.kill" anywhere in the code, so I don't see what
I can do to fix the problem.
All my code is surrounded by "try .. with" blocks (in the main thread
and the child threads) so I don't know why the exception isn't
being caught inside the program. This leads me to suspect that there
is some problem in the threads implementation.
I can't give simple instructions for how to reproduce the bug short
of downloading my Ocaml program and running it. I'll be happy to
supply the code if you want it.
I will appreciate any help. There is a group of us at UPenn who have
invested a lot of time and effort
on this project and this bug is sinking the whole project.
Here's a snippet of the server's code. It shows the main loop
and the creation of child threads.
let main () =
log "QcmdServer starting up";
log "Loading initial state";
begin
try
List.iter initFileInfo file_info_list
with
excep -> fatal_error("Exception occured while getting file information:"
^ (Printexc.to_string excep));
end;
while true do
try
log "Waiting for message";
let new_event = get_next_event() in
match new_event with
done
;;
I'll be happy to supply more code if you think it will help.
Merci,
Michael McDougall
The text was updated successfully, but these errors were encountered: