Bug #75353 [NEW]: Some files always corrupted in file cache

From: Date: Tue, 10 Oct 2017 15:32:31 +0000
Subject: Bug #75353 [NEW]: Some files always corrupted in file cache
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211612@lists.php.net to get a copy of this message
From:             mike
Operating system: Linux
PHP version:      7.1.10
Package:          opcache
Bug Type:         Bug
Bug description:Some files always corrupted in file cache

Description:
------------
Some files will always end up corrupted in file cache, e.g. Laravel's
Support/Str.php

Test script:
---------------
Shell session:

# install laravel
git clone https://github.com/laravel/laravel.git
cd laravel
composer install

# minimal env config
APP_KEY=$(pwgen 32 1)
LARAVEL_TMP=$(mktemp -d)

# prime opcache
php -d opcache.file_cache=$LARAVEL_TMP \
    -d opcache.error_log=stderr \
    -d opcache.log_verbosity_level=2 \
    -S localhost:9999 server.php &
FCGI_PID=$!
sleep 1
for i in "" {1..5}; do curl -sSL localhost:9999/$i >/dev/null; done
kill $FCGI_PID

# now start over
php -d opcache.file_cache=$LARAVEL_TMP \
    -d opcache.error_log=stderr \
    -d opcache.log_verbosity_level=4 \
    -S localhost:9999 server.php \
2> >(sed -re 's/(^.*Added key).*/\1/' | uniq -c) &
FCGI_PID=$!
sleep 1
for i in "" {1..5}; do curl -sSL localhost:9999/$i >/dev/null; done
kill $FCGI_PID


Actual result:
--------------
[1] 14149
PHP 7.1.10RC1 Development Server started at Tue Oct 10 17:21:00 2017
Listening on http://localhost:9999
Document root is /home/mike/src/laravel.git
Press Ctrl-C to quit.
      1 Tue Oct 10 17:21:01 2017 (14149): Warning corrupted file
'/tmp/.../Illuminate/Support/Str.php.bin'
      1 
      1 Tue Oct 10 17:21:01 2017 (14149): Message Cached script
'/home/.../Illuminate/Support/Str.php'
    201 Tue Oct 10 17:21:01 2017 (14149): Message Added key             
                                                                        
                                                                        
                                                                        
                          
[1]  + 14149 terminated  ~/src/php-719-opcache/usr/bin/php -d
opcache.file_cache=$LARAVEL_TMP -d  -d  


-- 
Edit bug report at https://bugs.php.net/bug.php?id=75353&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=75353&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=75353&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=75353&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=75353&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=75353&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=75353&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=75353&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=75353&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=75353&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=75353&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=75353&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=75353&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=75353&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75353&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=75353&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=75353&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=75353&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75353&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=75353&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=75353&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#211612) next »