Bug #11213 Thread stack usage: Message is misleading
Submitted: 9 Jun 2005 16:36 Modified: 25 Jul 2005 19:49
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.7 OS:all (HP-UX on HP-PA 64 bit)
Assigned to: Jim Winstead CPU Architecture:Any

[9 Jun 2005 16:36] Joerg Bruehe
Description:
Build of 5.0.7, based on ChangeSet
  1.1947 05/06/09 05:04:59 kent@mysql.com +7 -0
  config-win.h:
    Enabled yaSSL on Windows
  Many files:
    Added yaSSL to Visual Studio 6 project files

This failure occurs after bug#9937 was fixed by Pem, programming around an error in thread stack size handling on IA64 machines (occurred on "hpita2" and "quadita2").
Now, on HP-PA (64 bit) a message is given even though the limit is not yet reached:

sp                             [ fail ]

Errors are (from /var/tmp/mysqldev/hpux11-64bit/test/mysql-pro-5.0.7-beta-hpux11.11-hppa2.0w-64bit/mysql-test/var/log/mysqltest-time) :
/var/tmp/mysqldev/hpux11-64bit/test/mysql-pro-5.0.7-beta-hpux11.11-hppa2.0w-64bit/bin/mysqltest: At line 1674: query 'call fib(20)' failed: 1119: Thread stack overrun:  Used: 170008 of a 196608 stack.  Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed
(the last lines may be the most important ones)

Ending Tests

How to repeat:
Run the test suite.
[10 Jun 2005 11:25] Joerg Bruehe
Same symptom has spread onto "octane2-64bit" (IRIX) in a "debug" build based on ChangeSet
  1.1950 05/06/09 16:53:08 kent@mysql.com +12 -0
  Many files:
    More yaSSL changes in Visual Studio 6 project files
[13 Jun 2005 10:54] Joerg Bruehe
The message says  "Used: 170008 of a 196608 stack."  which implies 26 kB are still available, and so the reason for the command to fail is not visible.

In fact, the reason is that here the check demands 32 kB to be free, but the message does not tell this.

I propose to explicitly include this information in the message (NOT manipulate the values to make them look plausible).
[22 Jun 2005 18:02] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/26331
[22 Jul 2005 21:45] Jim Winstead
Fixed in 5.0.11.
[25 Jul 2005 19:49] Mike Hillyer
Documented in 5.0.11 changelog.