Skip to content

Another mysterious crash (backtrace attached) #10

Open
@deepfire

Description

@deepfire

The essence of it are three lines:
https://github.com/deepfire/mood/blob/master/LCstress.hs#L116

Basically, a finalizer is added to the GLMesh pointer, that runs disposeMesh once the GLMesh pointer is deemed unreachable by GC.

This code runs just fine with plain options, but crashes when profiling is enabled thusly:

[nix-shell:~/src/mood]$ ghc -threaded -eventlog -rtsopts -isrc --make LCstress.hs 
[1 of 1] Compiling Main             ( LCstress.hs, LCstress.o )
Linking LCstress ...

[nix-shell:~/src/mood]$ gdb --args ./LCstress +RTS -T -ls -N2
GNU gdb (Debian 7.7.1+dfsg-5+bsos3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./LCstress...done.
(gdb) run
Starting program: /home/desktop/src/mood/LCstress +RTS -T -ls -N2
warning: File "/nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/libthread_db-1.0.so" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
	add-auto-load-safe-path /nix/store/izxnyg94352qxa4a4783dzgnpy5cwazj-glibc-2.25/lib/libthread_db-1.0.so
line to your configuration file "/home/desktop/.gdbinit".
To completely disable this security protection add
	set auto-load safe-path /
line to your configuration file "/home/desktop/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual.  E.g., run from the shell:
	info "(gdb)Auto-loading safe path"
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
-- allocating GPU pipeline (GL.allocRenderer)... 810us
memory usage: 99632
[New LWP 31898]

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 32217]
0x00007fffeeb7d149 in ?? () from /run/opengl-driver/lib/libGLdispatch.so.0
(gdb) bt
#0  0x00007fffeeb7d149 in ?? () from /run/opengl-driver/lib/libGLdispatch.so.0
#1  0x000000000042e4be in lambdacubezmglzm0zi5zi2zi3zm8d6P2OFeLJ12YjQfHjV74P_LambdaCubeziGLziData_zdwdisposeBuffer_info ()
#2  0x0000000000000000 in ?? ()
(gdb) quit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions