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

BF: limit CMD_MAX_ARG if obnoxious value is encountered. #5945

Merged
merged 1 commit into from Sep 7, 2021

Conversation

yarikoptic
Copy link
Member

Apparently the issue observed with elderly python 3.4 (no longer
supported) on Debian system, is likely to do nothing with the
Python but some peculiarity of the system since now was observed on
CentOS conda env with Python 3.9.

Since our hardcoded limits are quite generous, and 3.4 is no longer
support anyways, I decided just to add "flexible" check that if
returned value is a million times larger (still have a buffer of
thousand times in this particular case) -- take hardcoded value.

Closes #5943

Apparently the issue observed with elderly python 3.4 (no longer
supported) on Debian system, is likely to do nothing with the
Python but some peculiarity of the system since now was observed on
CentOS conda env with Python 3.9.

Since our hardcoded limits are quite generous, and 3.4 is no longer
support anyways, I decided just to add "flexible"  check that if
returned value is a million times larger (still have a buffer of
thousand times in this particular case) -- take hardcoded value.

Closes datalad#5943
@yarikoptic yarikoptic added the semver-patch Increment the patch version when merged label Sep 1, 2021
@codecov
Copy link

codecov bot commented Sep 1, 2021

Codecov Report

Merging #5945 (1c532fb) into maint (dfdd352) will decrease coverage by 5.63%.
The diff coverage is 100.00%.

❗ Current head 1c532fb differs from pull request most recent head 8aad62e. Consider uploading reports for the commit 8aad62e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##            maint    #5945      +/-   ##
==========================================
- Coverage   90.28%   84.65%   -5.64%     
==========================================
  Files         300      297       -3     
  Lines       42516    42480      -36     
==========================================
- Hits        38387    35961    -2426     
- Misses       4129     6519    +2390     
Impacted Files Coverage Δ
datalad/utils.py 81.56% <100.00%> (-3.55%) ⬇️
datalad/support/tests/utils.py 0.00% <0.00%> (-100.00%) ⬇️
datalad/metadata/extractors/tests/test_audio.py 19.35% <0.00%> (-80.65%) ⬇️
datalad/metadata/extractors/xmp.py 12.96% <0.00%> (-79.63%) ⬇️
datalad/metadata/extractors/exif.py 18.75% <0.00%> (-78.13%) ⬇️
datalad/metadata/extractors/image.py 19.35% <0.00%> (-77.42%) ⬇️
datalad/metadata/extractors/audio.py 20.00% <0.00%> (-77.15%) ⬇️
datalad/metadata/extractors/tests/test_exif.py 24.00% <0.00%> (-76.00%) ⬇️
datalad/metadata/extractors/tests/test_xmp.py 26.92% <0.00%> (-73.08%) ⬇️
datalad/metadata/extractors/tests/test_image.py 26.92% <0.00%> (-73.08%) ⬇️
... and 106 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfdd352...8aad62e. Read the comment docs.

@yarikoptic
Copy link
Member Author

appveyor -- mac not even bothering to start

travis

======================================================================
ERROR: datalad.tests.test_archives.test_decompress_file('strip',)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/dl-miniconda-e7dty8st/lib/python3.9/site-packages/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/tmp/dl-miniconda-e7dty8st/lib/python3.9/site-packages/datalad/tests/utils.py", line 585, in _wrap_with_tree
    return t(*(arg + (d,)), **kw)
  File "/tmp/dl-miniconda-e7dty8st/lib/python3.9/site-packages/datalad/tests/test_archives.py", line 78, in check_decompress_file
    decompress_file(op.join(path, fn_archive_obscure_ext), outdir,
  File "/tmp/dl-miniconda-e7dty8st/lib/python3.9/site-packages/datalad/support/archives.py", line 99, in decompress_file
    rmdir(widow_dir)
  File "/tmp/dl-miniconda-e7dty8st/lib/python3.9/site-packages/datalad/utils.py", line 476, in rmdir
    os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/tmp/nfsmount/datalad-e4vqr_en/simple-extracted/ |;&%b5{}\'"ΔЙקم๗あ .dbtc '

which is #4496 .

@yarikoptic
Copy link
Member Author

Will merge tomorrow of no objections

Copy link
Member

@mih mih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be safe ;-)

@yarikoptic
Copy link
Member Author

travis -- AFAIK known NFS failing test, appveyor -- regular OSX fiasco. Let's proceed

@yarikoptic yarikoptic merged commit 6f551f4 into datalad:maint Sep 7, 2021
@yarikoptic yarikoptic deleted the bf-maxarg branch October 8, 2021 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants