Hi,

I'm having an issue with the shelve and pickle modules when using pypy 5.9 with uwsgi:


+ . /etc/djangorc
+ export PYTHONHOME=/usr/local/pypy
+ export ROOTDIR=/home/www/isotoperesearch.ca/trunk
+ export BINDIR=/home/www/isotoperesearch.ca/trunk/bin
+ export LIBDIR=/home/www/isotoperesearch.ca/trunk/lib
+ export PYTHON=pypy
+ export PYTHONPATH=/home/www/isotoperesearch.ca/trunk:/home/www/isotoperesearch.ca/trunk/lib:/home/www/isotoperesearch.ca/trunk/lib/site-packages
+ export PYTHONFLAGS=
+ export PYTHONIOENCODING=UTF-8
+ export PYTHONHASHSEED=random
+ export XDSERVER_ROOTDIR=/var/db/durus27
+ export DJANGO_SETTINGS_MODULE=local_settings
+ /usr/local/pypy/bin/uwsgi --socket localhost:8000 --pypy-wsgi-file /home/www/isotoperesearch.ca/trunk/www-bin/dispatch-django.uwsgi --enable-threads --master --workers 2 --stats --stats-http=localhost:9001 --pypy-home=/usr/local/pypy
ENVIRON: PYTHONIOENCODING=UTF-8
ENVIRON: USER=erob
ENVIRON: LANGUAGE=en_CA:en
ENVIRON: PYTHONHASHSEED=random
ENVIRON: XDG_SEAT=seat0
ENVIRON: SSH_AGENT_PID=953
ENVIRON: XDG_SESSION_TYPE=x11
ENVIRON: SHLVL=1
ENVIRON: OLDPWD=/home/erob/src/django-hotsauce-0.9/tools
ENVIRON: HOME=/home/erob
ENVIRON: DESKTOP_SESSION=lightdm-xsession
ENVIRON: PYTHON=pypy
ENVIRON: XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
ENVIRON: QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1
ENVIRON: DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-DREmxCQa8j,guid=85a084108277a262e44bfc5b5a8c7c0f
ENVIRON: COLORTERM=rxvt
ENVIRON: GLADE_MODULE_PATH=:
ENVIRON: BINDIR=/home/www/isotoperesearch.ca/trunk/bin
ENVIRON: LOGNAME=erob
ENVIRON: LIBDIR=/home/www/isotoperesearch.ca/trunk/lib
ENVIRON: WINDOWID=73400322
ENVIRON: _=./runserver.sh
ENVIRON: COLORFGBG=0;15
ENVIRON: XDG_SESSION_ID=2
ENVIRON: TERM=rxvt
ENVIRON: PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
ENVIRON: GLADE_PIXMAP_PATH=:
ENVIRON: PYTHONFLAGS=
ENVIRON: SESSION_MANAGER=local/marina:@/tmp/.ICE-unix/963,unix/marina:/tmp/.ICE-unix/963
ENVIRON: XDG_MENU_PREFIX=xfce-
ENVIRON: XDG_RUNTIME_DIR=/run/user/1000
ENVIRON: XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
ENVIRON: DISPLAY=:0.0
ENVIRON: DJANGO_SETTINGS_MODULE=local_settings
ENVIRON: LANG=en_CA.utf8
ENVIRON: DESKTOP_STARTUP_ID=xfce4-panel/exo-open/980-11-marina_TIME90175547
ENVIRON: XDG_CURRENT_DESKTOP=XFCE
ENVIRON: LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
ENVIRON: XDSERVER_ROOTDIR=/var/db/durus27
ENVIRON: XDG_SESSION_DESKTOP=lightdm-xsession
ENVIRON: XAUTHORITY=/home/erob/.Xauthority
ENVIRON: ROOTDIR=/home/www/isotoperesearch.ca/trunk
ENVIRON: SSH_AUTH_SOCK=/tmp/ssh-II7nczVni2tq/agent.910
ENVIRON: GLADE_CATALOG_PATH=:
ENVIRON: XDG_GREETER_DATA_DIR=/var/lib/lightdm/data/erob
ENVIRON: SHELL=/bin/bash
ENVIRON: QT_ACCESSIBILITY=1
ENVIRON: GDMSESSION=lightdm-xsession
ENVIRON: QT_XCB_FORCE_SOFTWARE_OPENGL=1
ENVIRON: PYTHONHOME=/usr/local/pypy
ENVIRON: XDG_VTNR=7
ENVIRON: PWD=/home/www/isotoperesearch.ca/trunk
ENVIRON: XDG_DATA_DIRS=/usr/share/xfce4:/usr/local/share/:/usr/share/:/usr/share
ENVIRON: XDG_CONFIG_DIRS=/etc/xdg
ENVIRON: PYTHONPATH=/home/www/isotoperesearch.ca/trunk:/home/www/isotoperesearch.ca/trunk/lib:/home/www/isotoperesearch.ca/trunk/lib/site-packages
ENVIRON: UWSGI_RELOADS=0
max space for custom process name = 3270
[uwsgi-logger] registered "syslog"
[uwsgi-logger] registered "rsyslog"
[uwsgi-logger] registered "socket"
[uwsgi-logger] registered "redislog"
[uwsgi-logger] registered "mongodblog"
[uwsgi-logger] registered "file"
[uwsgi-logger] registered "fd"
[uwsgi-logger] registered "stdio"
[uwsgi-cheaper-algo] registered "busyness"
executable name: /usr/local/pypy/pypy2-v5.9.0-linux32/bin/uwsgi
optind:12 argc:12
[uwsgi-cheaper-algo] registered "spare"
[uwsgi-cheaper-algo] registered "backlog"
[uwsgi-cheaper-algo] registered "manual"
*** Starting uWSGI 2.0.15 (32bit) on [Wed Feb 21 16:29:50 2018] ***
***
*** You are running a DEBUG version of uWSGI, please disable debug in your build profile and recompile it ***
***
compiled with version: 6.3.0 20170516 on 09 February 2018 07:30:42
os: Linux-4.9.0-5-686-pae #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04)
nodename: marina
machine: i686
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /home/erob/www/isotoperesearch.ca/trunk
detected binary path: /usr/local/pypy/pypy2-v5.9.0-linux32/bin/uwsgi
your processes number limit is 11950
your memory page size is 4096 bytes
detected max file descriptor number: 1024
cores allocated...
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address localhost:8000 fd 3
Initialized PyPy with Python 2.7.13 (84a2f3e6a7f8, Oct 03 2017, 12:58:57)
[PyPy 5.9.0 with GCC 4.6.3]
PyPy Home: /usr/local/pypy/pypy2-v5.9.0-linux32
[uWSGI DEBUG] uwsgi socket 256 SO_RCVBUF size: 87380
[uWSGI DEBUG] uwsgi socket 256 SO_SNDBUF size: 16384
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 191964 bytes (187 KB) for 2 cores
*** Operational MODE: preforking ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 11450)
spawned uWSGI worker 1 (pid: 11454, cores: 1)
spawned uWSGI worker 2 (pid: 11455, cores: 1)
adding 8 to signal poll
*** Stats server enabled on --stats-http=localhost:9001 fd: 12 ***
[uWSGI DEBUG] PATH_INFO=/
[uWSGI DEBUG] SERVER_NAME=localhost
[uWSGI DEBUG] SCRIPT_NAME=
[uWSGI DEBUG] HTTP_HOST=localhost
12
DEBUG:New route: blogengine_vote_up
DEBUG:Registering view: blogengine_vote_up
DEBUG:callback_str: vote.vote_up
DEBUG:New route: blogengine_vote_down
DEBUG:Registering view: blogengine_vote_down
DEBUG:callback_str: vote.vote_down
DEBUG:New route: blogengine_edit
DEBUG:Registering view: blogengine_edit
DEBUG:callback_str: edit.edit
DEBUG:New route: blogengine_delete
DEBUG:Registering view: blogengine_delete
DEBUG:callback_str: delete.delete
DEBUG:New route: blogengine_add
DEBUG:Registering view: blogengine_add
DEBUG:callback_str: add.add
DEBUG:New route: blogengine_category_add
DEBUG:Registering view: blogengine_category_add
DEBUG:callback_str: category.add
DEBUG:New route: blogengine_rss_details
DEBUG:Registering view: blogengine_rss_details
DEBUG:callback_str: rss.rss
DEBUG:New route: blogengine_rss
DEBUG:Registering view: blogengine_rss
DEBUG:callback_str: rss.index
DEBUG:New route: blogengine_redirect_hack
DEBUG:Registering view: blogengine_redirect_hack
DEBUG:callback_str: detail.redirect
DEBUG:New route: blogengine_details
DEBUG:Registering view: blogengine_details
DEBUG:callback_str: detail.details
DEBUG:New route: blogengine_category_index
DEBUG:Registering view: blogengine_category_index
DEBUG:callback_str: category.index
DEBUG:New route: blogengine_category_details
DEBUG:Registering view: blogengine_category_details
DEBUG:callback_str: category.details
DEBUG:New route: blogengine_index
DEBUG:Registering view: blogengine_index
DEBUG:callback_str: index.index
DEBUG:Processing urlconf: <class 'notmm.utils.urlmap.RegexURLMap'>
DEBUG:Including pattern: ^blog/(?P<oid>[=\w]+)/vote_up/$
DEBUG:New route: blogengine_vote_up
DEBUG:Registering view: blogengine_vote_up
DEBUG:callback_str: blogengine2.views.vote.vote_up
DEBUG:Including pattern: ^blog/(?P<oid>[=\w]+)/vote_down/$
DEBUG:New route: blogengine_vote_down
DEBUG:Registering view: blogengine_vote_down
DEBUG:callback_str: blogengine2.views.vote.vote_down
DEBUG:Including pattern: ^blog/admin/(?P<oid>[=\w]+)/edit/$
DEBUG:New route: blogengine_edit
DEBUG:Registering view: blogengine_edit
DEBUG:callback_str: blogengine2.views.edit.edit
DEBUG:Including pattern: ^blog/admin/(?P<oid>[=\w]+)/delete/$
DEBUG:New route: blogengine_delete
DEBUG:Registering view: blogengine_delete
DEBUG:callback_str: blogengine2.views.delete.delete
DEBUG:Including pattern: ^blog/admin/create/$
DEBUG:New route: blogengine_add
DEBUG:Registering view: blogengine_add
DEBUG:callback_str: blogengine2.views.add.add
DEBUG:Including pattern: ^blog/admin/category/add/$
DEBUG:New route: blogengine_category_add
DEBUG:Registering view: blogengine_category_add
DEBUG:callback_str: blogengine2.views.category.add
DEBUG:Including pattern: ^blog/(?P<oid>[=\w]+)/rss/$
DEBUG:New route: blogengine_rss_details
DEBUG:Registering view: blogengine_rss_details
DEBUG:callback_str: blogengine2.views.rss.rss
DEBUG:Including pattern: ^blog/rss/$
DEBUG:New route: blogengine_rss
DEBUG:Registering view: blogengine_rss
DEBUG:callback_str: blogengine2.views.rss.index
DEBUG:Including pattern: ^blog/(?P<oid>[=\w]+)$
DEBUG:New route: blogengine_redirect_hack
DEBUG:Registering view: blogengine_redirect_hack
DEBUG:callback_str: blogengine2.views.detail.redirect
DEBUG:Including pattern: ^blog/(?P<oid>[=\w]+)/view/$
DEBUG:New route: blogengine_details
DEBUG:Registering view: blogengine_details
DEBUG:callback_str: blogengine2.views.detail.details
DEBUG:Including pattern: ^blog/category/$
DEBUG:New route: blogengine_category_index
DEBUG:Registering view: blogengine_category_index
DEBUG:callback_str: blogengine2.views.category.index
DEBUG:Including pattern: ^blog/category/(?P<slug>[-\w]+)/$
DEBUG:New route: blogengine_category_details
DEBUG:Registering view: blogengine_category_details
DEBUG:callback_str: blogengine2.views.category.details
DEBUG:Including pattern: ^blog/$
DEBUG:New route: blogengine_index
DEBUG:Registering view: blogengine_index
DEBUG:callback_str: blogengine2.views.index.index
DEBUG:Processing urlconf: <class 'notmm.utils.urlmap.RegexURLMap'>
DEBUG:Including pattern: ^contact/new/$
DEBUG:Including pattern: ^contact/done/$
DEBUG:Including pattern: ^contact/
DEBUG:Processing urlconf: <class 'notmm.utils.urlmap.RegexURLMap'>
DEBUG:Including pattern: ^comment/new/$
DEBUG:Processing urlconf: <class 'notmm.utils.urlmap.RegexURLMap'>
DEBUG:Including pattern: ^category/(?P<slug>[-\w]+)/admin/$
DEBUG:New route: mainapp_category_admin
DEBUG:Registering view: mainapp_category_admin
DEBUG:callback_str: mainapp.research.admin.admin
DEBUG:Including pattern: ^category/add/$
DEBUG:New route: mainapp_category_add
DEBUG:Registering view: mainapp_category_add
DEBUG:callback_str: mainapp.research.admin.add
DEBUG:Including pattern: ^category/(?P<slug>[-\w]+)/$
DEBUG:New route: mainapp_category
DEBUG:Registering view: mainapp_category
DEBUG:callback_str: mainapp.research.views.browse_by_category
DEBUG:Including pattern: ^$
DEBUG:New route: mainapp_index
DEBUG:Registering view: mainapp_index
DEBUG:callback_str: mainapp.research.views.index
DEBUG:Resolving path='/'
INFO:('127.0.0.1', 4343) ClientStorage (pid=11455) created RW/normal for storage: '1'
INFO:created temporary cache file '<fdopen>'
DEBUG:Using selector: PollSelector
DEBUG:disconnected <ZEO.asyncio.client.Client object at 0x034a1970> None
DEBUG:try_connecting
INFO:Connected Protocol(('127.0.0.1', 4343), '1', 0)
INFO:('127.0.0.1', 4343) Connected to storage: ('localhost', 4343)
DEBUG:new transaction
DEBUG:commit
DEBUG:new transaction
DEBUG:commit
DEBUG:new transaction
DEBUG:commit
DEBUG:new transaction
DEBUG:commit
DEBUG:new transaction
DEBUG:commit
DEBUG:callback resolved=<function index at 0x03c57d90>
DEBUG:new transaction
DEBUG:commit
DEBUG:new transaction
DEBUG:commit
DEBUG:Traceback (most recent call last):
  File "/home/erob/src/django-hotsauce-0.9/lib/notmm/controllers/base.py", line 195, in get_response
    response = callback(request, *args, **kwargs)
  File "/home/erob/src/django-hotsauce-0.9/lib/notmm/dbapi/orm/decorators.py", line 35, in _wrapper
    return view_func(req, **kwargs)
  File "/home/www/isotoperesearch.ca/trunk/lib/mainapp/research/views.py", line 30, in index
    'rss': get_feed('isotoperesearch')})
  File "/home/www/isotoperesearch.ca/trunk/lib/mainapp/feeds/utils.py", line 37, in get_feed
    feed_store['feed_choices'] = get_feed_choices()
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/shelve.py", line 132, in __setitem__
    p.dump(value)
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/pickle.py", line 224, in dump
    self.save(obj)
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/pickle.py", line 754, in save_inst
    save(stuff)
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/pickle.py", line 286, in save
    f(self, obj) # Call unbound method with explicit self
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/pickle.py", line 661, in save_dict
    self._batch_setitems(obj.iteritems())
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/pickle.py", line 675, in _batch_setitems
    save(v)
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/pickle.py", line 306, in save
    rv = reduce(self.proto)
  File "/usr/local/pypy/pypy2-v5.9.0-linux32/lib-python/2.7/copy_reg.py", line 70, in _reduce_ex
    raise TypeError, "can't pickle %s objects" % base.__name__
TypeError: can't pickle reader objects

From cffi callback <function uwsgi_pypy_wsgi_handler at 0xb374bb50>:
Traceback (most recent call last):
  File "c callback", line 485, in uwsgi_pypy_wsgi_handler
  File "/home/www/isotoperesearch.ca/trunk/www-bin/dispatch-django.uwsgi", line 17, in application
    return wsgi_app(environ, start_response)
  File "/home/erob/src/django-hotsauce-oauthclient/lib/wsgi_oauth2/middleware.py", line 291, in __call__
    return self.application(environ, start_response)
  File "/home/erob/src/django-hotsauce-0.9/lib/notmm/controllers/base.py", line 124, in __call__
    return self.application(environ, start_response)
  File "/home/erob/src/django-hotsauce-0.9/lib/notmm/controllers/base.py", line 145, in application
    response = self.get_response(request=self._request)
  File "/home/erob/src/django-hotsauce-0.9/lib/notmm/controllers/base.py", line 212, in get_response
    return self.handle500(request)
  File "/home/www/isotoperesearch.ca/trunk/lib/mainapp/handlers.py", line 45, in handle500
    remote_ip=request.environ['REMOTE_ADDR'])
KeyError: 'REMOTE_ADDR'
[pid: 11455|app: -1|req: -1/1] 127.0.0.1 () {36 vars in 419 bytes} [Wed Feb 21 16:29:58 2018] GET / => generated 0 bytes in 4850 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
SIGINT/SIGQUIT received...killing workers...
worker 1 buried after 0 seconds
worker 2 buried after 1 seconds
goodbye to uWSGI.


Any ideas what could be causing this error ?


Thanks in advance,

Etienne


_______________________________________________
uWSGI mailing list
uWSGI@lists.unbit.it
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to