Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
Cc: ijtrotts@ucdavis.edu, caml-list@inria.fr
Subject: Re: [Caml-list] FreeBSD + lablglut + thread: bug or not bug
Date: 12 Sep 2003 08:34:52 +0200	[thread overview]
Message-ID: <1063348491.958.24.camel@ice.gerd-stolpmann.de> (raw)
In-Reply-To: <3F61604A.6050201@univ-savoie.fr>

Am Fre, 2003-09-12 um 07.57 schrieb Christophe Raffalli:
> I was wrong to say other multi-threaded code work: here is a stack of
> a crashed kcontrol ...

I would not conclude that from this stack trace. libc_r is a user-level
multi-threading emulation, and many system calls (such as "poll" here)
are redefined to get the effect of the emulation. Maybe the code crashes
in __sys_poll because kcontrol called "poll" with an invalid pointer; a
userland threading library cannot check whether addresses are valid like
the kernel does for real system calls.

Concerning the stability of libc_r I found the bug that the signal mask
is not restored after the signal routine has finished execution. For
most multi-threaded applications this is not a big problem: They usually
do not define signal handlers at all, because this has the disadavantage
that it is undefined in which thread the signal handler runs. Instead,
there is often a separate thread that watches for signals (sigsuspend).
However, O'Caml relies on correct signal semantics, especially for
multi-threaded applications, because it uses an alarm timer to implement
its own time-sharing policy. Consider O'Caml as a "stress test" for the
multi-threading implementation.

Gerd

> 
> .....
> (no debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...(no debugging symbols found)...
> (no debugging symbols found)...0x28ec256c in __sys_poll ()
>     from /usr/lib/libc_r.so.4
> #0  0x28ec256c in __sys_poll () from /usr/lib/libc_r.so.4
> #1  0x28ec1ab8 in _thread_kern_sched_state_unlock () from 
> /usr/lib/libc_r.so.4
> #2  0x28ec147d in _thread_kern_scheduler () from /usr/lib/libc_r.so.4
> #3  0x0 in ?? ()
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-09-12  6:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-10 18:52 [Caml-list] suggestion for record pattern matching and construction Eric C. Cooper
2003-09-10 23:19 ` Olivier Andrieu
2003-09-14 19:32   ` brogoff
2003-09-11 13:49 ` [Caml-list] FreeBSD + lablglut + thread: bug or not bug Christophe Raffalli
2003-09-11 14:25   ` Christophe Raffalli
2003-09-11 14:30   ` Gerd Stolpmann
2003-09-11 15:11     ` Christophe Raffalli
2003-09-11 15:23       ` Gerd Stolpmann
2003-09-11 17:33   ` Issac Trotts
2003-09-11 20:01     ` Christophe Raffalli
2003-09-11 20:09     ` Christophe Raffalli
2003-09-11 20:38       ` Issac Trotts
2003-09-12  5:57       ` Christophe Raffalli
2003-09-12  6:34         ` Gerd Stolpmann [this message]
2003-09-22 12:16         ` Christophe Raffalli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1063348491.958.24.camel@ice.gerd-stolpmann.de \
    --to=info@gerd-stolpmann.de \
    --cc=Christophe.Raffalli@univ-savoie.fr \
    --cc=caml-list@inria.fr \
    --cc=ijtrotts@ucdavis.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox