Ticket #3967 (closed bug: worksforme)

Opened 3 years ago

Last modified 3 years ago

Adding heap profiling RTS options causes segfault

Reported by: tibbe Owned by:
Priority: normal Milestone:
Component: Profiling Version: 6.13
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Runtime crash Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Adding either -hy or -hc causes a segfault in the thread-delay benchmark. To reproduce:

git clone git://github.com/tibbe/event.git
cd event
autoreconf
cabal configure --enable-library-profiling
cabal build
$EDITOR benchmarks/Makefile

Change the last line in the following section:

thread-delay: ghc-flags += -package stm
thread-delay: $(lib) Args.o ThreadDelay.o
	ranlib $(lib)
	$(ghc) $(ghc-flags) -threaded -o $@ $(filter %.o,$^) $(lib)

to

	$(ghc) $(ghc-flags) -threaded -rtsopts -o $@ $(filter %.o,$^) $(lib)

This enables the +RTS options. Finally, run:

make -C benchmarks/ clean thread-delay ENABLE_PROFILING=1
./benchmarks/thread-delay -n50000 +RTS -hy

This gives me a segfault.

Change History

Changed 3 years ago by tibbe

To make sure you get the same version of the repo that I used to reproduce this run

git reset --hard 46571bc65781a8d5df9ddc439454f4d4ad515b91

directly after running git clone.

Changed 3 years ago by tibbe

If it wasn't clear from the initial report, removing +RTS -hy makes the segfault go away.

Changed 3 years ago by simonmar

  • status changed from new to closed
  • resolution set to worksforme

Works for me using today's HEAD. I don't recall fixing anything that could have caused this, but in the absence of a reproduction I'll have to close it.

Note: See TracTickets for help on using tickets.