question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Immediate crash under python 3.7

See original GitHub issue

Description of issue / feature request

Locust crashes immediately after launching under python3.7. The errors appear to have something to do with greenlet or gevent.

Expected behavior

It should work normally

Actual behavior

Immediate crash. Output:

> locust -f infrastructure/locust/locustfile.py

<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
<env_path>/lib/python3.7/importlib/_bootstrap.py:219: RuntimeWarning: greenlet.greenlet size changed, may indicate binary incompatibility. Expected 144, got 128
  return f(*args, **kwds)
[2018-07-26 16:45:01,586] L08125.local/INFO/locust.main: Starting web monitor at *:8089
[2018-07-26 16:45:01,587] L08125.local/ERROR/stderr: Traceback (most recent call last):
[2018-07-26 16:45:01,587] L08125.local/ERROR/stderr: File "<env_path>/bin/locust", line 11, in <module>
[2018-07-26 16:45:01,587] L08125.local/ERROR/stderr:
[2018-07-26 16:45:01,587] L08125.local/ERROR/stderr: sys.exit(main())
[2018-07-26 16:45:01,587] L08125.local/ERROR/stderr:
[2018-07-26 16:45:01,587] L08125.local/ERROR/stderr: File "<env_path>/lib/python3.7/site-packages/locust/main.py", line 430, in main
[2018-07-26 16:45:01,588] L08125.local/ERROR/stderr:
[2018-07-26 16:45:01,588] L08125.local/ERROR/stderr: main_greenlet = gevent.spawn(web.start, locust_classes, options)
[2018-07-26 16:45:01,588] L08125.local/ERROR/stderr:
[2018-07-26 16:45:01,588] L08125.local/ERROR/stderr: File "src/gevent/greenlet.py", line 538, in gevent._greenlet.Greenlet.spawn
[2018-07-26 16:45:01,588] L08125.local/ERROR/stderr: File "src/gevent/greenlet.py", line 213, in gevent._greenlet.Greenlet.__init__
[2018-07-26 16:45:01,588] L08125.local/ERROR/stderr: File "src/gevent/_hub_local.py", line 80, in gevent.__hub_local.get_hub_noargs
[2018-07-26 16:45:01,588] L08125.local/ERROR/stderr: File "<env_path>/lib/python3.7/site-packages/gevent/hub.py", line 390, in __init__
[2018-07-26 16:45:01,589] L08125.local/ERROR/stderr:
[2018-07-26 16:45:01,589] L08125.local/ERROR/stderr: WaitOperationsGreenlet.__init__(self, None, None)
[2018-07-26 16:45:01,589] L08125.local/ERROR/stderr:
[2018-07-26 16:45:01,590] L08125.local/ERROR/stderr: File "src/gevent/_greenlet_primitives.py", line 42, in gevent.__greenlet_primitives.TrackedRawGreenlet.__init__
[2018-07-26 16:45:01,590] L08125.local/ERROR/stderr: SystemError
[2018-07-26 16:45:01,590] L08125.local/ERROR/stderr: :
[2018-07-26 16:45:01,590] L08125.local/ERROR/stderr: Objects/dictobject.c:1439: bad argument to internal function
[2018-07-26 16:45:01,590] L08125.local/ERROR/stderr:

Environment settings (for bug reports)

  • OS: macos Sierra (10.12.6)
  • Python version: 3.7.0
  • Locust version: 0.8.1

Steps to reproduce (for bug reports)

  • Create a virtualenv with python 3.7
  • activate the virtualenv
  • pip install locustio
  • make a locustfile (The quickstart one is fine)
  • run locust -f <path_to_locustfile>

Edit: the package name is locustio, not locust :p

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
anentropiccommented, Aug 7, 2018

Working fine under python 3.7 for me with the pinned gevent (1.3.5) and greenlet (0.4.13) versions

1reaction
anentropiccommented, Jul 27, 2018

http://www.gevent.org/changelog.html#unreleased

1.3.6 (unreleased) gevent now depends on greenlet 0.4.14 or above. gevent binary wheels for 1.3.5 and below must have greenlet 0.4.13 installed on Python 3.7 or they will crash. Reported by Alexey Stepanov in issue #1260 and pkittenis in issue #1261.

My fresh install of locustio on Py3.7 gave me:

  • gevent [required: >=1.2.2, installed: 1.3.5]
  • greenlet [required: >=0.4.13, installed: 0.4.14]

installing and pinning greenlet==0.4.13 fixed it for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python launcher keeps crashing - Stack Overflow
When I try to open the file with python 3.7.4 by right clicking then going to the python idle and running the file...
Read more >
multiprocessing crashes in Python 3.7.3 on Windows
If I run the following sample program using Python 3.7.3 (64 bit) for Windows, it immediately fails, producing a massive traceback. import ...
Read more >
Issue 35408: Python3.7 crash in PyCFunction_New due to ...
The reproducer runs normally with Python 3.6.5, but it crashes with Python 3.7.1. The reason seems to be that the _PyObject_GC_TRACK macro ...
Read more >
Issue 33042: New 3.7 startup sequence crashes PyInstaller
c. The workflow roughly is: - SetProgramName - SetPythonHome - Py_SetPath - Setting runtime options - some flags using the global variables - ......
Read more >
Interpreter crashes with "can't initialize init_sys_streams" when ...
Just noticed this (tested on Python 3.7 and 3.8): mkdir /tmp/demo cd /tmp/demo cat ... lib/python3.7/io.py", line 52, in <module> File ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found