Hello,
  I've run into a really intermittent and strange problem with PHP
4.1.0, and before I try and figure out how to send in a bug report
that'll get ignored (because I don't have all the data that is
expected), I thought I would try here to see if anyone else is having
similar problems.


  Configuration:  FreeBSD 4.4-STABLE, PostgreSQL 7.1.3, Apache 1.3.22,
PHP 4.1.0.

  I use PHP Sessions for large parts of our sites.  I'm currently using
the PostgreSQL Session Handler code from Jon Parise and it had been
working pretty much perfectly under PHP 4.0.6. (The only issue was when
multiple requests came in with the same session_id at the EXACT same
time - AvantGo for instance - But I made some minor modifications to
eliminate that problem)

  Once upgrading to 4.1.0, I started noticing Apache processes
segfaulting left and right. (Signal 11's, with the occasional Signal 10)
At first I started to think perhaps memory was bad on that particular
system.  I have 4 servers (running 3-5 separate Apache processes each)
and each and every server was giving me the Signal 10/11's.  I started
looking into it further.

  I have an auto_prepend for my "application" code that defines the base
session variables, config variables, includes the pgsql_session_handler
file, etc.  All the processing is handled here so that my other pages
can just use an array that stores all the session data.  That way I can
pretty much ignore the backend in any of my application code.

  Once I turned this code off, bingo!  No more segfaults!  So I started
hacking out code there.  If I kept all the startup code but eliminated
the session commands, it still worked.  As soon as I turned on the
session (session_start/session_register), I'd get the segfaults again.

  If I turned off the pgsql_session_handler and went back to files (the
default), I didn't have any problems either.  It was just a problem when
I was using the pgsql_session_handler.

  So I then turned off session handling and built my own session
functions (quickie, but basically emulate the session functions I
needed) that called the SAME pgsql_session_handler code that was being
used by PHP's internal functions.  For the past hour I haven't had a
single segfault on any of my servers.  (Within 5 minutes of turning on
the internal session routines, I would start getting segfaults every
minute or so)

  One other thing I noticed was that I had compiled PHP with the mm
shared memory library.  Previous to 4.1.0, each Apache process had a
size of around 64MB.  (Without mm, the size was 4-5MB or so)  Once
installing 4.1.0, the size went up to >130MB for each process!  Since I
believe sessions utilize the mm library if it's available, I figure this
may be one of the clues.  (I never tried using the shared memory style
of sessions, so I couldn't tell you if it would segfault there.)

  Is anyone having any of these problems?  Is anyone else using the
internal PHP session support with their own session handler (under some
of the same conditions I gave above) and having no problems with
PHP4.1.0?  Please let me know either way.  

  BTW, I never get a core file.  I've tried "enable-debug" to get the
symbols in there, but without a core file I'm kind of out of luck on
tracing.  All I can tell you now is that using user-defined handlers for
sessions started causing me lots of problems.  (As near as I can tell,
you need to have some sort of a decent load on your servers - Single
client access didn't ever seem to allow me to force the crashes)

  HELP! 

Jaime Bozza


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to