Bug #9937 | Crash on call to stored procedure | ||
---|---|---|---|
Submitted: | 15 Apr 2005 17:28 | Modified: | 31 May 2005 11:01 |
Reporter: | Joerg Bruehe | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.4 | OS: | HP/UX (HP-UX 11.23 (ia64)) |
Assigned to: | Per-Erik Martin | CPU Architecture: | Any |
[15 Apr 2005 17:28]
Joerg Bruehe
[11 May 2005 13:07]
Per-Erik Martin
This is possibly a duplcate of BUG#6048, although it has not yet been confirmed.
[11 May 2005 14:09]
Per-Erik Martin
On my linux: mysql> call fib(96); Query OK, 0 rows affected (0.03 sec) ... mysql> call fib(97); ERROR 1119 (HY000): Thread stack overrun: Used: 188984 of a 196608 stack. Use 'mysqld -O thread_stack=#' to specify a bigger stack if needed mysql> which is the expected result. (Recursion seems to run 90-120 levels before it hits the overrun check on a typical linux box.) Even if the recursion depth is the problem, it should be detected gracefully. (And and having problems with just 20 levels would imply a very tiny stack.)
[26 May 2005 19:08]
Per-Erik Martin
This was not a duplicate of BUG#6048. This shows up on two ia64 platform, possibly because these particular ones seem to get very small thread stacks by default. The problem is that the check_stack_overrun() test doesn't work because the real stack available is only half the one configured. (This must be a bug in the OS, or it's libraries.) So the overrrun check never gets a chance, the stack is thrashed long before the presumed limit is reached. Fixed by requesting twice the stack size to get the expected size on ia64 machines (internally, so 'mysqld -O thread_stack=X' will give you X bytes of real stack size per thread). Hard to create a general test case that works cross-platform (since it depends on the stack size), so the test case that triggered the bug report (fib()) will have to do.
[27 May 2005 19:03]
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/25335
[31 May 2005 16:35]
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/25405