Yun Gao created FLINK-26042:
-------------------------------

             Summary: PyFlinkEmbeddedSubInterpreterTests. 
test_udf_without_arguments failed on azure
                 Key: FLINK-26042
                 URL: https://issues.apache.org/jira/browse/FLINK-26042
             Project: Flink
          Issue Type: Bug
          Components: API / Python
    Affects Versions: 1.15.0
            Reporter: Yun Gao



{code:java}
2022-02-08T02:55:16.0701246Z Feb 08 02:55:16 
=================================== FAILURES ===================================
2022-02-08T02:55:16.0702483Z Feb 08 02:55:16 ________ 
PyFlinkEmbeddedSubInterpreterTests.test_udf_without_arguments _________
2022-02-08T02:55:16.0703190Z Feb 08 02:55:16 
2022-02-08T02:55:16.0703959Z Feb 08 02:55:16 self = 
<pyflink.table.tests.test_udf.PyFlinkEmbeddedSubInterpreterTests 
testMethod=test_udf_without_arguments>
2022-02-08T02:55:16.0704967Z Feb 08 02:55:16 
2022-02-08T02:55:16.0705639Z Feb 08 02:55:16     def 
test_udf_without_arguments(self):
2022-02-08T02:55:16.0706641Z Feb 08 02:55:16         one = udf(lambda: 1, 
result_type=DataTypes.BIGINT(), deterministic=True)
2022-02-08T02:55:16.0707595Z Feb 08 02:55:16         two = udf(lambda: 2, 
result_type=DataTypes.BIGINT(), deterministic=False)
2022-02-08T02:55:16.0713079Z Feb 08 02:55:16     
2022-02-08T02:55:16.0714866Z Feb 08 02:55:16         table_sink = 
source_sink_utils.TestAppendSink(['a', 'b'],
2022-02-08T02:55:16.0716495Z Feb 08 02:55:16                                    
                   [DataTypes.BIGINT(), DataTypes.BIGINT()])
2022-02-08T02:55:16.0717411Z Feb 08 02:55:16         
self.t_env.register_table_sink("Results", table_sink)
2022-02-08T02:55:16.0718059Z Feb 08 02:55:16     
2022-02-08T02:55:16.0719148Z Feb 08 02:55:16         t = 
self.t_env.from_elements([(1, 2), (2, 5), (3, 1)], ['a', 'b'])
2022-02-08T02:55:16.0719974Z Feb 08 02:55:16 >       t.select(one(), 
two()).execute_insert("Results").wait()
2022-02-08T02:55:16.0720697Z Feb 08 02:55:16 
2022-02-08T02:55:16.0721294Z Feb 08 02:55:16 
pyflink/table/tests/test_udf.py:252: 
2022-02-08T02:55:16.0722119Z Feb 08 02:55:16 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2022-02-08T02:55:16.0722943Z Feb 08 02:55:16 pyflink/table/table_result.py:76: 
in wait
2022-02-08T02:55:16.0723686Z Feb 08 02:55:16     
get_method(self._j_table_result, "await")()
2022-02-08T02:55:16.0725024Z Feb 08 02:55:16 
.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py:1322: in 
__call__
2022-02-08T02:55:16.0726044Z Feb 08 02:55:16     answer, self.gateway_client, 
self.target_id, self.name)
2022-02-08T02:55:16.0726824Z Feb 08 02:55:16 pyflink/util/exceptions.py:146: in 
deco
2022-02-08T02:55:16.0727569Z Feb 08 02:55:16     return f(*a, **kw)
2022-02-08T02:55:16.0728326Z Feb 08 02:55:16 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2022-02-08T02:55:16.0728995Z Feb 08 02:55:16 
2022-02-08T02:55:16.0729717Z Feb 08 02:55:16 answer = 'x'
2022-02-08T02:55:16.0730447Z Feb 08 02:55:16 gateway_client = 
<py4j.java_gateway.GatewayClient object at 0x7fadb5dc97f0>
2022-02-08T02:55:16.0731465Z Feb 08 02:55:16 target_id = 'o26503', name = 
'await'
2022-02-08T02:55:16.0732045Z Feb 08 02:55:16 
2022-02-08T02:55:16.0732763Z Feb 08 02:55:16     def get_return_value(answer, 
gateway_client, target_id=None, name=None):
2022-02-08T02:55:16.0733699Z Feb 08 02:55:16         """Converts an answer 
received from the Java gateway into a Python object.
2022-02-08T02:55:16.0734508Z Feb 08 02:55:16     
2022-02-08T02:55:16.0735205Z Feb 08 02:55:16         For example, string 
representation of integers are converted to Python
2022-02-08T02:55:16.0736228Z Feb 08 02:55:16         integer, string 
representation of objects are converted to JavaObject
2022-02-08T02:55:16.0736974Z Feb 08 02:55:16         instances, etc.
2022-02-08T02:55:16.0737508Z Feb 08 02:55:16     
2022-02-08T02:55:16.0738185Z Feb 08 02:55:16         :param answer: the string 
returned by the Java gateway
2022-02-08T02:55:16.0739074Z Feb 08 02:55:16         :param gateway_client: the 
gateway client used to communicate with the Java
2022-02-08T02:55:16.0739994Z Feb 08 02:55:16             Gateway. Only 
necessary if the answer is a reference (e.g., object,
2022-02-08T02:55:16.0740723Z Feb 08 02:55:16             list, map)
2022-02-08T02:55:16.0741491Z Feb 08 02:55:16         :param target_id: the name 
of the object from which the answer comes from
2022-02-08T02:55:16.0742350Z Feb 08 02:55:16             (e.g., *object1* in 
`object1.hello()`). Optional.
2022-02-08T02:55:16.0743175Z Feb 08 02:55:16         :param name: the name of 
the member from which the answer comes from
2022-02-08T02:55:16.0744315Z Feb 08 02:55:16             (e.g., *hello* in 
`object1.hello()`). Optional.
2022-02-08T02:55:16.0744973Z Feb 08 02:55:16         """
2022-02-08T02:55:16.0745608Z Feb 08 02:55:16         if is_error(answer)[0]:
2022-02-08T02:55:16.0746484Z Feb 08 02:55:16             if len(answer) > 1:
2022-02-08T02:55:16.0747162Z Feb 08 02:55:16                 type = answer[1]
2022-02-08T02:55:16.0747943Z Feb 08 02:55:16                 value = 
OUTPUT_CONVERTER[type](answer[2:], gateway_client)
2022-02-08T02:55:16.0748809Z Feb 08 02:55:16                 if answer[1] == 
REFERENCE_TYPE:
2022-02-08T02:55:16.0749555Z Feb 08 02:55:16                     raise 
Py4JJavaError(
2022-02-08T02:55:16.0750313Z Feb 08 02:55:16                         "An error 
occurred while calling {0}{1}{2}.\n".
2022-02-08T02:55:16.0751291Z Feb 08 02:55:16                         
format(target_id, ".", name), value)
2022-02-08T02:55:16.0752004Z Feb 08 02:55:16                 else:
2022-02-08T02:55:16.0752642Z Feb 08 02:55:16                     raise 
Py4JError(
2022-02-08T02:55:16.0753484Z Feb 08 02:55:16                         "An error 
occurred while calling {0}{1}{2}. Trace:\n{3}\n".
2022-02-08T02:55:16.0754479Z Feb 08 02:55:16                         
format(target_id, ".", name, value))
2022-02-08T02:55:16.0755171Z Feb 08 02:55:16             else:
2022-02-08T02:55:16.0755914Z Feb 08 02:55:16                 raise Py4JError(
2022-02-08T02:55:16.0756575Z Feb 08 02:55:16                     "An error 
occurred while calling {0}{1}{2}".
2022-02-08T02:55:16.0757325Z Feb 08 02:55:16 >                   
format(target_id, ".", name))
2022-02-08T02:55:16.0758178Z Feb 08 02:55:16 E               
py4j.protocol.Py4JError: An error occurred while calling o26503.await
2022-02-08T02:55:16.0758918Z Feb 08 02:55:16 
2022-02-08T02:55:16.0760185Z Feb 08 02:55:16 
.tox/py37-cython/lib/python3.7/site-packages/py4j/protocol.py:336: Py4JError
2022-02-08T02:55:16.0761380Z Feb 08 02:55:16 ----------------------------- 
Captured stdout call -----------------------------
2022-02-08T02:55:16.0762060Z Feb 08 02:55:16 #
2022-02-08T02:55:16.0762752Z Feb 08 02:55:16 # A fatal error has been detected 
by the Java Runtime Environment:
2022-02-08T02:55:16.0763425Z Feb 08 02:55:16 #
2022-02-08T02:55:16.0764075Z Feb 08 02:55:16 #  SIGSEGV (0xb) at 
pc=0x00007f417f38bc06, pid=19997, tid=0x00007f4159d73700
2022-02-08T02:55:16.0764867Z Feb 08 02:55:16 #
2022-02-08T02:55:16.0766133Z Feb 08 02:55:16 # JRE version: OpenJDK Runtime 
Environment (8.0_292-b10) (build 1.8.0_292-8u292-b10-0ubuntu1~16.04.1-b10)
2022-02-08T02:55:16.0767491Z Feb 08 02:55:16 # Java VM: OpenJDK 64-Bit Server 
VM (25.292-b10 mixed mode linux-amd64 compressed oops)
2022-02-08T02:55:16.0768305Z Feb 08 02:55:16 # Problematic frame:
2022-02-08T02:55:16.0769026Z Feb 08 02:55:16 # C  
[libpython3.7m.so.1.0+0x1f5c06]  _PyObject_Malloc+0x76
2022-02-08T02:55:16.0769662Z Feb 08 02:55:16 #
2022-02-08T02:55:16.0770699Z Feb 08 02:55:16 # Core dump written. Default 
location: /__w/2/s/flink-python/core or core.19997
2022-02-08T02:55:16.0771460Z Feb 08 02:55:16 #
2022-02-08T02:55:16.0772156Z Feb 08 02:55:16 # An error report file with more 
information is saved as:
2022-02-08T02:55:16.0773210Z Feb 08 02:55:16 # 
/__w/2/s/flink-python/hs_err_pid19997.log
2022-02-08T02:55:16.0773840Z Feb 08 02:55:16 #
2022-02-08T02:55:16.0774570Z Feb 08 02:55:16 # If you would like to submit a 
bug report, please visit:
2022-02-08T02:55:16.0775367Z Feb 08 02:55:16 #   
http://bugreport.java.com/bugreport/crash.jsp
2022-02-08T02:55:16.0776264Z Feb 08 02:55:16 # The crash happened outside the 
Java Virtual Machine in native code.
2022-02-08T02:55:16.0777074Z Feb 08 02:55:16 # See problematic frame for where 
to report the bug.
2022-02-08T02:55:16.0777677Z Feb 08 02:55:16 #
2022-02-08T02:55:16.0778665Z Feb 08 02:55:16 ------------------------------ 
Captured log call -------------------------------
2022-02-08T02:55:16.0779519Z Feb 08 02:55:16 ERROR    root:java_gateway.py:1056 
Exception while sending command.
2022-02-08T02:55:16.0780512Z Feb 08 02:55:16 Traceback (most recent call last):
2022-02-08T02:55:16.0781811Z Feb 08 02:55:16   File 
"/__w/2/s/flink-python/.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py",
 line 1224, in send_command
