Skip to Content.
Sympa Menu

freetds - Re: apache php module crashing when accessing freet ds libraries

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: "TDS Development Group" <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: apache php module crashing when accessing freet ds libraries
  • Date: Sun, 17 Nov 2002 12:51:26 -0500


On 16 Nov 2002 17:22:36 -0600, Chris <ccortner AT cvol.net> wrote:
> Hello Again :) I followed your directions here to get a backtrace. I
> made sure that all the libraries involved were not stripped even httpd
> and all its dependent libraries. PHP, FreeTDS and Apache are all
> compiled with the -g flag. When I do a backtrace I get this, which Im
> pretty sure is not going to be useful for you; no function names.
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x402076fb in ?? ()
> (gdb) bt 9
> #0 0x402076fb in ?? ()
> #1 0x40213df7 in ?? ()
> #2 0x4020fa7c in ?? ()
> #3 0x402152d7 in ?? ()
> #4 0x401f0a04 in ?? ()
> #5 0x402255a2 in ?? ()
> #6 0x40225f65 in ?? ()
> #7 0x402260fa in ?? ()
> #8 0x400446f0 in __ieee754_scalbf () from /lib/i686/libm.so.6
> (More stack frames follow...)
> (gdb)
>
> Am I missing something? Someone in a c programming channel on IRC
> suggested I may have stack corruption. If this is what you want I'll
> send the entire script file. I apologize in advance if this whole
> segfault thing ends up being my fault. But I've checked and double
> checked my environment and don't see what I could be missing.

Hi Chris,

"bt 9" lists 9 levels of calling stack. Your breakage is evidently so
deep that you're not in FreeTDS or PHP, but somewhere in libc or
something, which is almost certainly stripped. You're in the midst of
some floating point work, I think, based on "libm" (math) and
"__ieee754_scalbf" (written by someone who knows what a mantissa is).

Try just "bt" or some values >9, to see if you can tell where the call
leaves PHP and how. I have a bad feeling about what's going on: it might
be that FreeTDS returned some bogus string, which PHP didn't notice,
passed on for computation, and some low-level wound up with nonsense input
it wasn't designed to handle. The usual thing: a string of bad luck (no
pun intended).

When I first read you message I thought, oh, this will never work. Now
I'm more optimistic. I think at least you're going to be able to tell
where we leave PHP and how and with what, and I think that's going to take
us in the right direction.

I wish this was easier. I'm glad it's possible.

Regards,

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page