Skip to content
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

get_sparselabelmask() causes crash if dvid returns no blocks #38

Open
stuarteberg opened this issue Feb 21, 2018 · 0 comments
Open

get_sparselabelmask() causes crash if dvid returns no blocks #38

stuarteberg opened this issue Feb 21, 2018 · 0 comments

Comments

@stuarteberg
Copy link
Member

stuarteberg commented Feb 21, 2018

I haven't completely finished debugging this yet, but I found a case that consistently causes get_sparselabelmask() to crash.

First, an example of a "bad" request, which results in a reasonable error: If you ask for the sparse mask of a label that doesn't exist at all in the labelarray (at any scale), you get a 404 error.

non_existent_label = 2**60
coords, blocks = ns.get_sparselabelmask( non_existent_label, cls.instance, scale=6 )
libdvid._dvid_python.DVIDException: (404, 'DVID Error (404): DVIDException for /node/cc47dc5d1d6645ec9dfa7e9f06cf7898/labels_test_mask_utils/sparsevol/1152921504606846976?format=blocks&scale=6\n\n')

So far, so good. But what if the label DOES exist, just not at the scale you're requesting? (That is, it got downsampled out of existence at your requested scale.) In that case, something goes off-the-rails. In my case, it seems to have corrupted the Python heap, but I'm not sure.

Fatal Python error: Floating point exception

Current thread 0x00007fff9a16a3c0 (most recent call first):
  File "/Users/bergs/Documents/workspace/DVIDSparkServices/unit_tests/dvid/test_mask_utils.py", line 38 in setUpClass
  File "/miniforge/envs/flyem-forge/lib/python3.6/unittest/suite.py", line 163 in _handleClassSetUp
  File "/miniforge/envs/flyem-forge/lib/python3.6/unittest/suite.py", line 114 in run
  File "/miniforge/envs/flyem-forge/lib/python3.6/unittest/suite.py", line 84 in __call__
  File "/miniforge/envs/flyem-forge/lib/python3.6/unittest/suite.py", line 122 in run
  File "/miniforge/envs/flyem-forge/lib/python3.6/unittest/suite.py", line 84 in __call__
  File "/miniforge/envs/flyem-forge/lib/python3.6/unittest/runner.py", line 176 in run
  File "/miniforge/envs/flyem-forge/lib/python3.6/unittest/main.py", line 256 in runTests
  File "/miniforge/envs/flyem-forge/lib/python3.6/unittest/main.py", line 95 in __init__
  File "/Users/bergs/Documents/workspace/DVIDSparkServices/unit_tests/dvid/test_mask_utils.py", line 55 in <module>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant