pallets / flask

The Python micro framework for building web applications.
https://flask.palletsprojects.com
BSD 3-Clause "New" or "Revised" License
68.09k stars 16.22k forks source link

Flask app can't debug within jpype #2571

Closed zhangjiajie023 closed 6 years ago

zhangjiajie023 commented 6 years ago

Expected Behavior

Debugging a app with app.run(debug=True) should work, where started a JVM by jpype

startJVM(getDefaultJVMPath(), '-ea')
if not isThreadAttachedToJVM():
      attachThreadToJVM()

Actual Behavior

app exited.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fb74759d090, pid=8686, tid=140425282705152
#
# JRE version: Java(TM) SE Runtime Environment (7.0_79-b15) (build 1.7.0_79-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.79-b02 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [_jpype.cpython-35m-x86_64-linux-gnu.so+0x65090]  JPJavaEnv::FindClass(char const*)+0x20
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/jiajie/project/superset/superset/bin/hs_err_pid8686.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

Environment

ThiefMaster commented 6 years ago

Is this using Jython to run python code? If yes, Flask only officially supports CPython and PyPy.

In any case, a segfault looks very much like a problem outside flask's scope, so I'd recommend you to report it to the developer of jpype1...

zhangjiajie023 commented 6 years ago

@ThiefMaster Using CPython. I have reported to jpype team too. TKS.