2022-02-08T02:55:16.0782801Z Feb 08 02:55:16     raise Py4JNetworkError("Answer 
from Java side is empty")
2022-02-08T02:55:16.0783648Z Feb 08 02:55:16 py4j.protocol.Py4JNetworkError: 
Answer from Java side is empty
2022-02-08T02:55:16.0784455Z Feb 08 02:55:16 
2022-02-08T02:55:16.0785200Z Feb 08 02:55:16 During handling of the above 
exception, another exception occurred:
2022-02-08T02:55:16.0786054Z Feb 08 02:55:16 
2022-02-08T02:55:16.0786654Z Feb 08 02:55:16 Traceback (most recent call last):
2022-02-08T02:55:16.0787982Z Feb 08 02:55:16   File 
"/__w/2/s/flink-python/.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py",
 line 1038, in send_command
2022-02-08T02:55:16.0789321Z Feb 08 02:55:16     response = 
connection.send_command(command)
2022-02-08T02:55:16.0790649Z Feb 08 02:55:16   File 
"/__w/2/s/flink-python/.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py",
 line 1229, in send_command
2022-02-08T02:55:16.0791618Z Feb 08 02:55:16     "Error while receiving", e, 
proto.ERROR_ON_RECEIVE)
2022-02-08T02:55:16.0792405Z Feb 08 02:55:16 py4j.protocol.Py4JNetworkError: 
Error while receiving
2022-02-08T02:55:16.0793242Z Feb 08 02:55:16 ______ 
PyFlinkStreamUserDefinedFunctionTests.test_execute_from_json_plan _______
2022-02-08T02:55:16.0793915Z Feb 08 02:55:16 
2022-02-08T02:55:16.0794707Z Feb 08 02:55:16 self = 
<py4j.java_gateway.GatewayClient object at 0x7fadb5dc97f0>
2022-02-08T02:55:16.0795354Z Feb 08 02:55:16 
2022-02-08T02:55:16.0796067Z Feb 08 02:55:16     def _get_connection(self):
2022-02-08T02:55:16.0796782Z Feb 08 02:55:16         if not self.is_connected:
2022-02-08T02:55:16.0797537Z Feb 08 02:55:16             raise 
Py4JNetworkError("Gateway is not connected.")
2022-02-08T02:55:16.0798233Z Feb 08 02:55:16         try:
2022-02-08T02:55:16.0798882Z Feb 08 02:55:16 >           connection = 
self.deque.pop()
2022-02-08T02:55:16.0799589Z Feb 08 02:55:16 E           IndexError: pop from 
an empty deque
2022-02-08T02:55:16.0800212Z Feb 08 02:55:16 
2022-02-08T02:55:16.0801304Z Feb 08 02:55:16 
.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py:982: 
IndexError
2022-02-08T02:55:16.0802023Z Feb 08 02:55:16 
2022-02-08T02:55:16.0802720Z Feb 08 02:55:16 During handling of the above 
exception, another exception occurred:
2022-02-08T02:55:16.0803443Z Feb 08 02:55:16 
2022-02-08T02:55:16.0804235Z Feb 08 02:55:16 self = 
<py4j.java_gateway.GatewayConnection object at 0x7faecec6ecc0>
2022-02-08T02:55:16.0804911Z Feb 08 02:55:16 
2022-02-08T02:55:16.0805463Z Feb 08 02:55:16     def start(self):
2022-02-08T02:55:16.0806319Z Feb 08 02:55:16         """Starts the connection 
by connecting to the `address` and the `port`
2022-02-08T02:55:16.0807034Z Feb 08 02:55:16         """
2022-02-08T02:55:16.0807593Z Feb 08 02:55:16         try:
2022-02-08T02:55:16.0808269Z Feb 08 02:55:16 >           
self.socket.connect((self.address, self.port))
2022-02-08T02:55:16.0809116Z Feb 08 02:55:16 E           
ConnectionRefusedError: [Errno 111] Connection refused
2022-02-08T02:55:16.0809804Z Feb 08 02:55:16 
2022-02-08T02:55:16.0810912Z Feb 08 02:55:16 
.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py:1132: 
ConnectionRefusedError
2022-02-08T02:55:16.0811653Z Feb 08 02:55:16 
2022-02-08T02:55:16.0812378Z Feb 08 02:55:16 During handling of the above 
exception, another exception occurred:
2022-02-08T02:55:16.0813232Z Feb 08 02:55:16 
pyflink/testing/test_case_utils.py:137: in setUp
2022-02-08T02:55:16.0814075Z Feb 08 02:55:16     self.t_env = 
TableEnvironment.create(EnvironmentSettings.in_streaming_mode())
2022-02-08T02:55:16.0815068Z Feb 08 02:55:16 
pyflink/table/environment_settings.py:267: in in_streaming_mode
2022-02-08T02:55:16.0816018Z Feb 08 02:55:16     
get_gateway().jvm.EnvironmentSettings.inStreamingMode())
2022-02-08T02:55:16.0826059Z Feb 08 02:55:16 
.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py:1712: in 
__getattr__
2022-02-08T02:55:16.0826592Z Feb 08 02:55:16     "\n" + proto.END_COMMAND_PART)
2022-02-08T02:55:16.0827339Z Feb 08 02:55:16 
.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py:1036: in 
send_command
2022-02-08T02:55:16.0827853Z Feb 08 02:55:16     connection = 
self._get_connection()
2022-02-08T02:55:16.0828568Z Feb 08 02:55:16 
.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py:984: in 
_get_connection
2022-02-08T02:55:16.0829089Z Feb 08 02:55:16     connection = 
self._create_connection()
2022-02-08T02:55:16.0830171Z Feb 08 02:55:16 
.tox/py37-cython/lib/python3.7/site-packages/py4j/java_gateway.py:990: in 
_create_connection
2022-02-08T02:55:16.0830673Z Feb 08 02:55:16     connection.start()
2022-02-08T02:55:16.0831220Z Feb 08 02:55:16 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2022-02-08T02:55:16.0831828Z Feb 08 02:55:16 
2022-02-08T02:55:16.0832255Z Feb 08 02:55:16 self = 
<py4j.java_gateway.GatewayConnection object at 0x7faecec6ecc0>
2022-02-08T02:55:16.0832661Z Feb 08 02:55:16 
2022-02-08T02:55:16.0833006Z Feb 08 02:55:16     def start(self):
2022-02-08T02:55:16.0833469Z Feb 08 02:55:16         """Starts the connection 
by connecting to the `address` and the `port`
2022-02-08T02:55:16.0833921Z Feb 08 02:55:16         """
2022-02-08T02:55:16.0834369Z Feb 08 02:55:16         try:
2022-02-08T02:55:16.0834798Z Feb 08 02:55:16             
self.socket.connect((self.address, self.port))
2022-02-08T02:55:16.0835281Z Feb 08 02:55:16             self.stream = 
self.socket.makefile("rb")
2022-02-08T02:55:16.0835988Z Feb 08 02:55:16             self.is_connected = 
True
2022-02-08T02:55:16.0836367Z Feb 08 02:55:16     
2022-02-08T02:55:16.0836734Z Feb 08 02:55:16             
self._authenticate_connection()
2022-02-08T02:55:16.0837200Z Feb 08 02:55:16         except 
Py4JAuthenticationError:
2022-02-08T02:55:16.0837722Z Feb 08 02:55:16             
logger.exception("Cannot authenticate with gateway server.")
2022-02-08T02:55:16.0838161Z Feb 08 02:55:16             raise
2022-02-08T02:55:16.0838559Z Feb 08 02:55:16         except Exception as e:
2022-02-08T02:55:16.0839045Z Feb 08 02:55:16             msg = "An error 
occurred while trying to connect to the Java "\
2022-02-08T02:55:16.0839682Z Feb 08 02:55:16                 "server 
({0}:{1})".format(self.address, self.port)
2022-02-08T02:55:16.0840168Z Feb 08 02:55:16             logger.exception(msg)
2022-02-08T02:55:16.0840581Z Feb 08 02:55:16 >           raise 
Py4JNetworkError(msg, e)
2022-02-08T02:55:16.0841178Z Feb 08 02:55:16 E           
py4j.protocol.Py4JNetworkError: An error occurred while trying to connect to 
the Java server (127.0.0.1:41141)
{code}

https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=30878&view=logs&j=9cada3cb-c1d3-5621-16da-0f718fb86602&t=c67e71ed-6451-5d26-8920-5a8cf9651901&l=24930



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to