This looks like a system-level failure of pthread_mutex_lock. 
Unfortunately, the actual return value doesn't appear to be printed here 
(it would be helpful if we could get that). So the cause could be any of 
the following:

*EINVAL *The *mutex* was created with the protocol attribute having the 
value PTHREAD_PRIO_PROTECT and the calling thread's priority is higher than 
the mutex's current priority ceiling.

*EINVAL *The value specified by *mutex* does not refer to an initialized 
mutex object.

*EAGAIN *The mutex could not be acquired because the maximum number of 
recursive locks for *mutex* has been exceeded.

*EDEADLK *The current thread already owns the mutex.

On Thursday, October 1, 2020 at 10:52:23 AM UTC-7 [email protected] wrote:

>
> Hello,
>
> I need to understand under what conditions the pthread_mutex_lock check 
> fails 
> <https://github.com/grpc/grpc/blob/master/src/core/lib/gpr/sync_posix.cc#L67>
> .
>
> Context: I'm trying to diagnose a flaky test. Intermittently, one of the 
> Google Cloud Speech API tests fails with the following message 
> <https://github.com/googleapis/python-speech/issues/76>:
>
> ```
>
> ============================= test session starts 
> ==============================
> platform linux -- Python 3.7.7, pytest-6.0.1, py-1.9.0, pluggy-0.13.1 -- 
> /workspace/speech/cloud-client/.nox/py-3-7/bin/python
> cachedir: .pytest_cache
> rootdir: /workspace, configfile: pytest.ini
> collecting ... collected 22 items
>
> beta_snippets_test.py::test_transcribe_file_with_enhanced_model PASSED   [  
> 4%]
> beta_snippets_test.py::test_transcribe_file_with_metadata PASSED         [  
> 9%]
> beta_snippets_test.py::test_transcribe_file_with_auto_punctuation PASSED [ 
> 13%]
> beta_snippets_test.py::test_transcribe_diarization PASSED                [ 
> 18%]
> beta_snippets_test.py::test_transcribe_multichannel_file E0828 
> 10:27:18.708634490   13111 sync_posix.cc:67]           assertion failed: 
> pthread_mutex_lock(mu) == 0
> Fatal Python error: Aborted
>
> Thread 0x00007f2c36e0e600 (most recent call first):
>   File "/usr/local/lib/python3.7/codecs.py", line 322 in decode
>   File 
> "/workspace/speech/cloud-client/.nox/py-3-7/lib/python3.7/site-packages/_pytest/capture.py",
>  line 484 in snap
>   File 
> "/workspace/speech/cloud-client/.nox/py-3-7/lib/python3.7/site-packages/_pytest/capture.py",
>  line 570 in readouterr
>   File 
> "/workspace/speech/cloud-client/.nox/py-3-7/lib/python3.7/site-packages/_pytest/capture.py",
>  line 657 in read_global_capture
>   File 
> "/workspace/speech/cloud-client/.nox/py-3-7/lib/python3.7/site-packages/_pytest/capture.py",
>  line 718 in item_capture
> nox > Command pytest --junitxml=sponge_log.xml failed with exit code -6
> nox > Session py-3.7 failed.
>
> ```
>
>
>
> Details:
>
>    - Original issue 
>    <https://github.com/GoogleCloudPlatform/python-docs-samples/issues/4596>
>    - New location of issue 
>    <https://github.com/googleapis/python-speech/issues/76> (*Note*: the 
>    tests have recently moved GitHub repos for reasons unrelated to this 
> error.)
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/d8849bea-838a-4519-97f2-fc0dd5f14b77n%40googlegroups.com.

Reply via email to