Ticket #5680 (closed bug: wontfix)

Opened 19 months ago

Last modified 5 months ago

Main thread does not respect stack size RTS options

Reported by: ravi_n Owned by:
Priority: normal Milestone: 7.6.2
Component: Runtime System Version: 7.2.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Incorrect result at runtime Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I was recently trying to start up with a large initial stack in a Haskell program so that I could give a large stack to some foreign code I was calling. Unfortunately, no matter what I did with the -K -ki and -kc RTS options, the stack size never seemed to change.

I suspect the problem can be traced to the the following comment in source:rts/RtsMain.c

/* ToDo: want to start with a larger stack size */

It looks to me like the main thread is started without attempting to adjust its stack size based on the RTS flags. Is that correct? If so, how hard is it to fix?

Change History

Changed 19 months ago by simonmar

It's true that the main thread doesn't respect the +RTS -ki setting, but I wonder whether you really want to do that. You said "so that I could give a large stack to some foreign code I was calling", which suggests a misunderstanding: the Haskell stack is not the same as the C stack, and any changes to make to the size of the Haskell stack will have no effect on foreign code.

Could you explain the original problem you're trying to solve by changing the stack size?

Changed 19 months ago by simonmar

  • status changed from new to infoneeded

Changed 18 months ago by igloo

  • difficulty set to Unknown
  • milestone set to 7.6.1

Changed 9 months ago by igloo

  • milestone changed from 7.6.1 to 7.6.2

Changed 5 months ago by igloo

  • status changed from infoneeded to closed
  • resolution set to wontfix

No response from submitter, so closing.

Note: See TracTickets for help on using tickets.