[SPAM] Re: [mod_python] connection to host server broken

Jim Gallacher jpg at jgassociates.ca
Tue Mar 27 13:38:29 EST 2007


sikander hayat wrote:
> Hi,
> 
> Thanks for your help. Just wanted to point out that, out of frustation, i installed mod_python 3.2.10 and discarded mod_python 3.3.1 and magically it all works fine !!!
> 
> What I would like to conclude from this is, that there might be some dependency in 3.3.1 that caused havoc...(atleast for me). As pointed out previously, 3.3.1 constantly kept on giving the following errors:
> 
> child pid 28468 exit signal Segmentation fault (11)
> [Tue Mar 27 17:26:14 2007] [notice] child pid 28469 exit signal Segmentation fault (11)
> [Tue Mar 27 17:26:40 2007] [error] [client 134.96.24.83] File does not exist: /opt/lampp/htdocs/favicon.ico
> [Tue Mar 27 17:29:21 2007] [error] [client 134.96.24.83] File does not exist: /opt/lampp/htdocs/favicon.ico
> 
> 
> Why this segmentation error with 3.3.1 

Obviously we'd like to sort out why 3.3.1 is segfaulting. Did you try 
Graham's suggestion of doing:

  PythonHandler mod_python.testhandler

and still get a segfault? If not, can you either try it, or share the 
contents of you index.py file that caused the problem?

> and also, i had nothing to do with this favicon.ico. I do not have this icon and
 > do not intend to make one. Why and which process needs this icon... 
*wondering*

This has nothing to do with mod_python. It's your browser that is 
requesting favicon.ico. You don't have one and apache logs that fact, 
and is standard behaviour for a missing file. If you don't intend to 
create one you better get used to having your error logs clogged with 
this message, as I believe some (all?) modern browsers automatically 
request it.

Jim

> Thanks,
> Sikander
> 
> 
> Graham Dumpleton <graham.dumpleton at gmail.com> wrote: On 26/03/07, sikander hayat  wrote:
>> Hi,
>>
>> I am using suse 10.1, Apache 2.2.4, python 2.5 and mod_python 3.3.1.
>>
>> The error log is as follows:
>> [Mon Mar 26 10:16:48 2007] [warn] RSA server certificate is a CA certificate
>> (BasicConstraints: CA == TRUE !?)
>> [Mon Mar 26 10:16:48 2007] [warn] RSA server certificate CommonName (CN)
>> `localhost' does NOT match server name!?
>> [Mon Mar 26 10:16:48 2007] [notice] mod_python: Creating 8 session mutexes
>> based on 256 max processes and 0 max threads.
>> [Mon Mar 26 10:16:48 2007] [notice] mod_python: using mutex_directory /tmp
>> [Mon Mar 26 10:16:48 2007] [notice] Apache/2.2.4 (Unix) DAV/2 mod_ssl/2.2.4
>> OpenSSL/0.9.8d mod_python/3.3.1 Python/2.5 PHP/5.2.1
>> mod_apreq2-20051231/2.5.7 m
>> od_perl/2.0.2 Perl/v5.8.7 configured -- resuming normal operations
>> [Mon Mar 26 10:17:04 2007] [error] [client 134.96.24.83] File does not
>> exist: /opt/lampp/htdocs/favicon.ico
>> [Mon Mar 26 10:17:35 2007] [notice] mod_python (pid=3230,
>> interpreter='localhost'): Importing module
>> '/opt/lampp/htdocs/parkweb/index.py'
>> [Mon Mar 26 10:17:35 2007] [notice] mod_python (pid=3231,
>> interpreter='localhost'): Importing module
>> '/opt/lampp/htdocs/parkweb/index.py'
>> [Mon Mar 26 10:17:36 2007] [notice] child pid 3230 exit signal Segmentation
>> fault (11)
>> [Mon Mar 26 10:17:36 2007] [notice] child pid 3231 exit signal Segmentation
>> fault (11)
>>
>> I have recently upgraded to python 2.5. So, to say, i have 2 versions of
>> python on my system. Will try to remove the older one and try again.
> 
> To confirm whether that is necessary, set:
> 
>   PythonHandler mod_python.testhandler
> 
> In the output from that just verify that the sys.path information is
> correct for the version of Python you expect to use. From the above
> log entries there probably isn't a problem with versions as mod_python
> will actually log some warnings if it finds a different version of
> Python than what it was compiled with and that isn't in the log
> entries.
> 
>> ****Why is it loading the module twice ...is that normal ???
> 
> Note how the 'pid' is different for each. This means that there were
> two requests and that they so happened to be handled by different
> Apache child processes.
> 
>> Kindly let me know if something rings a bell.
> 
> Since you are using Python 2.5, it should not be the expat version
> problem as Python 2.5 is supposed to change things to avoid that one.
> I would though still suspect that it is some versioning problem with
> shared libraries. For example, if your web application uses some sort
> of database and you also have PHP loaded and it is using some
> different version of the database client library. This sort of
> mismatch can cause a crash as one library will take precedence over
> the other and if they are not compatible it can crash.
> 
> What you may need to do is start adding debug into your code and the
> framework it uses such that you output a log message before and after
> every module import. For example:
> 
>   from mod_python import apache
> 
>   apache.log_error(__file__  + " #1")
>   import pyexpat
>   apache.log_error(__file__ + " #2")
>   import module2
>   apache.log_error(__file__ + " #3")
> 
> See how many of the messages come out in the Apache error log and slow
> narrow it down to a specific module being importer causing the crash.
> 
> If the module imports aren't the problem but something in handler
> itself, do something similar, logging messages to the Apache log until
> you find exactly what call causes it.
> 
> Graham
> 
>> Thanks,
>>
>>
>> Graham Dumpleton  wrote:
>>  On 24/03/07, Jim Gallacher wrote:
>>> sikander hayat wrote:
>>>> Hi all,
>>>>
>>>> My apache webserver on linux recently broke down, so i reinstalled it,
>> along with mod_python. Having made the necessary changes in the conf file of
>> apache, i tried some of the simple tests, such as mptest, but i keep on
>> getting the following error.
>>>> Connection to host server ... lost.
>>>>
>>>> Why is that, is it because of python or some apache setting.
>>> Or network problems?
>>>
>>> What do you find in your apache logs?
>> The Apache error log would be a good start, as it looks to me like
>> your Apache child processes are crashing. You may find errors about
>> segmentation violations or similar in the logs. If you do, check that
>> the version of mod_python you are using is the correct one for the
>> version of Python and Apache you are using. Having multiple versions
>> of Python installed can also cause issues.
>>
>> BTW, are you using precompiled packages or compiling everything from
>> source code? What operating system are you using?
>>
>> Graham
>>
>>
>>
>>  ________________________________
>> Sucker-punch spam with award-winning protection.
>>  Try the free Yahoo! Mail Beta.
>>
>>
> 
> 
>  
> ---------------------------------
> The fish are biting.
>  Get more visitors on your site using Yahoo! Search Marketing.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list