Note that there are some explanatory texts on larger screens.

plurals
  1. PORunning python Django script from console: Segmentation fault
    text
    copied!<p>Ububntu 11.10, Python 2.7.2+, Django 1.3.1</p> <p>When I'm starting huge script "parser.py" with command <code># python parser.py</code> (in the root directory of my django app), it returns "Segmentation fault" after several minutes of working.</p> <p>parser.py:</p> <pre><code>from django.core.management import setup_environ import settings setup_environ(settings) # here comes lots of code for parsing some pages </code></pre> <p>I'm using urllib and xmlrpclib in this script.</p> <hr> <p>I'm usng vps from this template <a href="http://wiki.openvz.org/Download/template/precreated" rel="nofollow">http://wiki.openvz.org/Download/template/precreated</a> (ubuntu-11.10-x86_64.tar.gz (signature))</p> <hr> <p>maybe problem is here?</p> <pre><code>root@spravker:/var/log# cat /proc/user_beancounters Version: 2.5 uid resource held maxheld barrier limit failcnt 2311649: kmemsize 9042870 19404189 52497139 57746852 0 lockedpages 0 1034 2563 2563 0 privvmpages 125787 208103 262144 262144 0 shmpages 1938 3874 27750 27750 0 dummy 0 0 0 0 0 numproc 40 200 200 200 2173 </code></pre> <hr> <h1>strace -o logfile.txt python parser.py</h1> <pre><code>munmap(0x2b6ed1d4b000, 4096) = 0 stat("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=20, ...}) = 0 socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 4 connect(4, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("8.8.8.8")}, 16) = 0 poll([{fd=4, events=POLLOUT}], 1, 0) = 1 ([{fd=4, revents=POLLOUT}]) sendto(4, "\343X\1\0\0\1\0\0\0\0\0\0\nblogsearch\6google\3c"..., 39, MSG_NOSIGNAL, NULL, 0) = 39 poll([{fd=4, events=POLLIN}], 1, 5000) = -1 EINTR (Interrupted system call) —- SIGSEGV (Segmentation fault) @ 0 (0) —- +++ killed by SIGSEGV +++ </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload