Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] productivity improvement
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-10-20 (10:06)
From: Pierre Weis <pierre.weis@i...>
Subject: Re: [Caml-list] debugger losing contact with debuggee process

> A process I am debugging has a bus error and crashes. When it crashes, it
> loses contact with ocaml_debug. The output looks something like this:
> calling db->put with db=3c8c0 txn=0 flags=0
> Invalid argument (error number 22)
> BDB: aborting transaction
> Lost connection with process 3531 (active process)
> between time 290000 and time 300000
               ^^^^^^          ^^^^^^
These numbers are very valuable information...

> Trying to recover...
> Time : 290000 - pc : 59612 - module Printf
> 186 <|b|>let res = Buffer.contents dest in
> The debugger loses contact with the debuggee process because the debuggee
> has a bus error and terminates.
> The information provided by ocamldebug above isn't very helpful. How do I
> get a backtrace at the time of the bus error ? Something along the lines
> of a bactrace on a core dump file would be great. How does one get this
> information using ocamldebug ?

The information that ocamldebug gave you is helpful : it provides the
mean to go back way before the bus error (Time 290000), and ensures
that the bus error will appear before Time 300000. To go (go) just before
the bus error and ask for a backtrace then (bt) is just a matter of
dichotomy and is very fast. Once your very near the bus error you can
step use instruction stepping (s) and print (p) and next event (n) to
understand what happens.

(Use help in the debugger to get help in the debugger.)

> Lex
> [ I posted this question to the ocaml_beginners list. After receiving no
> replies on that list after 12hours, I conclude that the people on that
> list don't have the experience with ocamldebug to answer the question and
> am posting it to this list. ]

This is a bit fast: don't forget the time difference between you and
the rest of the world! Also consider that people may have something
else to do than answering to your message just now!


Pierre Weis

INRIA, Projet Cristal,,
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: