Opened 13 years ago

Closed 13 years ago

#16400 closed Bug (invalid)

runserver exits without any warnings

Reported by: gour Owned by: nobody
Component: Core (Other) Version: 1.3
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

  1. django-admin.py startproject tst
  2. ./manage.py runserver
  3. server exits when I attempt to visit the page:
[gour@atmarama www] virtualenv --no-site-packages django13
New python executable in django13/bin/python2.7
Also creating executable in django13/bin/python
Installing setuptools............done.
Installing pip...............done.
[gour@atmarama www] cd django13 
[gour@atmarama django13] source bin/activate
(django13)[gour@atmarama django13] pip install django
Downloading/unpacking django
  Downloading Django-1.3.tar.gz (6.5Mb): 6.5Mb downloaded
  Running setup.py egg_info for package django
    
Installing collected packages: django
  Running setup.py install for django
    changing mode of build/scripts-2.7/django-admin.py from 644 to 755
    
    changing mode of /usr/home/gour/www/django13/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
(django13)[gour@atmarama django13] django-admin.py startproject tst
(django13)[gour@atmarama django13] cd tst
(django13)[gour@atmarama tst] chmod +x manage.py 
(django13)[gour@atmarama tst] ./manage.py runserver
Validating models...

0 errors found
Django version 1.3, using settings 'tst.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Otoh, same procedure works with django-1.2.5:

[gour@atmarama www] virtualenv --no-site-packages django12
zsh: correct 'django12' to 'django13' [nyae]? n
New python executable in django12/bin/python2.7
Also creating executable in django12/bin/python
Installing setuptools............done.
Installing pip...............done.
[gour@atmarama www] cd django12 
[gour@atmarama django12] source bin/activate
(django12)[gour@atmarama django12] pip install django==1.2.5
Downloading/unpacking django==1.2.5
  Downloading Django-1.2.5.tar.gz (6.4Mb): 6.4Mb downloaded
  Running setup.py egg_info for package django
    
Installing collected packages: django
  Running setup.py install for django
    changing mode of build/scripts-2.7/django-admin.py from 644 to 755
    
    changing mode of /usr/home/gour/www/django12/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
(django12)[gour@atmarama django12] django-admin.py startproject tst
(django12)[gour@atmarama django12] cd tst 
(django12)[gour@atmarama tst] chmod +x manage.py 
(django12)[gour@atmarama tst] ./manage.py runserver
Validating models...
0 errors found

Django version 1.2.5, using settings 'tst.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[04/Jul/2011 05:40:34] "GET / HTTP/1.1" 200 2045

I gor confirmation on #django that some users experience the same thing...

Sincerely,
Gour

Change History (7)

comment:1 by Karen Tracey, 13 years ago

Resolution: needsinfo
Status: newclosed

Please provide some specifics of the machine you are running on. I can't recreate on Ubuntu 11.04 (chosen since it has Python 2.7, which is all I can glean about your environment base on the original description):

ubuntu@ip-nn-nnn-nn-nn:~$ virtualenv --no-site-packages django13
New python executable in django13/bin/python
Installing setuptools............done.
Installing pip...............done.
ubuntu@ip-nn-nnn-nn-nn:~$ cd django13/
ubuntu@ip-nn-nnn-nn-nn:~/django13$ source bin/activate
(django13)ubuntu@ip-nn-nnn-nn-nn:~/django13$ pip install django
Downloading/unpacking django
  Downloading Django-1.3.tar.gz (6.5Mb): 6.5Mb downloaded
  Running setup.py egg_info for package django
    
Installing collected packages: django
  Running setup.py install for django
    changing mode of build/scripts-2.7/django-admin.py from 644 to 755
    
    changing mode of /home/ubuntu/django13/bin/django-admin.py to 755
Successfully installed django
Cleaning up...
(django13)ubuntu@ip-nn-nnn-nn-nn:~/django13$ django-adin.py startproject tst
django-adin.py: command not found
(django13)ubuntu@ip-nn-nnn-nn-nn:~/django13$ django-admin.py startproject tst
(django13)ubuntu@ip-nn-nnn-nn-nn:~/django13$ cd tst
(django13)ubuntu@ip-nn-nnn-nn-nn:~/django13/tst$ chmod +x manage.py 
(django13)ubuntu@ip-nn-nnn-nn-nn:~/django13/tst$ ./manage.py runserver 0.0.0.0:8000
Validating models...

0 errors found
Django version 1.3, using settings 'tst.settings'
Development server is running at http://0.0.0.0:8000/
Quit the server with CONTROL-C.
[04/Jul/2011 07:09:30] "GET / HTTP/1.1" 200 2045

comment:2 by gour, 13 years ago

Here are some info:

[gour@atmarama gour] python          
Python 2.7.1 (r271:86832, Mar 24 2011, 10:10:39) 
[GCC 4.2.1 20070719  [FreeBSD]] on freebsd9
Type "help", "copyright", "credits" or "license" for more information.

[gour@atmarama gour] uname -a
FreeBSD atmarama.noip.me 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Wed May 18 08:00:48 CEST 2011

[gour@atmarama gour] sysctl -a | egrep -i 'hw.machine|hw.model|hw.ncpu'
hw.machine: amd64
hw.model: Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
hw.ncpu: 8
hw.machine_arch: amd64

Any more info required?

Sincerely,
Gour

comment:3 by gour, 13 years ago

Resolution: needsinfo
Status: closedreopened

comment:4 by Aymeric Augustin, 13 years ago

Component: UncategorizedCore (Other)
Type: UncategorizedBug

Since we have a segfault, either Django is doing bad things with ctypes, or it's a bug in Python.

It might be http://bugs.python.org/issue9812 but I really don't have any proof of this.

Next step: http://wiki.python.org/moin/DebuggingWithGdb

in reply to:  4 comment:5 by gour, 13 years ago

Replying to aaugustin:

It might be http://bugs.python.org/issue9812 but I really don't have any proof of this.

I've tried that, but it does not crash.

Next step: http://wiki.python.org/moin/DebuggingWithGdb

Installed gdb72 with python support, but not getting much...

(gdb) run manage.py runserver
Starting program: /usr/home/gour/www/dj13/bin/python manage.py runserver
[New LWP 100461]
[New Thread 801407400 (LWP 100461)]
Validating models...

0 errors found
Django version 1.3, using settings 'tst.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

Program exited with code 0365.

Will try further to get some useful trace or something.

in reply to:  4 comment:6 by gour, 13 years ago

Replying to aaugustin:

Since we have a segfault, either Django is doing bad things with ctypes, or it's a bug in Python.

It might be http://bugs.python.org/issue9812 but I really don't have any proof of this.

It seems it is problem with Python...iow, I've rebuilt Python with 'Use a larger thread stack' (HUGE_STACK_SIZE) which defines:

CFLAGS += -DTHREAD_STACK_SIZE=0x100000

and now it works.

I'll inform port maintainers, since the 'default' size of 0x20000 seems to be quite small.

Now I just wonder why it works with django-1.2.5?

comment:7 by Aymeric Augustin, 13 years ago

Resolution: invalid
Status: reopenedclosed

Some code must have changed between Django 1.2 and 1.3 and it triggers the bug, that's all...

Since it's a problem with the version of Python provided by FreeBSD, I'll close the ticket.

Thanks for your efforts to diagnose this issue!

Note: See TracTickets for help on using tickets.
Back to Top