Opened 5 years ago

Closed 4 years 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 Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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 5 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 5 years ago by simonmar

Status: newinfoneeded

comment:3 Changed 5 years ago by igloo

difficulty: Unknown
Milestone: 7.6.1

comment:4 Changed 4 years ago by igloo


comment:5 Changed 4 years ago by igloo

Resolution: wontfix
Status: infoneededclosed

No response from submitter, so closing.

Note: See TracTickets for help on using tickets.