Philip Jenvey wrote:
> On Jun 15, 2006, at 2:07 PM, uuellbee wrote:
>
> >
> > Ben Bangert wrote:
> >> On Jun 15, 2006, at 12:27 PM, uuellbee wrote:
> >>
> >>> I started going through the tutorials/examples (esp. the blog) to
> >>> set
> >>> up a very basic test site. I'm pretty sure I got all the setup
> >>> right.
> >>>
> >>> So I start the server and navigate to http://localhost:5000/.
> >>> First I
> >>> see a completely blank, white page. When I hit reload the server
> >>> dies
> >>> without giving any reason or even the slightest hint, except for
> >>> a nice
> >>> new python.core file that shows up in the top-level project dir.
> >>
> >> The only core dump of Pylons I've ever heard of was due to form input
> >> being re-read during an exception if it was a POST. This was fixed in
> >> Paste and 0.8.2 of Pylons requires the fixed version of Paste as
> >> well.
> >> Other than that, I've yet to hear of any way to core-dump quite like
> >> this.
> >>
> >> What OS are you running this on? I'm assuming you're using Pylons
> >> 0.8.2
> >> as it was the last released one.
> >>
> >> - Ben
> >
> > OS is FreeBSD 5.4.
> >

> Do you have any strange kernel options enabled that aren't in
> GENERIC? What kind of CPU is FreeBSD running under?

GENERIC/Pentium 4. No special options.


> One known cause of core dumps on FreeBSD is when a python app needs a
> large stack size (this can be avoided by enabling the python port's
> HUGE_STACK_SIZE option), but since you're loading a simple app this
> can't be the problem.

I found some info on this and one suggestion was to #define
THREAD_STACK_SIZE in thread_pthread.h. [See
http://www.pythomnic.org/step_by_step.html.] I tried this instead of
setting HUGE_STACK_SIZE because I'm compiling Python from source.

Here is the line I added:

#define THREAD_STACK_SIZE (0x100000)

Now when I visit the test site, it just keeps Loading... apparently
forever. (It's been going in a another tab for a while now).


> You might try switching the threading library via libmap.conf incase
> there's something strange related to threads.

I can't find libmap.conf on my system.

I tried compiling without threads, but something complained about not
finding threads when I started the server. I also tried using the
--with-pth option (GNU pth threading libraries), but that didn't change
anything.


> Otherwise to get some kind on information on why the core dump
> occurred you'll need to recompile python with debugging symbols. You
> can do this by putting the following line in /etc/make.conf prior to
> building the port:
>
> CFLAGS=-g
>
> Then you can run 'gdb python.core' and issue the 'bt' command to gdb
> to see a backtrace.

I'll recompile with the THREAD_STACK_SIZE hack removed and try
this......

Here's what I get from running 'gdb ~/bin/python python.core':
    [Copyright, etc]
    This GDB was configured as "i386-marcel-freebsd"...
    Core was generated by `python'.
    Program terminated with signal 10, Bus error.
    [Bunch of lines of reading/loading symbols]
    #0  0x2825a31b in pthread_testcancel () from
/usr/lib/libpthread.so.1


Here is the output of bt:
    #0  0x2825a31b in pthread_testcancel () from
/usr/lib/libpthread.so.1
    #1  0x28252902 in pthread_mutexattr_init () from
/usr/lib/libpthread.so.1
    #2  0x00000000 in ?? ()

~wyatt


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss
-~----------~----~----~----~------~----~------~--~---

Reply via email to