List:General Discussion« Previous MessageNext Message »
From:Daniel Simms Date:April 6 1999 2:21am
Subject:stack smash on bsdi 3.1?
View as plain text  
Hi all,

I've been pursuing a infrequent stack corruption problem for a couple
of months now and am wondering if there are any other victims of this
type of problem.  (I haven't seen any on the list nor in the change
log, but perhaps I didn't look hard enough...  if so, scold me.)

I don't really have enough information to submit a proper bug report
(or fix it myself, as I would gladly do).  What I do know is this:

# [root@lc /root]# uname -a
# BSD/OS 3.1 BSDI BSD/OS 3.1 Kernel #13: Fri Dec 18 00:02:12 PST 1998    
root@stripped:/usr/src/sys/compile/ALINK  i386
# [root@lc /root]# /usr/local/mysql/libexec/mysqld -v
# /usr/local/mysql/libexec/mysqld  Ver 3.22.15-gamma for pc-bsdi3.1 on i386
# [root@lc /root]# gcc -v
# gcc version

I also know that in my_thread_id (in mysys/my_thr_init.c),
my_thread_var (which is really the pointer returned by
pthread_getspecific) is NULL.  At the same time, the stack is so badly
mangled that signal handlers can't even be called.  The stack pointer
isn't obviously the result of any overflow I can see, either based on
the immediate prior query, or the value of the stack pointer
(0xd6f6d), or plain code analysis.  I also get cores now but they're
not easily helpful since the backtrace is only ever one frame deep.
I've tried to do more debugging of the possible callers of
my_thread_id, but there are way too many to do anything useful with.

The only redeeming qualities to this situation are that it happens
fairly infrequently (varying between once in two days, and once in 2
weeks), and that no corruption results (at least as far as 

 > find /usr/local/mysql/var/ -type f -name '*.ISM' | xargs
/usr/local/mysql/bin/isamchk -s'


Any one interested in or suffering from this?  Let me know what I can

Daniel Simms      "A common mistake that people make when trying to design 
dsimms@stripped  something completely foolproof [is] to underestimate the 
(408) 483-3056     ingenuity of complete fools" -Ford Prefect
stack smash on bsdi 3.1?Daniel Simms6 Apr
  • stack smash on bsdi 3.1?Michael Widenius6 Apr