php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64214 PHAR PHPTs intermittently crash when run on DFS or SMB
Submitted: 2013-02-14 23:52 UTC Modified: 2016-07-24 04:22 UTC
Votes:3
Avg. Score:2.7 ± 0.5
Reproduced:0 of 0 (0.0%)
From: mattficken@php.net Assigned: pajoye (profile)
Status: No Feedback Package: PHAR related
PHP Version: 5.5.0alpha4 OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mattficken@php.net
New email:
PHP Version: OS:

 

 [2013-02-14 23:52 UTC] mattficken@php.net
Description:
------------
I am running PHPT tests on an SMB file share (and also sometimes DFS) served by a remote file server. The share is mounted to a local drive (H:) on Windows. This issue occurs on Windows 7, Vista, 2008, 2008r2, 8, 2012, x64 and x86 (I am using the PHP on Windows binary build from windows.php.net without any modification).

When I run these 2 PHAR tests, sometimes, they crash:
ext/phar/tests/zip/phar_commitwrite.phpt
ext/phar/tests/tar/phar_setsignaturealgo2.phpt

See attached BTs.

If I add additional traffic to the network or file server (ex: download a big file on another computer), the crashes happen more frequently. Even then, I'm only adding max ~10MiB/S to network or file server which isn't really heavy load.

The file access times on the share are still pretty normal (fraction of a second max, to read a PHPT file, so the network or file server is never heavily loaded).

I believe this is a time issue that is load induced.


Actual result:
--------------
ext/phar/tests/zip/phar_commitwrite.phpt
               php5ts.dll!_php_stream_write(_php_stream * stream, const char * buf, unsigned int count, void * * * tsrm_ls)  Line 1233 + 0x10 bytes              C
              php5ts.dll!phar_zip_flush(_phar_archive_data * phar, char * user_stub, long len, int defaultstub, char * * error, void * * * tsrm_ls)  Line 1304 + 0x18 bytes         C
              php5ts.dll!phar_flush(_phar_archive_data * phar, char * user_stub, long len, int convert, char * * error, void * * * tsrm_ls)  Line 2601 + 0x18 bytes           C
              php5ts.dll!phar_add_file(_phar_archive_data * * pphar, char * filename, int filename_len, char * cont_str, int cont_len, _zval_struct * zresource, void * * * tsrm_ls)  Line 3737 + 0x11 bytes    C
              php5ts.dll!zim_Phar_offsetSet(int ht, _zval_struct * return_value, _zval_struct * * return_value_ptr, _zval_struct * this_ptr, int return_value_used, void * * * tsrm_ls)  Line 3818 + 0x14 bytes     C
              php5ts.dll!zend_call_function(_zend_fcall_info * fci, _zend_fcall_info_cache * fci_cache, void * * * tsrm_ls)  Line 959 + 0x1f bytes           C
              php5ts.dll!zend_call_method(_zval_struct * * object_pp, _zend_class_entry * obj_ce, _zend_function * * fn_proxy, const char * function_name, int function_name_len, _zval_struct * * retval_ptr_ptr, int param_count, _zval_struct * arg1, _zval_struct * arg2, void * * * tsrm_ls)  Line 97 + 0x14 bytes           C
              php5ts.dll!zend_std_write_dimension(_zval_struct * object, _zval_struct * offset, _zval_struct * value, void * * * tsrm_ls)  Line 678 + 0x1e bytes C
              php5ts.dll!ZEND_ASSIGN_DIM_SPEC_CV_CONST_HANDLER(_zend_execute_data * execute_data, void * * * tsrm_ls)  Line 32607 + 0xbc bytes               C
 
ext/phar/tests/tar/phar_setsignaturealgo2.phpt
 
               php5ts.dll!user_wrapper_opener(_php_stream_wrapper * wrapper, char * filename, char * mode, int options, char * * opened_path, _php_stream_context * context, void * * * tsrm_ls)  Line 346 + 0x2f bytes               C
              php5ts.dll!_php_stream_open_wrapper_ex(char * path, char * mode, int options, char * * opened_path, _php_stream_context * context, void * * * tsrm_ls)  Line 2054 + 0x24 bytes  C
              php5ts.dll!php_if_fopen(int ht, _zval_struct * return_value, _zval_struct * * return_value_ptr, _zval_struct * this_ptr, int return_value_used, void * * * tsrm_ls)  Line 869 + 0x1a bytes       C
              php5ts.dll!phar_fopen(int ht, _zval_struct * return_value, _zval_struct * * return_value_ptr, _zval_struct * this_ptr, int return_value_used, void * * * tsrm_ls)  Line 418 + 0x22 bytes       C
              php5ts.dll!zend_do_fcall_common_helper_SPEC(_zend_execute_data * execute_data, void * * * tsrm_ls)  Line 542 + 0x5e bytes             C
              php5ts.dll!ZEND_DO_FCALL_SPEC_CONST_HANDLER(_zend_execute_data * execute_data, void * * * tsrm_ls)  Line 2305 + 0xb bytes C
              php5ts.dll!execute_ex(_zend_execute_data * execute_data, void * * * tsrm_ls)  Line 356 + 0xa bytes     C
              php5ts.dll!zend_execute(_zend_op_array * op_array, void * * * tsrm_ls)  Line 381 + 0x1bc bytes     C
              php5ts.dll!zend_execute_scripts(int type, void * * * tsrm_ls, _zval_struct * * retval, int file_count, ...)  Line 1317               C
              php5ts.dll!php_execute_script(_zend_file_handle * primary_file, void * * * tsrm_ls)  Line 2478 + 0x12 bytes       C
              php5apache2_4.dll!php_handler(request_rec * r)  Line 667 + 0xe bytes        C
 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-02-27 10:35 UTC] user at kkdf2 dot sakura dot ne dot jp
About NAS, it may be possible.

For example,
My company's NAS Buffalo Ls-L series freezes sometimes when I try simultaneous client accesses.
It seems that NAS exhausts its ram memory by operating multiple file requests.
 [2013-05-14 22:34 UTC] pajoye@php.net
Crashes should be fixed by now (testing) but the reason why tmp files creations 
fail has to be analyzed and fixed as well. Assigned to me.
 [2013-05-14 22:34 UTC] pajoye@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2013-05-17 09:52 UTC] pajoye@php.net
I think I found all locations causing these crashes. Matt, let me know once the 
last serie of tests pass (stress and compat) so we can close it :)
 [2013-05-24 21:24 UTC] mattficken@php.net
I haven't seen this bug repro on any recent 5.3, 5.4, or 5.5 snapshot builds.

I think this bug is fixed.


I have added a documentation note about the importance of setting the `sys_temp_dir` directive, especially when using remote file systems: http://us3.php.net/manual/en/book.phar.php
 [2016-07-11 01:37 UTC] cmb@php.net
-Status: Assigned +Status: Feedback
 [2016-07-11 01:37 UTC] cmb@php.net
> I think this bug is fixed.

Is it?
 [2016-07-24 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 13:01:29 2024 UTC