caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] segmentation fault
@ 2017-06-18 19:41 Julia Lawall
  2017-06-19 20:15 ` David MENTRÉ
  0 siblings, 1 reply; 17+ messages in thread
From: Julia Lawall @ 2017-06-18 19:41 UTC (permalink / raw)
  To: caml-list

Hello,

I am trying to debug a segmentation fault in natively compiled ocaml code.
This blog says that the backtrace produced by gdb on a core file produced
by ocaml is not reliable:

https://incubaid.wordpress.com/2011/12/04/on-segmentation-faults-stack-overflows-gdb-and-ocaml/

Is that still the case?  The backtraces that I get look plausible, but
don't contain anything that looks like a stack overflow.  Over several
runs on two different laptops, the backtraces have nothing obvious in
common.  The bytecode version does not seem to stack overflow.  Adding
Gc.print_stat() at a periodic quiescent point in the execution did not
show a memory leak.  I am using OCaml 4.02.3.

thanks,
julia

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-18 19:41 [Caml-list] segmentation fault Julia Lawall
@ 2017-06-19 20:15 ` David MENTRÉ
  2017-06-19 20:58   ` Julia Lawall
  2017-06-23 17:03   ` SP
  0 siblings, 2 replies; 17+ messages in thread
From: David MENTRÉ @ 2017-06-19 20:15 UTC (permalink / raw)
  To: caml-list

Hello Julia,

Le 2017-06-18 à 21:41, Julia Lawall a écrit :
> Over several
> runs on two different laptops, the backtraces have nothing obvious in
> common.  The bytecode version does not seem to stack overflow.  Adding
> Gc.print_stat() at a periodic quiescent point in the execution did not
> show a memory leak.

A similar issue related to random crash in native code version was asked
by Alexey Egorov on this list 9 days ago. Daniel Bünzli advised to him
to frequently call Gc.full_major () to have a crash closer to the real
issue.

In the case of Alexey, it was a non tail-recursive call that triggered a
stack overflow and that is not detected in OCaml native code. Apparently
this kind of issue is fixed in next to come OCaml 4.06.0.

Of course, your issue might be entirely different. But frequently
calling Gc.full_major () seems a sensible starting point to me.

Otherwise you have the usual suspects: are you using C bidings? Threads?

Good luck!
david

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-19 20:15 ` David MENTRÉ
@ 2017-06-19 20:58   ` Julia Lawall
  2017-06-19 21:15     ` Josh Berdine
  2017-06-23 17:03   ` SP
  1 sibling, 1 reply; 17+ messages in thread
From: Julia Lawall @ 2017-06-19 20:58 UTC (permalink / raw)
  To: David MENTRÉ; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]



On Mon, 19 Jun 2017, David MENTRÉ wrote:

> Hello Julia,
>
> Le 2017-06-18 à 21:41, Julia Lawall a écrit :
> > Over several
> > runs on two different laptops, the backtraces have nothing obvious in
> > common.  The bytecode version does not seem to stack overflow.  Adding
> > Gc.print_stat() at a periodic quiescent point in the execution did not
> > show a memory leak.
>
> A similar issue related to random crash in native code version was asked
> by Alexey Egorov on this list 9 days ago. Daniel Bünzli advised to him
> to frequently call Gc.full_major () to have a crash closer to the real
> issue.

OK, I will try this.

> In the case of Alexey, it was a non tail-recursive call that triggered a
> stack overflow and that is not detected in OCaml native code. Apparently
> this kind of issue is fixed in next to come OCaml 4.06.0.

Why would something like this not be deterministic?  In my case, it can
happen after seconds or after tens of minutes.

> Of course, your issue might be entirely different. But frequently
> calling Gc.full_major () seems a sensible starting point to me.
>
> Otherwise you have the usual suspects: are you using C bidings? Threads?

There are no threads.  The software may use C bindings.  I don't think
they are involved in the failing execution, but I'm not 100% sure.

thanks,
julia

> Good luck!
> david
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-19 20:58   ` Julia Lawall
@ 2017-06-19 21:15     ` Josh Berdine
  2017-06-19 21:19       ` Julia Lawall
  2017-06-21 14:20       ` Markus Weißmann
  0 siblings, 2 replies; 17+ messages in thread
From: Josh Berdine @ 2017-06-19 21:15 UTC (permalink / raw)
  To: Julia Lawall; +Cc: caml-list

On Mon, Jun 19 2017, Julia Lawall wrote:

> On Mon, 19 Jun 2017, David MENTRÉ wrote:
>
>> Hello Julia,
>>
>> Le 2017-06-18 à 21:41, Julia Lawall a écrit :
>> > Over several
>> > runs on two different laptops, the backtraces have nothing obvious in
>> > common.  The bytecode version does not seem to stack overflow.  Adding
>> > Gc.print_stat() at a periodic quiescent point in the execution did not
>> > show a memory leak.
>>
>> A similar issue related to random crash in native code version was asked
>> by Alexey Egorov on this list 9 days ago. Daniel Bünzli advised to him
>> to frequently call Gc.full_major () to have a crash closer to the real
>> issue.
>
> OK, I will try this.

Are you using Windows? I have only experienced segfaults from stack overflow on Windows.

>> In the case of Alexey, it was a non tail-recursive call that triggered a
>> stack overflow and that is not detected in OCaml native code. Apparently
>> this kind of issue is fixed in next to come OCaml 4.06.0.
>
> Why would something like this not be deterministic?  In my case, it can
> happen after seconds or after tens of minutes.

This sounds like an interaction with the GC to me.

>> Of course, your issue might be entirely different. But frequently
>> calling Gc.full_major () seems a sensible starting point to me.
>>
>> Otherwise you have the usual suspects: are you using C bidings? Threads?
>
> There are no threads.  The software may use C bindings.  I don't think
> they are involved in the failing execution, but I'm not 100% sure.

I have found running under valgrind to be helpful in this sort of situation, though it is slow and some valid code can trigger many warnings.

Cheers, Josh

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-19 21:15     ` Josh Berdine
@ 2017-06-19 21:19       ` Julia Lawall
  2017-06-20  1:01         ` Francois BERENGER
  2017-06-21 14:20       ` Markus Weißmann
  1 sibling, 1 reply; 17+ messages in thread
From: Julia Lawall @ 2017-06-19 21:19 UTC (permalink / raw)
  To: Josh Berdine; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]



On Mon, 19 Jun 2017, Josh Berdine wrote:

> On Mon, Jun 19 2017, Julia Lawall wrote:
>
> > On Mon, 19 Jun 2017, David MENTRÉ wrote:
> >
> >> Hello Julia,
> >>
> >> Le 2017-06-18 à 21:41, Julia Lawall a écrit :
> >> > Over several
> >> > runs on two different laptops, the backtraces have nothing obvious in
> >> > common.  The bytecode version does not seem to stack overflow.  Adding
> >> > Gc.print_stat() at a periodic quiescent point in the execution did not
> >> > show a memory leak.
> >>
> >> A similar issue related to random crash in native code version was asked
> >> by Alexey Egorov on this list 9 days ago. Daniel Bünzli advised to him
> >> to frequently call Gc.full_major () to have a crash closer to the real
> >> issue.
> >
> > OK, I will try this.
>
> Are you using Windows? I have only experienced segfaults from stack
> overflow on Windows.

No, Linux.

>
> >> In the case of Alexey, it was a non tail-recursive call that triggered a
> >> stack overflow and that is not detected in OCaml native code. Apparently
> >> this kind of issue is fixed in next to come OCaml 4.06.0.
> >
> > Why would something like this not be deterministic?  In my case, it can
> > happen after seconds or after tens of minutes.
>
> This sounds like an interaction with the GC to me.

This was my thought as well.  Also, of the four cores I have, two are in
the Gc.  But two are not.

> >> Of course, your issue might be entirely different. But frequently
> >> calling Gc.full_major () seems a sensible starting point to me.
> >>
> >> Otherwise you have the usual suspects: are you using C bidings? Threads?
> >
> > There are no threads.  The software may use C bindings.  I don't think
> > they are involved in the failing execution, but I'm not 100% sure.
>
> I have found running under valgrind to be helpful in this sort of
> situation, though it is slow and some valid code can trigger many
> warnings.

OK, I'll try that.

thanks,
julia

>
> Cheers, Josh
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-19 21:19       ` Julia Lawall
@ 2017-06-20  1:01         ` Francois BERENGER
  2017-06-20  6:34           ` Julia Lawall
  0 siblings, 1 reply; 17+ messages in thread
From: Francois BERENGER @ 2017-06-20  1:01 UTC (permalink / raw)
  To: caml-list

On 06/20/2017 06:19 AM, Julia Lawall wrote:
> 
> 
> On Mon, 19 Jun 2017, Josh Berdine wrote:
> 
>> On Mon, Jun 19 2017, Julia Lawall wrote:
>>
>>> On Mon, 19 Jun 2017, David MENTRÉ wrote:
>>>
>>>> Hello Julia,
>>>>
>>>> Le 2017-06-18 à 21:41, Julia Lawall a écrit :
>>>>> Over several
>>>>> runs on two different laptops, the backtraces have nothing obvious in
>>>>> common.  The bytecode version does not seem to stack overflow.  Adding
>>>>> Gc.print_stat() at a periodic quiescent point in the execution did not
>>>>> show a memory leak.
>>>>
>>>> A similar issue related to random crash in native code version was asked
>>>> by Alexey Egorov on this list 9 days ago. Daniel Bünzli advised to him
>>>> to frequently call Gc.full_major () to have a crash closer to the real
>>>> issue.
>>>
>>> OK, I will try this.
>>
>> Are you using Windows? I have only experienced segfaults from stack
>> overflow on Windows.
> 
> No, Linux.
> 
>>
>>>> In the case of Alexey, it was a non tail-recursive call that triggered a
>>>> stack overflow and that is not detected in OCaml native code. Apparently
>>>> this kind of issue is fixed in next to come OCaml 4.06.0.
>>>
>>> Why would something like this not be deterministic?  In my case, it can
>>> happen after seconds or after tens of minutes.
>>
>> This sounds like an interaction with the GC to me.
> 
> This was my thought as well.  Also, of the four cores I have, two are in
> the Gc.  But two are not.

If this is using parmap, I would suggest disabling parmap and trying a 
sequential version of the program.

I have seen parmap "maskerading" exceptions.
But when you don't use parmap, you can truly see what exception you have
and where it is coming from.

>>>> Of course, your issue might be entirely different. But frequently
>>>> calling Gc.full_major () seems a sensible starting point to me.
>>>>
>>>> Otherwise you have the usual suspects: are you using C bidings? Threads?
>>>
>>> There are no threads.  The software may use C bindings.  I don't think
>>> they are involved in the failing execution, but I'm not 100% sure.
>>
>> I have found running under valgrind to be helpful in this sort of
>> situation, though it is slow and some valid code can trigger many
>> warnings.
> 
> OK, I'll try that.
> 
> thanks,
> julia
> 
>>
>> Cheers, Josh
>>
> 

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-20  1:01         ` Francois BERENGER
@ 2017-06-20  6:34           ` Julia Lawall
  0 siblings, 0 replies; 17+ messages in thread
From: Julia Lawall @ 2017-06-20  6:34 UTC (permalink / raw)
  To: Francois BERENGER; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 2996 bytes --]



On Tue, 20 Jun 2017, Francois BERENGER wrote:

> On 06/20/2017 06:19 AM, Julia Lawall wrote:
> >
> >
> > On Mon, 19 Jun 2017, Josh Berdine wrote:
> >
> > > On Mon, Jun 19 2017, Julia Lawall wrote:
> > >
> > > > On Mon, 19 Jun 2017, David MENTRÉ wrote:
> > > >
> > > > > Hello Julia,
> > > > >
> > > > > Le 2017-06-18 à 21:41, Julia Lawall a écrit :
> > > > > > Over several
> > > > > > runs on two different laptops, the backtraces have nothing obvious
> > > > > > in
> > > > > > common.  The bytecode version does not seem to stack overflow.
> > > > > > Adding
> > > > > > Gc.print_stat() at a periodic quiescent point in the execution did
> > > > > > not
> > > > > > show a memory leak.
> > > > >
> > > > > A similar issue related to random crash in native code version was
> > > > > asked
> > > > > by Alexey Egorov on this list 9 days ago. Daniel Bünzli advised to him
> > > > > to frequently call Gc.full_major () to have a crash closer to the real
> > > > > issue.
> > > >
> > > > OK, I will try this.
> > >
> > > Are you using Windows? I have only experienced segfaults from stack
> > > overflow on Windows.
> >
> > No, Linux.
> >
> > >
> > > > > In the case of Alexey, it was a non tail-recursive call that triggered
> > > > > a
> > > > > stack overflow and that is not detected in OCaml native code.
> > > > > Apparently
> > > > > this kind of issue is fixed in next to come OCaml 4.06.0.
> > > >
> > > > Why would something like this not be deterministic?  In my case, it can
> > > > happen after seconds or after tens of minutes.
> > >
> > > This sounds like an interaction with the GC to me.
> >
> > This was my thought as well.  Also, of the four cores I have, two are in
> > the Gc.  But two are not.
>
> If this is using parmap, I would suggest disabling parmap and trying a
> sequential version of the program.

Parmap is there, but there are tests to avoid calling it when only one
core is requested.

julia


>
> I have seen parmap "maskerading" exceptions.
> But when you don't use parmap, you can truly see what exception you have
> and where it is coming from.
>
> > > > > Of course, your issue might be entirely different. But frequently
> > > > > calling Gc.full_major () seems a sensible starting point to me.
> > > > >
> > > > > Otherwise you have the usual suspects: are you using C bidings?
> > > > > Threads?
> > > >
> > > > There are no threads.  The software may use C bindings.  I don't think
> > > > they are involved in the failing execution, but I'm not 100% sure.
> > >
> > > I have found running under valgrind to be helpful in this sort of
> > > situation, though it is slow and some valid code can trigger many
> > > warnings.
> >
> > OK, I'll try that.
> >
> > thanks,
> > julia
> >
> > >
> > > Cheers, Josh
> > >
> >
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-19 21:15     ` Josh Berdine
  2017-06-19 21:19       ` Julia Lawall
@ 2017-06-21 14:20       ` Markus Weißmann
  1 sibling, 0 replies; 17+ messages in thread
From: Markus Weißmann @ 2017-06-21 14:20 UTC (permalink / raw)
  To: Josh Berdine; +Cc: Julia Lawall, caml-list

On 2017-06-19 23:15, Josh Berdine wrote:
> On Mon, Jun 19 2017, Julia Lawall wrote:
> 
>> On Mon, 19 Jun 2017, David MENTRÉ wrote:
>> 
>>> Hello Julia,
>>> 
>>> Le 2017-06-18 à 21:41, Julia Lawall a écrit :
>>> > Over several
>>> > runs on two different laptops, the backtraces have nothing obvious in
>>> > common.  The bytecode version does not seem to stack overflow.  Adding
>>> > Gc.print_stat() at a periodic quiescent point in the execution did not
>>> > show a memory leak.
>>> 
>>> A similar issue related to random crash in native code version was 
>>> asked
>>> by Alexey Egorov on this list 9 days ago. Daniel Bünzli advised to 
>>> him
>>> to frequently call Gc.full_major () to have a crash closer to the 
>>> real
>>> issue.
>> 
>> OK, I will try this.
> 
> Are you using Windows? I have only experienced segfaults from stack
> overflow on Windows.
> 

you can easily get a stack overflow on Linux when you use C bindings:
the "stack touch" that checks for sufficient free space on the stack
before calling external code may well trigger a SEGFAULT, even though it 
is
not the fault of the C-code but of the OCaml-code that filled the stack.

I found my bug by adding [@tailcall] annotations to the recursive 
function
calls I initially assumed would be tail recursive.

regards
Markus

-- 
Markus Weißmann, M.Sc.
Technische Universität München
Institut für Informatik
Boltzmannstr. 3
D-85748 Garching
Germany
http://wwwknoll.in.tum.de/

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-19 20:15 ` David MENTRÉ
  2017-06-19 20:58   ` Julia Lawall
@ 2017-06-23 17:03   ` SP
  2017-06-23 17:25     ` Julia Lawall
  1 sibling, 1 reply; 17+ messages in thread
From: SP @ 2017-06-23 17:03 UTC (permalink / raw)
  To: caml-list

You can use `tailcall` attribute to verify if it is tail-call optimised.

http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec246

-- 
    SP

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-23 17:03   ` SP
@ 2017-06-23 17:25     ` Julia Lawall
  2017-06-29 15:19       ` Damien Doligez
  0 siblings, 1 reply; 17+ messages in thread
From: Julia Lawall @ 2017-06-23 17:25 UTC (permalink / raw)
  To: SP; +Cc: caml-list



On Fri, 23 Jun 2017, SP wrote:

> You can use `tailcall` attribute to verify if it is tail-call optimised.
>
> http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec246

Thanks.  For the moment, though, I have no idea what function call is
causing the problem.

julia

>
> --
>     SP
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-23 17:25     ` Julia Lawall
@ 2017-06-29 15:19       ` Damien Doligez
  2017-06-29 15:26         ` Julia Lawall
                           ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Damien Doligez @ 2017-06-29 15:19 UTC (permalink / raw)
  To: Julia Lawall; +Cc: SP, caml users

Hi Julia,

This is a long shot, but let's see if this is the Skylake/Kaby Lake
processor bug. Could you follow the instructions at the beginning of
https://lists.debian.org/debian-devel/2017/06/msg00308.html
and tell us if you have one of the buggy processors?

Cheers,

-- Damien

> On 2017-06-23, at 19:25, Julia Lawall <julia.lawall@lip6.fr> wrote:
> 
> 
> 
> On Fri, 23 Jun 2017, SP wrote:
> 
>> You can use `tailcall` attribute to verify if it is tail-call optimised.
>> 
>> http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec246
> 
> Thanks.  For the moment, though, I have no idea what function call is
> causing the problem.
> 
> julia
> 
>> 
>> --
>>    SP
>> 
>> --
>> Caml-list mailing list.  Subscription management and archives:
>> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>> 
> 
> -- 
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-29 15:19       ` Damien Doligez
@ 2017-06-29 15:26         ` Julia Lawall
  2017-06-29 23:16         ` Julia Lawall
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Julia Lawall @ 2017-06-29 15:26 UTC (permalink / raw)
  To: Damien Doligez; +Cc: SP, caml users



On Thu, 29 Jun 2017, Damien Doligez wrote:

> Hi Julia,
>
> This is a long shot, but let's see if this is the Skylake/Kaby Lake
> processor bug. Could you follow the instructions at the beginning of
> https://lists.debian.org/debian-devel/2017/06/msg00308.html
> and tell us if you have one of the buggy processors?

Thanks.  I don't have access to my failing machine at the moment, but I
will forward the message to the person who reported the problem in the
first place.

julia

>
> Cheers,
>
> -- Damien
>
> > On 2017-06-23, at 19:25, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> >
> > On Fri, 23 Jun 2017, SP wrote:
> >
> >> You can use `tailcall` attribute to verify if it is tail-call optimised.
> >>
> >> http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec246
> >
> > Thanks.  For the moment, though, I have no idea what function call is
> > causing the problem.
> >
> > julia
> >
> >>
> >> --
> >>    SP
> >>
> >> --
> >> Caml-list mailing list.  Subscription management and archives:
> >> https://sympa.inria.fr/sympa/arc/caml-list
> >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> >> Bug reports: http://caml.inria.fr/bin/caml-bugs
> >>
> >
> > --
> > Caml-list mailing list.  Subscription management and archives:
> > https://sympa.inria.fr/sympa/arc/caml-list
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-29 15:19       ` Damien Doligez
  2017-06-29 15:26         ` Julia Lawall
@ 2017-06-29 23:16         ` Julia Lawall
  2017-06-30 10:55         ` Julia Lawall
  2017-07-01 18:37         ` Julia Lawall
  3 siblings, 0 replies; 17+ messages in thread
