Skip to content

Setting stack resource limit to infinity via resource.strlimit fails when importing bigframes.pandas on macOS #540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sixdimensionalarray opened this issue Mar 28, 2024 · 3 comments
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API.

Comments

@sixdimensionalarray
Copy link

sixdimensionalarray commented Mar 28, 2024

It appears that resource.strlimit is unable to set the stack resource limit to RLIM_INFINITY in macOS Sonoma 14.1 build 23B74.

It looks like by running sudo ulimit -s unlimited would allow this to be set, but it seems bad to have to escalate to super admin in order to achieve the outcome. Not sure what the expected outcome is here. Commenting those lines out lets scripts using bigframes using pandas run, but not sure where the limitation would be hit.

Environment details

  • OS type and version: macOS Sonoma version 14.1 build 23B74
  • Shell: zsh
  • Python version: Python: 3.10.13 (main, Aug 24 2023, 22:36:46) [Clang 14.0.3 (clang-1403.0.22.14.1)]
  • pip version: pip 23.2.1 from <path omitted>/.venv/lib/python3.10/site-packages/pip (python 3.10)
  • bigframes version: bigframes==1.0.0
Python: 3.10.13 (main, Aug 24 2023, 22:36:46) [Clang 14.0.3 (clang-1403.0.22.14.1)]
bigframes==1.0.0
google-cloud-bigquery==3.19.0
ibis==8.0.0
pandas==2.2.1
pyarrow==15.0.1
sqlglot==20.11.0

Steps to reproduce

  1. pip install bigframes
  2. open a python repl eg. python3
  3. import bigframes.pandas as bpd

Code example

around L717 of bigframes/pandas/__init__.py:

resource.setrlimit(
    resource.RLIMIT_STACK, (resource.RLIM_INFINITY, resource.RLIM_INFINITY)
)
(.venv) $ python3
Python 3.10.13 (main, Aug 24 2023, 22:36:46) [Clang 14.0.3 (clang-1403.0.22.14.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import bigframes.pandas as bpd

Stack trace

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<path-omitted>/.venv/lib/python3.10/site-packages/bigframes/pandas/__init__.py", line 717, in <module>
    resource.setrlimit(
ValueError: not allowed to raise maximum limit
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Mar 28, 2024
@apb514
Copy link

apb514 commented Apr 1, 2024

I’m also experiencing this exact error on MacOS 14.3 and Python 3.9.

@TrevorBergeron
Copy link
Contributor

Thank you for reporting this issue. We have merged #558 to address this bug. This change will be included in the next release of BigFrames - v1.1.0.

@chelsea-lin
Copy link
Contributor

Thank you so much for your feedback! I've closed this issue since it's been addressed. If you have any other thoughts or suggestions, please don't hesitate to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API.
Projects
None yet
Development

No branches or pull requests

4 participants