Opened 2 years ago

Closed 15 months ago

#5680 closed bug (wontfix)

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 (5)

comment:1 Changed 2 years 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?

comment:2 Changed 2 years ago by simonmar

  • Status changed from new to infoneeded

comment:3 Changed 2 years ago by igloo

  • Difficulty set to Unknown
  • Milestone set to 7.6.1

comment:4 Changed 20 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:5 Changed 15 months ago by igloo

  • Resolution set to wontfix
  • Status changed from infoneeded to closed

No response from submitter, so closing.

Note: See TracTickets for help on using tickets.