From: Julia Lawall @ 2017-06-29 23:16 UTC (permalink / raw)
  To: Damien Doligez; +Cc: Julia Lawall, SP, caml users



On Thu, 29 Jun 2017, Damien Doligez wrote:

> Hi Julia,
>
> This is a long shot, but let's see if this is the Skylake/Kaby Lake
> processor bug. Could you follow the instructions at the beginning of
> https://lists.debian.org/debian-devel/2017/06/msg00308.html
> and tell us if you have one of the buggy processors?

The person who reported the bug does have one of the offending machines
and had hyperthreading enabled.  He is going to try with hyperthreading
disabled.

$ cat /proc/cpuinfo | grep "model"
model           : 78
model name      : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
model           : 78
model name      : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
model           : 78
model name      : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
model           : 78
model name      : Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
$ grep -q '^flags.*[[:space:]]ht[[:space:]]' /proc/cpuinfo && echo
"Hyper-threading is supported"
Hyper-threading is supported


julia

>
> Cheers,
>
> -- Damien
>
> > On 2017-06-23, at 19:25, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> >
> > On Fri, 23 Jun 2017, SP wrote:
> >
> >> You can use `tailcall` attribute to verify if it is tail-call optimised.
> >>
> >> http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec246
> >
> > Thanks.  For the moment, though, I have no idea what function call is
> > causing the problem.
> >
> > julia
> >
> >>
> >> --
> >>    SP
> >>
> >> --
> >> Caml-list mailing list.  Subscription management and archives:
> >> https://sympa.inria.fr/sympa/arc/caml-list
> >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> >> Bug reports: http://caml.inria.fr/bin/caml-bugs
> >>
> >
> > --
> > Caml-list mailing list.  Subscription management and archives:
> > https://sympa.inria.fr/sympa/arc/caml-list
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-29 15:19       ` Damien Doligez
  2017-06-29 15:26         ` Julia Lawall
  2017-06-29 23:16         ` Julia Lawall
@ 2017-06-30 10:55         ` Julia Lawall
  2017-06-30 14:06           ` SP
  2017-07-01 18:37         ` Julia Lawall
  3 siblings, 1 reply; 17+ messages in thread
From: Julia Lawall @ 2017-06-30 10:55 UTC (permalink / raw)
  To: Damien Doligez; +Cc: Julia Lawall, SP, caml users



On Thu, 29 Jun 2017, Damien Doligez wrote:

> Hi Julia,
>
> This is a long shot, but let's see if this is the Skylake/Kaby Lake
> processor bug. Could you follow the instructions at the beginning of
> https://lists.debian.org/debian-devel/2017/06/msg00308.html
> and tell us if you have one of the buggy processors?

The person who reported the problem and has a buggy processor has
reported:

HT enabled, 4 passes failed with segmentation fault at random points

(HT enabled was BIOS default)

HT disabled, 3 passes completed successfully

julia



>
> Cheers,
>
> -- Damien
>
> > On 2017-06-23, at 19:25, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> >
> > On Fri, 23 Jun 2017, SP wrote:
> >
> >> You can use `tailcall` attribute to verify if it is tail-call optimised.
> >>
> >> http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec246
> >
> > Thanks.  For the moment, though, I have no idea what function call is
> > causing the problem.
> >
> > julia
> >
> >>
> >> --
> >>    SP
> >>
> >> --
> >> Caml-list mailing list.  Subscription management and archives:
> >> https://sympa.inria.fr/sympa/arc/caml-list
> >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> >> Bug reports: http://caml.inria.fr/bin/caml-bugs
> >>
> >
> > --
> > Caml-list mailing list.  Subscription management and archives:
> > https://sympa.inria.fr/sympa/arc/caml-list
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-30 10:55         ` Julia Lawall
@ 2017-06-30 14:06           ` SP
  0 siblings, 0 replies; 17+ messages in thread
From: SP @ 2017-06-30 14:06 UTC (permalink / raw)
  To: caml-list

Success then?

-- 
    SP

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] segmentation fault
  2017-06-29 15:19       ` Damien Doligez
                           ` (2 preceding siblings ...)
  2017-06-30 10:55         ` Julia Lawall
@ 2017-07-01 18:37         ` Julia Lawall
  3 siblings, 0 replies; 17+ messages in thread
From: Julia Lawall @ 2017-07-01 18:37 UTC (permalink / raw)
  To: Damien Doligez; +Cc: SP, caml users



On Thu, 29 Jun 2017, Damien Doligez wrote:

> Hi Julia,
>
> This is a long shot, but let's see if this is the Skylake/Kaby Lake
> processor bug. Could you follow the instructions at the beginning of
> https://lists.debian.org/debian-devel/2017/06/msg00308.html
> and tell us if you have one of the buggy processors?

The only machine on which I myself observed the problem also has a buggy
processor with hyperthreading enabled.

julia


>
> Cheers,
>
> -- Damien
>
> > On 2017-06-23, at 19:25, Julia Lawall <julia.lawall@lip6.fr> wrote:
> >
> >
> >
> > On Fri, 23 Jun 2017, SP wrote:
> >
> >> You can use `tailcall` attribute to verify if it is tail-call optimised.
> >>
> >> http://caml.inria.fr/pub/docs/manual-ocaml/extn.html#sec246
> >
> > Thanks.  For the moment, though, I have no idea what function call is
> > causing the problem.
> >
> > julia
> >
> >>
> >> --
> >>    SP
> >>
> >> --
> >> Caml-list mailing list.  Subscription management and archives:
> >> https://sympa.inria.fr/sympa/arc/caml-list
> >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> >> Bug reports: http://caml.inria.fr/bin/caml-bugs
> >>
> >
> > --
> > Caml-list mailing list.  Subscription management and archives:
> > https://sympa.inria.fr/sympa/arc/caml-list
> > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> > Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Caml-list] Segmentation fault
  2008-06-03  3:09 Segmentation fault Jacques Le Normand
@ 2008-06-03 14:08 ` Berke Durak
  0 siblings, 0 replies; 17+ messages in thread
From: Berke Durak @ 2008-06-03 14:08 UTC (permalink / raw)
  To: Jacques Le Normand; +Cc: caml-list

Jacques Le Normand wrote:
> Hello caml-list,
> 
> I'm encountering a segfault on ocaml 3.09
> 
> The test case seems long, but if I remove any line from it it stops 
> segfaulting. The strangest thing is that get_right_sibling_specific is 
> called, though it appears nowhere. If you change it's name, the segfault 
> dissapears. Any help would be appreciated!
> here's the code:

I confirm that it segfaults with ocamlc and ocamlopt 3.11+dev12 on amd64.

Stepping with ocamldebug, I find that it segfaults somewhere near this:

Time : 3045 - pc : 58100 - module CamlinternalOO
323     if top then super cla env else <|b|>Obj.repr (super cla) in

So this indeed looks like a bug in the object system.
-- 
Berke DURAK


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2017-07-01 18:37 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-18 19:41 [Caml-list] segmentation fault Julia Lawall
2017-06-19 20:15 ` David MENTRÉ
2017-06-19 20:58   ` Julia Lawall
2017-06-19 21:15     ` Josh Berdine
2017-06-19 21:19       ` Julia Lawall
2017-06-20  1:01         ` Francois BERENGER
2017-06-20  6:34           ` Julia Lawall
2017-06-21 14:20       ` Markus Weißmann
2017-06-23 17:03   ` SP
2017-06-23 17:25     ` Julia Lawall
2017-06-29 15:19       ` Damien Doligez
2017-06-29 15:26         ` Julia Lawall
2017-06-29 23:16         ` Julia Lawall
2017-06-30 10:55         ` Julia Lawall
2017-06-30 14:06           ` SP
2017-07-01 18:37         ` Julia Lawall
  -- strict thread matches above, loose matches on Subject: below --
2008-06-03  3:09 Segmentation fault Jacques Le Normand
2008-06-03 14:08 ` [Caml-list] " Berke Durak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).