Repository: tensorflow
Issue: //tensorflow/python/ops/ragged:ragged_cross_op_test is flaky
Labels: stat:awaiting tensorflower,type:bug,type:build/install,comp:mkl,subtype: ubuntu/linux

<details><summary>Click to expand!</summary> 
 
 ### Issue Type

Bug

### Have you reproduced the bug with TF nightly?

Yes

### Source

source

### Tensorflow Version

git HEAD

### Custom Code

No

### OS Platform and Distribution

Ubuntu 20.04

### Mobile device

n/a

### Python version

3.8.13

### Bazel version

5.3.0

### GCC/Compiler version

10.2.1

### CUDA/cuDNN version

n/a

### GPU model and memory

n/a

### Current Behaviour?

Test sometimes fails with segfault

### Standalone code to reproduce the issue

```shell
bazel test --build_tests_only --config=mkl_aarch64_threadpool --copt=-flax-vector-conversions --test_env=TF_ENABLE_ONEDNN_OPTS=1 --test_env=TF2_BEHAVIOR=1 --define=no_tensorflow_py_deps=true --test_lang_filters=py --test_size_filters=small,medium --test_output=errors --verbose_failures=true --test_keep_going --notest_verbose_timeout_warnings --local_test_jobs=64 --test_tag_filters=-nopip,-no_pip,-oss_serial,-no_oss,-oss_excluded,-v1only,-benchmark-test,-no_aarch64,-no_oss_py38,-no_oss_py39,-no_oss_py310 -k -- //bazel_pip/tensorflow/... -//bazel_pip/tensorflow/compiler/tf2tensorrt/... -//bazel_pip/tensorflow/compiler/xrt/... -//bazel_pip/tensorflow/core/tpu/... -//bazel_pip/tensorflow/go/... -//bazel_pip/tensorflow/java/... -//bazel_pip/tensorflow/python/integration_testing/... -//bazel_pip/tensorflow/tools/toolchains/... -//bazel_pip/tensorflow/lite/... -//bazel_pip/tensorflow/python/kernel_tests/nn_ops:atrous_conv2d_test -//bazel_pip/tensorflow/python/kernel_tests/nn_ops:conv_ops_test
```


### Relevant log output

```shell
[ RUN      ] RaggedCrossOpTest.testRaggedCrossInvalidValue
INFO:tensorflow:Running testRaggedCrossInvalidValue in GRAPH mode.
I0522 15:40:37.724678 281472914997264 test_util.py:1494] Running testRaggedCrossInvalidValue in GRAPH mode.
Fatal Python error: Segmentation fault

Thread 0x0000ffff851cc010 (most recent call first):
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1477 in _call_tf_sessionrun
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1384 in _run_fn
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1401 in _do_call
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1394 in _do_run
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 1214 in _run
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/client/session.py", line 971 in run
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/framework/test_util.py", line 2061 in run
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/framework/test_util.py", line 2693 in evaluate
  File "/tmpfs/bazel_output/_bazel_ubuntu/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/bazel_pip/tensorflow/python/ops/ragged/ragged_cross_op_test.runfiles/org_tensorflow/bazel_pip/tensorflow/python/ops/ragged/ragged_cross_op_test.py", line 478 in testRaggedCrossInvalidValue
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/framework/test_util.py", line 1498 in decorated
  File "/usr/lib/python3.10/unittest/case.py", line 549 in _callTestMethod
  File "/usr/lib/python3.10/unittest/case.py", line 591 in run
  File "/usr/lib/python3.10/unittest/case.py", line 650 in __call__
  File "/usr/lib/python3.10/unittest/suite.py", line 122 in run
  File "/usr/lib/python3.10/unittest/suite.py", line 84 in __call__
  File "/usr/lib/python3.10/unittest/suite.py", line 122 in run
  File "/usr/lib/python3.10/unittest/suite.py", line 84 in __call__
  File "/usr/lib/python3.10/unittest/runner.py", line 184 in run
  File "/usr/lib/python3.10/unittest/main.py", line 271 in runTests
  File "/usr/lib/python3.10/unittest/main.py", line 101 in __init__
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/absl/testing/absltest.py", line 2527 in _run_and_get_tests_result
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/absl/testing/absltest.py", line 2561 in run_tests
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/absl/testing/absltest.py", line 2155 in _run_in_app
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/absl/testing/absltest.py", line 2060 in main
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/platform/googletest.py", line 51 in g_main
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/absl/app.py", line 254 in _run_main
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/absl/app.py", line 308 in run
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/platform/googletest.py", line 60 in main_wrapper
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/platform/benchmark.py", line 489 in benchmarks_main
  File "/workspace/pip_test/venv_clean/lib/python3.10/site-packages/tensorflow/python/platform/googletest.py", line 62 in main
  File "/tmpfs/bazel_output/_bazel_ubuntu/eab0d61a99b6696edb3d2aff87b585e8/execroot/org_tensorflow/bazel-out/aarch64-opt/bin/bazel_pip/tensorflow/python/ops/ragged/ragged_cross_op_test.runfiles/org_tensorflow/bazel_pip/tensorflow/python/ops/ragged/ragged_cross_op_test.py", line 497 in <module>

Extension modules: numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, google._upb._message, tensorflow.python.framework.fast_tensor_util, charset_normalizer.md, h5py._errors, h5py.defs, h5py._objects, h5py.h5, h5py.h5r, h5py.utils, h5py.h5s, h5py.h5ac, h5py.h5p, h5py.h5t, h5py._conv, h5py.h5z, h5py._proxy, h5py.h5a, h5py.h5d, h5py.h5ds, h5py.h5g, h5py.h5i, h5py.h5f, h5py.h5fd, h5py.h5pl, h5py.h5o, h5py.h5l, h5py._selector, scipy._lib._ccallback_c, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.sparse.linalg._isolve._iterative, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg._cythonized_array_utils, scipy.linalg._flinalg, scipy.linalg._solve_toeplitz, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg.cython_lapack, scipy.linalg.cython_blas, scipy.linalg._matfuncs_expm, scipy.linalg._decomp_update, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.ndimage._nd_image, scipy.special._ufuncs_cxx, scipy.special._ufuncs, scipy.special._specfun, scipy.special._comb, scipy.special._ellip_harm_2, _ni_label, scipy.ndimage._ni_label (total: 72)
```
</details>