GHC RTS bug: segmentation fault

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

GHC RTS bug: segmentation fault

Manlio Perillo-3
Hi.

In a program I have experienced a segmentation fault;
not only that but also:

* tpp.c:63: __pthread_tpp_change_priority: Assertion `new_prio == -1 ||
(new_prio >= __sched_fifo_min_prio && new_prio <=
__sched_fifo_max_prio)' failed.

* internal error: removeThreadFromQueue: not found
     (GHC version 6.8.2 for i386_unknown_linux)
     Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug


I have managed to write a program that reproduces the problem:
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=3714

Compile with: $ghc --make -threaded -O2 main.hs
Execute with: $./main +RTS -A128M -s -c -N4 -RTS 5000000 500

This should produce a segmentation fault (or one of the previous errors).

I strongly suspect that the cause is an uncaught stack overflow.

Executing the code with only 1 threads, there are no more problems.
Increasing the thread stack size (-k1M), there are no more problems.


If the problem is really an uncaught stack overflow, I'm rather sure
that a more simple test can be written, to reproduce the problem.

I'm on Linux Debian Etch i386; GHC 6.8.2.


Some notes about the program:
- when no segmentation fault occurs, the program requires about 1 GB of
   memory
- there is no real parallelization, only 1 CPU is used
- the mapReduce implementation is taken from Real World Haskell
- the code is adapted from the code I'm using in a project


Thanks  Manlio Perillo
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: GHC RTS bug: segmentation fault

Don Stewart-2
The Haskell Cafe isn't the right forum for this.
Please file a bug report here:

    http://hackage.haskell.org/trac/ghc/newticket?type=bug

-- Don

manlio_perillo:

> Hi.
>
> In a program I have experienced a segmentation fault;
> not only that but also:
>
> * tpp.c:63: __pthread_tpp_change_priority: Assertion `new_prio == -1 ||  
> (new_prio >= __sched_fifo_min_prio && new_prio <=  
> __sched_fifo_max_prio)' failed.
>
> * internal error: removeThreadFromQueue: not found
>     (GHC version 6.8.2 for i386_unknown_linux)
>     Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
>
>
> I have managed to write a program that reproduces the problem:
> http://hpaste.org/fastcgi/hpaste.fcgi/view?id=3714
>
> Compile with: $ghc --make -threaded -O2 main.hs
> Execute with: $./main +RTS -A128M -s -c -N4 -RTS 5000000 500
>
> This should produce a segmentation fault (or one of the previous errors).
>
> I strongly suspect that the cause is an uncaught stack overflow.
>
> Executing the code with only 1 threads, there are no more problems.
> Increasing the thread stack size (-k1M), there are no more problems.
>
>
> If the problem is really an uncaught stack overflow, I'm rather sure  
> that a more simple test can be written, to reproduce the problem.
>
> I'm on Linux Debian Etch i386; GHC 6.8.2.
>
>
> Some notes about the program:
> - when no segmentation fault occurs, the program requires about 1 GB of
>   memory
> - there is no real parallelization, only 1 CPU is used
> - the mapReduce implementation is taken from Real World Haskell
> - the code is adapted from the code I'm using in a project
>
>
> Thanks  Manlio Perillo
> _______________________________________________
> Haskell-Cafe mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe