googleapis / googleapis/google-cloud-python

Segmentation Fault while running pytest with coverage

Open
#15,912 1 comment 0 reactions 1 assignee Assigned to @harshachinta View on GitHub
api: spanner
Dominant language
Python
Stars
5.4k
Forks
1.8k
Avg merge
3d 4h
Merged PRs (30d)
122

Description

I am using spanner python client to connect with spanner and my code is available and defined here: https://github.com/GoogleCloudPlatform/genai-databases-retrieval-app/blob/main/retrieval_service/datastore/providers/spanner_gsql.py

Test File: https://github.com/GoogleCloudPlatform/genai-databases-retrieval-app/blob/main/retrieval_service/datastore/providers/spanner_gsql_test.py

When I am trying to run integration testwithout coverage it's running successfully and with coverage it's failing with segmentation fault.

Commands:
With Coverage:
`python -m pytest --cov=datastore.providers.spanner_gsql --cov-config=coverage/.spanner-coveragerc datastore/providers/spanner_gsql_test.py`

Without Coverage:
`python -m pytest datastore/providers/spanner_gsql_test.py `

Error Log:
`datastore/providers/spanner_gsql_test.py Fatal Python error: Segmentation fault

Current thread 0x00007f064af502c0 (most recent call first):
File "/usr/local/google/home/gauravpurohit/ai/airport/lib/python3.11/site-packages/proto/message.py", line 615 in __init__
File "/usr/local/google/home/gauravpurohit/ai/airport/lib/python3.11/site-packages/google/cloud/spanner_v1/client.py", line 175 in __init__
File "/usr/local/google/home/gauravpurohit/ai/genai-databases-retrieval-app/retrieval_service/datastore/providers/spanner_gsql_test.py", line 62 in create_db`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.