Skip to content

Skip ftruncate_bug76422 if disk_free_space() <= 4GB #5283

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
wants to merge 1 commit into from

Conversation

TysonAndre
Copy link
Contributor

Followup to #5043

In the middle of running this test with TESTS=-j9,
run-tests.php stopped the test suite because the partition started
with 3.5GB of free disk space and new test files couldn't be created.

Reclaiming the disk space of that file also took a while.

Followup to php#5043

In the middle of running this test with TESTS=-j9,
run-tests.php stopped the test suite because the partition started
with 3.5GB of free disk space and new test files couldn't be created.

Reclaiming the disk space of that file also took a while.
Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@TysonAndre
Copy link
Contributor Author

The build failure in php-src for Mac is unrelated, it's related to compiling the recent changes in the opcache jit

/bin/bash --noprofile --norc /Users/runner/runners/2.165.2/work/_temp/ebce46e0-54f7-49f1-acf8-8ca6de005353.sh
mkdir: ext/intl/grapheme/.libs: File exists
In file included from /Users/runner/runners/2.165.2/work/1/s/ext/opcache/jit/zend_jit.c:3242:
ext/opcache/jit/zend_jit_trace.c:1668:2: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
        TRACE_FRAME_INIT(frame, op_array, 0, -1);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/opcache/jit/zend_jit_internal.h:355:49: note: expanded from macro 'TRACE_FRAME_INIT'
                _frame->_info = (uint32_t)((((int)(num_args)) << TRACE_FRAME_SHIFT_NUM_ARGS) & TRACE_FRAME_MASK_NUM_ARGS); \
                                            ~~~~~~~~~~~~~~~~~ ^
In file included from /Users/runner/runners/2.165.2/work/1/s/ext/opcache/jit/zend_jit.c:3242:
ext/opcache/jit/zend_jit_trace.c:2894:5: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
                                TRACE_FRAME_INIT(call, op_array, 0, -1); // TODO: should be possible to get the real number af arguments ???
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/opcache/jit/zend_jit_internal.h:355:49: note: expanded from macro 'TRACE_FRAME_INIT'
                _frame->_info = (uint32_t)((((int)(num_args)) << TRACE_FRAME_SHIFT_NUM_ARGS) & TRACE_FRAME_MASK_NUM_ARGS); \
                                            ~~~~~~~~~~~~~~~~~ ^
In file included from /Users/runner/runners/2.165.2/work/1/s/ext/opcache/jit/zend_jit.c:3242:
ext/opcache/jit/zend_jit_trace.c:2940:5: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
                                TRACE_FRAME_INIT(frame, op_array, 0, -1);
                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ext/opcache/jit/zend_jit_internal.h:355:49: note: expanded from macro 'TRACE_FRAME_INIT'
                _frame->_info = (uint32_t)((((int)(num_args)) << TRACE_FRAME_SHIFT_NUM_ARGS) & TRACE_FRAME_MASK_NUM_ARGS); \
                                            ~~~~~~~~~~~~~~~~~ ^
3 errors generated.
make: *** [ext/opcache/jit/zend_jit.lo] Error 1
make: *** Waiting for unfinished jobs....

@php-pulls php-pulls closed this in dcca039 Mar 21, 2020
@divinity76
Copy link
Contributor

were you running this test on FAT32? i can see this being a problem on filesystems that does not support sparse files, but i thought all modern filesystems (even the Apple/MacOS ones) supported sparse files?

@divinity76
Copy link
Contributor

divinity76 commented Mar 22, 2020

oh, apparently Apple's FS supports sparse files, but only since 2017, so if you have a 2016 MacOS/iOS system, you don't have sparse file support.. guess that's what's happened here?

(by comparison, Linux has supported sparse files since at least 1993 with the introduction of ext2)

@TysonAndre
Copy link
Contributor Author

i can see this being a problem on filesystems that does not support sparse files, but i thought all modern filesystems (even the Apple/MacOS ones) supported sparse files?

@divinity76 the tests were run on an ecryptfs filesystem, which is a filesystem which apparently doesn't efficiently support ftruncate - https://askubuntu.com/questions/100752/how-does-ecryptfs-impact-harddisk-performance

TysonAndre added a commit to TysonAndre/php-src that referenced this pull request Jul 19, 2020
This test failed when the free disk space is close to 2GB.
I see the file size in the output as 0.
PHP has to save the full file contents to disk (the path is in `$_FILES`)

Related to phpGH-5283
TysonAndre added a commit to TysonAndre/php-src that referenced this pull request Jul 19, 2020
This test failed when the free disk space is close to 2.15GB.
I see the file size in the .out file as 0.
PHP has to save the full file contents to disk (the path is in `$_FILES`)

Related to phpGH-5283
php-pulls pushed a commit that referenced this pull request Jul 19, 2020
This test failed when the free disk space is close to 2.15GB.
I see the file size in the .out file as 0.
PHP has to save the full file contents to disk (the path is in `$_FILES`)

Related to GH-5283

Closes GH-5873
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

Successfully merging this pull request may close these issues.

3 participants