Performance with python and FreeBSD 7.0 amd64

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Performance with python and FreeBSD 7.0 amd64

Felipe Neuwald-2
Hi all,

We have a few servers running zope + plone. On one server running
FreeBSD 6.3-STABLE i386, I got no problems, but, with one server
running FreeBSD 7.0-STABLE amd64, same versions of applications, I got
some errors, like the following:

dmesg result:
pid 74775 (python), uid 1002: exited on signal 11
pid 74861 (python), uid 1002: exited on signal 11
pid 74911 (python), uid 1002: exited on signal 11
pid 74926 (python), uid 1002: exited on signal 11
pid 74970 (python), uid 1002: exited on signal 11
pid 75038 (python), uid 1002: exited on signal 11
pid 75069 (python), uid 1002: exited on signal 11
pid 75095 (python), uid 1002: exited on signal 11
pid 75131 (python), uid 1002: exited on signal 11
pid 75136 (python), uid 1002: exited on signal 11
pid 75204 (python), uid 1002: exited on signal 11
pid 75842 (python), uid 1002: exited on signal 11
pid 75949 (python), uid 1002: exited on signal 10
pid 75962 (python), uid 1002: exited on signal 11
pid 75999 (python), uid 1002: exited on signal 4
pid 76097 (python), uid 1002: exited on signal 10
pid 77452 (python), uid 1002: exited on signal 11
pid 78012 (python), uid 1002: exited on signal 10
pid 78044 (python), uid 1002: exited on signal 11
pid 78425 (python), uid 1002: exited on signal 4
pid 78464 (python), uid 1002: exited on signal 11
pid 78615 (python), uid 1002: exited on signal 11
pid 78638 (python), uid 1002: exited on signal 11
pid 78656 (python), uid 1002: exited on signal 11
pid 78809 (python), uid 1002: exited on signal 11
pid 79076 (python), uid 1002: exited on signal 11
pid 84577 (python), uid 1002: exited on signal 11

I'm using python version 2.4 on every server. So, if someone can help me:

- How can I debug the system to find the error?
- How can I configure the server for plone + zope (python) best performance?

Thank you very much,

Felipe Neuwald.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Performance with python and FreeBSD 7.0 amd64

Andrew MacIntyre
Felipe Neuwald wrote:

> We have a few servers running zope + plone. On one server running
> FreeBSD 6.3-STABLE i386, I got no problems, but, with one server
> running FreeBSD 7.0-STABLE amd64, same versions of applications, I got
> some errors, like the following:
>
> dmesg result:
> pid 74775 (python), uid 1002: exited on signal 11

segmentation violation

{...}
> pid 75949 (python), uid 1002: exited on signal 10

bus error

{...}
> pid 75999 (python), uid 1002: exited on signal 4

illegal instruction

{...}


Hmm... that's an interesting mix of failures.

I have seen bus errors when Python runs out of stack space either in the
main thread or child threads (not an unknown issue with Zope).

gcc 4.x in my limited experience generates sometimes noticeably larger
stack frames than gcc 3.x (which is standard on 6.x), which can provoke
unexpected stack exhaustion.

You don't mention whether you're using a local build or a binary package.
Nor do you mention the point release (python 2.4.5 is the most recent in
the 2.4 series).

The default thread stack size according to my 6.3 box's ports is 1MB for
Python 2.4.4) which should be adequate for most circumstances.

The illegal instruction failure suggests something wrong with your
binaries (including those built for Zope).

The segmentation violations often indicate a problem with reference
counts, frequently attributable to bugs in 3rd party extensions.

You might want to check that all binaries for Python, Zope & Plone (if
it has any) link against the same libraries.

If you can snaffle cores, you might want to try and extract backtraces
from gdb (debugging symbols would make this more productive...)

--
-------------------------------------------------------------------------
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: [hidden email]  (pref) | Snail: PO Box 370
        [hidden email]             (alt) |        Belconnen ACT 2616
Web:    http://www.andymac.org/               |        Australia
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Performance with python and FreeBSD 7.0 amd64

Felipe Neuwald-2
>
> Hmm... that's an interesting mix of failures.
>
> I have seen bus errors when Python runs out of stack space either in the
> main thread or child threads (not an unknown issue with Zope).
>
> gcc 4.x in my limited experience generates sometimes noticeably larger
> stack frames than gcc 3.x (which is standard on 6.x), which can provoke
> unexpected stack exhaustion.
>
> You don't mention whether you're using a local build or a binary package.
> Nor do you mention the point release (python 2.4.5 is the most recent in
> the 2.4 series).

I'm using a local build, installed via ports tree (python24-2.4.5_1).

> The default thread stack size according to my 6.3 box's ports is 1MB for
> Python 2.4.4) which should be adequate for most circumstances.
>
> The illegal instruction failure suggests something wrong with your
> binaries (including those built for Zope).
>
> The segmentation violations often indicate a problem with reference
> counts, frequently attributable to bugs in 3rd party extensions.
>
> You might want to check that all binaries for Python, Zope & Plone (if it
> has any) link against the same libraries.

Ok, I'll try to check these. I'm not the python + zope + plone guy,
I'm the FreeBSD administrator. I'll have to work with the application
team to find the solution for these problem.

> If you can snaffle cores, you might want to try and extract backtraces
> from gdb (debugging symbols would make this more productive...)

Ok, I'll also try to get more information with cores.

Thanks, Felipe Neuwald.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Performance with python and FreeBSD 7.0 amd64

Felipe Neuwald-2
In reply to this post by Andrew MacIntyre
Andrew, I'll try to recompile python with "HUGE STACK SIZE" option. Let's see.

Felipe Neuwald.
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Performance with python and FreeBSD 7.0 amd64

Felipe Neuwald-2
Andrew and all,

After recompile python 2.4 with HUGE_STACK_SIZE option, I got no more
problems. I'll still wait the weekend to say it again, and wait for
the customer reply about system performance / errors. If I got news,
I'll send to you.

Thank you very much,

Felipe Neuwald.

2008/6/12 Felipe Neuwald <[hidden email]>:
> Andrew, I'll try to recompile python with "HUGE STACK SIZE" option. Let's see.
>
> Felipe Neuwald.
>
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Performance with python and FreeBSD 7.0 amd64

Felipe Neuwald-2
Hi Andrew and all,

Just to inform: after the weekend test, I still got no more errors. I
think the problem is solved.

Thank you very much,

Felipe Neuwald.

2008/6/13 Felipe Neuwald <[hidden email]>:

> Andrew and all,
>
> After recompile python 2.4 with HUGE_STACK_SIZE option, I got no more
> problems. I'll still wait the weekend to say it again, and wait for
> the customer reply about system performance / errors. If I got news,
> I'll send to you.
>
> Thank you very much,
>
> Felipe Neuwald.
>
> 2008/6/12 Felipe Neuwald <[hidden email]>:
>> Andrew, I'll try to recompile python with "HUGE STACK SIZE" option. Let's see.
>>
>> Felipe Neuwald.
>>
>
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Performance with python and FreeBSD 7.0 amd64

Andrew MacIntyre
Felipe Neuwald wrote:

> Just to inform: after the weekend test, I still got no more errors. I
> think the problem is solved.
>
> Thank you very much,
>
> Felipe Neuwald.
>
> 2008/6/13 Felipe Neuwald <[hidden email]>:
>> Andrew and all,
>>
>> After recompile python 2.4 with HUGE_STACK_SIZE option, I got no more
>> problems. I'll still wait the weekend to say it again, and wait for
>> the customer reply about system performance / errors. If I got news,
>> I'll send to you.

Hope it stays that way for you.  FWIW, Python 2.5 and later don't need
to be recompiled to change the thread stack size, provided you can change
the main script - there's a function in the threading module that will do
it.

Regards, Andrew.

--
-------------------------------------------------------------------------
Andrew I MacIntyre                     "These thoughts are mine alone..."
E-mail: [hidden email]  (pref) | Snail: PO Box 370
        [hidden email]             (alt) |        Belconnen ACT 2616
Web:    http://www.andymac.org/               |        Australia
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-performance
To unsubscribe, send any mail to "[hidden email]"