Bus Error: 10 (Intro Tutorial)

1,867 views
Skip to first unread message

Harald Sigh Andertun

unread,
Apr 19, 2012, 11:36:53 AM4/19/12
to django...@googlegroups.com
Hi all

I am totally new to django. Have followed the intro tutorial until part 2, but when I start the development server and tries to access the admin page Python crashes immediately. The console prints "Bus error: 10".
I have been googling for a while now, but can't figure out why this error occurs.

Is it a code error, or an environment issue?

I use Python 2.6.2 and Django 1.4.0, and I have choosen sqlite3 as db.

I hope someone can enlighten me in what direction the problem might be ;)

Cheers,
Harald

David Markey

unread,
Apr 19, 2012, 11:50:16 AM4/19/12
to django...@googlegroups.com
Bus error is usually a very low level problem.

Can you give a screen shot?

If you are on linux, also post dmesg.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/8EP1qv3APR4J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Harald Sigh Andertun

unread,
Apr 19, 2012, 11:59:46 AM4/19/12
to django...@googlegroups.com, ad...@dmarkey.com
I actually just found the problem (by accident)

I had forgot a comma in the urls.py

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
)
                                             ^^ here

I am surprised this mistake caused a bus error.

Thanks for the help anyway :)

- Harald


Den torsdag den 19. april 2012 17.50.16 UTC+2 skrev David Markey:
Bus error is usually a very low level problem.

Can you give a screen shot?

If you are on linux, also post dmesg.

On 19 April 2012 16:36, Harald Sigh Andertun wrote:
Hi all

I am totally new to django. Have followed the intro tutorial until part 2, but when I start the development server and tries to access the admin page Python crashes immediately. The console prints "Bus error: 10".
I have been googling for a while now, but can't figure out why this error occurs.

Is it a code error, or an environment issue?

I use Python 2.6.2 and Django 1.4.0, and I have choosen sqlite3 as db.

I hope someone can enlighten me in what direction the problem might be ;)

Cheers,
Harald

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/8EP1qv3APR4J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
Message has been deleted
Message has been deleted

Nikolas Stevenson-Molnar

unread,
Apr 19, 2012, 1:24:39 PM4/19/12
to django...@googlegroups.com
Yes, that is very strange. Things like that should cause SyntaxErrors, and if that was the only/last URL, you shouldn't even need a comma there. Whenever I've had bus errors, it usually ends up being a threading problem, or a problem with a C extension.

_Nik
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/b2YP3DyFrq0J.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.

Harald Sigh Andertun

unread,
Apr 19, 2012, 1:33:39 PM4/19/12
to django...@googlegroups.com
The syntax error was not the only problem. It helped a bit, but I still got bus errors.

I installed Python 2.7 and reinstalled Django-1.4 using pip insted of django's own setup.py install

I don't know if I've been wiser, but at least it seems to work now :-)

David Markey

unread,
Apr 19, 2012, 2:39:55 PM4/19/12
to django...@googlegroups.com
Could have been an abi change between python and a new library installed with one of the OSX upgrades.



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/wbphSrYwBCoJ.

Xavier Ordoquy

unread,
Apr 20, 2012, 7:31:19 AM4/20/12
to django...@googlegroups.com
Hi,

I've never faced such issue with Django on OSX.
Do you use or import non pure python apps ?
What python version do you use ? Stock osx one ? homebrew ? homemade ?

Regards,
Xavier.

Le 19 avr. 2012 à 18:16, Harald Sigh Andertun a écrit :

I'll attach a screenshot. It works for some time, but eventually crashes.

I'm on Mac OS X Lion.



Den torsdag den 19. april 2012 17.50.16 UTC+2 skrev David Markey:
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/c4km0y-4gekJ.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
<django_intro_crash.png>

Harald Sigh Andertun

unread,
Apr 20, 2012, 7:38:25 AM4/20/12
to django...@googlegroups.com
Hi Xavier

I now use Python 2.7 and reinstalled django-1.4 with pip this time. It solved the problem. :)

- Harald
Xavier.

<django_intro_crash.png>

Tom Evans

unread,
Apr 20, 2012, 7:58:52 AM4/20/12
to django...@googlegroups.com
On Thu, Apr 19, 2012 at 5:11 PM, Harald Sigh Andertun
<harald....@gmail.com> wrote:
> I'm sorry. Actually that was not the solution. It works sometimes now, which
> it didn't before. I'll attach a screenshot.
>
> I'm on mac (OS X Lion).
>

A bus error occurs due to unaligned memory access, or access to a non
existent memory address. In the absence of an actual bug (which others
would see), this clearly indicates that one or another of the C
libraries used by python conflicts with it.

This could happen if you compiled a C library to use with python, like
one of the many python packages that consist of a small C library
(mysql and postgresql DB adaptors, PIL, many others), and use it with
a different python than it was compiled against.

It probably has very little to do with django - django is pure python
- but with one of the libraries that is used by django or your code.
The solution is simple; remove everything, start from scratch and
recompile/reinstall everything relevant.

It is probably trickier as OS X does interesting things with python,
and most users end up with a system python and a user python. Making
sure your installed extensions are compiled and used with the right
python is then what is important.

Cheers

Tom

James

unread,
Apr 21, 2012, 6:18:56 PM4/21/12
to Django users
I just started receiving the same error "Bus error: 10". I made a
small code change and
it suddenly appeared. I've reverted but that doesn't seem to matter.
Very odd behavior.
I'll continue debugging. My settings:

Python 2.7.1
OS:X Lion 10.7.3
Django 1.4.0

James Leard

On Apr 20, 7:58 am, Tom Evans <tevans...@googlemail.com> wrote:
> On Thu, Apr 19, 2012 at 5:11 PM, Harald Sigh Andertun
>

Nikolas Stevenson-Molnar

unread,
Apr 23, 2012, 1:31:39 PM4/23/12
to django...@googlegroups.com
I would try reinstalling Python and Django. This seemed to resolve the
issue of the original poster.

_Nik

James

unread,
Apr 23, 2012, 2:36:19 PM4/23/12
to Django users
I found the problem. I had overridden __getattr__ and returned
self.value which did not yet exist on the object. This caused a
maximum recursion depth RuntimeError. I'm still not sure why this
became "Bus error: 10", however.

James Leard

On Apr 23, 1:31 pm, Nikolas Stevenson-Molnar <nik.mol...@consbio.org>
wrote:
Reply all
Reply to author
Forward
0 new messages