Mac Os X Python Bus Error
User List Committer List Help Tracker Documentation Tracker Development Report Tracker Problem Issue15739 classification Title: Python crashes with "Bus error: 10" Type: crash Stage: resolved Components: macOS Versions: Python 2.7, Python 2.6 process Status: closed Resolution: duplicate Dependencies: Superseder: Exceed Recursion Limit in Thread View: 9670 Assigned To: ronaldoussoren Nosy List: Apple Grew, ned.deily, ronaldoussoren, rosslagerwall Priority: normal Keywords: Created on 2012-08-20 13:46 by Apple Grew, last changed 2012-08-21 04:54 by ronaldoussoren. This issue is now closed. Files File name Uploaded Description Edit Process Python.txt Apple Grew, 2012-08-20 13:46 Crash report Messages (9) msg168660 - (view) Author: Apple Grew (Apple Grew) Date: 2012-08-20 13:46 Python crashes when I try to access (by sending http request from borwser) my Django application. OS: Mac OSX Lion Python version: 2.7.1 (This was pre-bundled with OS and not a MacPort). There isn't a simple test case but I do have an open source app which where I am able to replicate this always on my system. 0. Make sure you have Django 1.4 installed. 1. Download the code at https://github.com/applegrew/django-select2/tree/v1.1-PythonCrasher 2. cd to django-select2/testapp folder. 3. Use python manage.py runserver & to run the server. 4. Now try accessing http://127.0.0.1:8000/ . It should crash immediately. Lines which seem to cause the crash. Follow the following instructions and the application won't crash again. 1. Open django_select2/fields.py. 2. Comment line 128, uncomment line 129. 3. Uncomment line 156 and comment lines 158 and 159. 4. Now run the app again. This time it should work. msg168663 - (view) Author: Ross Lagerwall (rosslagerwall) Date: 2012-08-20 14:42 Well the app has an infinite recursion. This shows on Fedora Linux 17: """ Request Method: GET Request URL: http://127.0.0.1:8000/ Django Version: 1.4 Exception Type: RuntimeError Exception Value: maximum recursion depth exceeded while calling a Python object Exception Location: /tmp/dg/django_select2/fields.py in __init__, line 146 Python Executable: /home/ross/src/python/2.7/python Python Version: 2.7.1 ... """ Of course, this shouldn't cause a bus error in Python. Perhaps tr
Sign in Pricing Blog Support Search GitHub This repository Watch 5 Star 17 Fork 3 Mekire/cabbages-and-kings Code Issues 1 Pull requests 0 Projects 0 Pulse Graphs New issue Crashes python with Bus error: 10 #1 Open justinmeister opened this Issue Feb 13, 2014 · 8 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 3 participants justinmeister commented Feb 13, 2014 Bus error: 10 happens every time I try to run with python 2. Owner Mekire commented Feb 15, 2014 That's strange. https://bugs.python.org/issue15739 Few follow up questions as I haven't been able to duplicate this yet: Operating system, Exact Python version, exact Pygame version? Is this with the map editor or the main program? Is there actually an exception and a traceback or does it completely crash and burn? Does it run perfectly fine with Python 3? Have you been trying things like making new maps? https://github.com/Mekire/cabbages-and-kings/issues/1 Really no clue. Thanks for the report, -Mek justinmeister commented Feb 15, 2014 Operating System: OS X 10.9.1 Python: Python 2.7.5 (v2.7.5:ab05e7dd2788+, May 15 2013, 18:43:04) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Pygame: '1.9.1release' (using pygame.version) I get the same error whether the main program or the map editor. The only error the terminal gives me is Bus error: 10. It also says "2014-02-15 07:56:57.552 Python[5471:d07] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz" but that often comes up even if the game doesn't crash, I think. I haven't pygame installed to work with python3, so I haven't been able to test it. I can try to get it to work with python 3.3 and see what happens. Nothing else (no traceback). Python crashes (quits unexpectedly) every time I try to run it. Here's the full error message if you're interested: Process: Python [5471] Path: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: org.python.python Version: 2.7.5 (2.7.5) Code Type: X86 (Native) Parent Process: bash [5375] Responsible: Terminal [153] User ID: 501 Date/Time: 2014-02-15
I makeit solve 10 million small problems in a row, it gives me a bus error. I was wondering whatcould cause it http://lp_solve.yahoogroups.narkive.com/gFxuoSxg/bus-error-on-mac-os-x-when-using-python to trigger a bus error. Its memory usage wasn't that big at the time (about450 MB on a machine with 1.5 GB of RAM)Here's the error:Python(17516) malloc: https://trac.macports.org/ticket/20286 *** vm_allocate(size=8421376) failed (error code=3)Python(17516) malloc: *** error: can't allocate regionPython(17516) malloc: *** set a breakpoint in szone_error to debugBus errorI have also seen similar code cause Segmentation mac os Fault, although I am unable to replicateit right now.And here's the (python) code that triggers it:from lpsolve55 import *for i in xrange(10000000):if i % 1000 == 0: print "iteration ", ilp = lpsolve('make_lp', 0, 10)ret = lpsolve('set_lp_name', lp, 'mymodel')lpsolve('set_verbose', 'mymodel', IMPORTANT)ret = lpsolve('set_obj_fn', 'mymodel', [-1, 1, 2, 3, 4, 5, 6, 7, 8, 9])ret = lpsolve('add_constraint', mac os x 'mymodel', [1, 1, 1+i, 0, 0, 0, 0, 0, 0, 0], LE, -1+i)ret = lpsolve('add_constraint', 'mymodel', [1, 1+i, 1+i, 0, 0, 0, 0, 0, 0, 0], LE, -1+2*i)ret = lpsolve('add_constraint', 'mymodel', [1, 1, 1+i, 0, 0, 0, 0, 0, 0, i], LE, -1+i)ret = lpsolve('add_constraint', 'mymodel', [1, 1, 1+i, 0, 0, 0, 0, 0, -i, 0], LE, -1+i)ret = lpsolve('add_constraint', 'mymodel', [1, 1, 1+i, 0, 0, 4*i, -3*i, 0, 0, 0], LE, -1+i)ret = lpsolve('add_constraint', 'mymodel', [1, 1, 1+i, 0, 0, 0, 0, 0, 0, 0], GE, -1+i)ret = lpsolve('add_constraint', 'mymodel', [1, 1, 1+i, 0, 0, 0, 0, 0, 0, 0], GE, -10+i)ret = lpsolve('add_constraint', 'mymodel', [1, 1+i, 1+i, 0, 0, 0, 0, 0, 0, 0], GE, -100+2*i)ret = lpsolve('add_constraint', 'mymodel', [1, 1, 1+i, 0, 0, 0, 0, 0, 0, i], GE, -100+i)ret = lpsolve('add_constraint', 'mymodel', [1, 1, 1+i, 0, 0, 0, 0, 0, -i, 0], GE, -100+i)ret = lpsolve('add_constraint', 'mymodel', [1, 1, 1+i, 0, 0, 4*i, -3*i, 0, 0, 0], GE, -100+i)ret = lpsolve('add_constrai
closed defect (worksforme) BUG: python26 bus error Reported by: jabronson@… Owned by: mcalhoun@… Priority: Normal Milestone: Component: ports Version: 1.7.1 Keywords: Cc: santagada@…, jeremykarlson@… Port: python26 Description When running my Pylons web app with macports python 2.6, requesting the front page in a browser triggers a bus error. This does not happen when running under Mac OS X 10.5's system Python (2.5.1) or the Mac Python 2.6.2 distribution from python.org. I attached gdb to the macports python process and triggered the error. A transcript (including backtrace) is attached. Attachments (2) 20286-python26-bus-error.txt (267.0 KB) - added by jabronson@… 7 years ago. threadboom.py (422 bytes) - added by santagada@… 7 years ago. Minimal test case that show the bus error Download all attachments as: .zip Oldest first Newest first Threaded Comments only Change History (23) Changed 7 years ago by jabronson@… Attachment 20286-python26-bus-error.txt added comment:1 Changed 7 years ago by macsforever2000@… Cc mcalhoun@… added Owner changed from macports-tickets@… to blb@… Port python26 added comment:2 follow-up: ↓ 4 Changed 7 years ago by santagada@… I've got a bus error with python from /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python when running trac. The error report can be seen here: http://paste.pocoo.org/show/133699/ and there is another user with the same problem here: http://lists.macosforge.org/pipermail/macports-users/2009-June/015563.html I found that if I use /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 instead it works. The binaries are different but I don't know why or how would it affect the execution, but maybe it is a library link problem. Try to run it with python2.6 and see if it fix this. comment:3 Changed 7 years ago by santagada@… Cc santagada@… added Cc Me! comment:4 in reply to: ↑ 2 ; follow-up: ↓ 6 Changed 7 years ago by blb@… Replying to santagada@…: I found that if I use /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 instead it works. The binaries are different but I don't know why or how would it affect the execution, but maybe it is a library link problem. Try to run it with python2.6 and see if it fix this. Odd, tracd crashes for me whether I use the py