how to use "mysqld -O thread_stack=#"
I don't think Rolando thought about what this variable does before answering. Don't set the thread_stack to 32M. It's is allocated per connection and 100 connections is going use 3.2GB.

thread_stack = 192K


Setting it to the fairly standard 192k should be fine.