New issue
Advanced search Search tips

Issue 912441 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 6
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Disk cache cannot be shared by multiple chromes started by ChromeDriver

Reported by linyo...@gmail.com, Dec 6

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36

Example URL:

Steps to reproduce the problem:
1. Start a chrome from command line with args --user-data-dir=/tmp/chrome-data-1 --disk-cache-dir=/tmp/chrome-cache
2. Open google home page: www.google.com
3. Start another chrome from command line with different user-data-dir but same disk-cache-dir: --user-data-dir=/tmp/chrome-data-2 --disk-cache-dir=/tmp/chrome-cache
4. Open devtools and monitor the network
5. Open google home page: www.google.com
I can see all the images are from disk cache on the second Chrome. This is expected behavior. 
However, When I used ChromeDriver to start two chromes, and repeated step 4 and 5 on both of them, the images on the second chrome are not fetched from the disk cache. 
Below Python code can be used to start two chromes by WebDriver. I'm using ChromeDriver 2.42.

from selenium import webdriver
from time import sleep

options = webdriver.ChromeOptions()
options.add_argument("--disk-cache-dir=/tmp/chrome-cache-wd")
for i in range(1, 3):
    webdriver.Chrome(
        executable_path='driver_path',
        chrome_options=options
    )
sleep(3600)

What is the expected behavior?

What went wrong?
Disk cache cannot be shared by multiple chromes started by ChromeDriver.

Did this work before? N/A 

Chrome version: 70.0.3538.110  Channel: stable
OS Version: OS X 10.13.5
Flash Version:
 
Cc: morlovich@chromium.org
Components: -Internals>Network Internals>Network>Cache
My impression is that disk cache is not designed to be used by multiple instances of chrome at the same time.  It seems very likely to cause corruption from conflicting writes, etc.

Maks, is that correct?
Status: WontFix (was: Unconfirmed)
Yes, sharing a cache directory among multiple processes is not supported. Use separate directories.


Sign in to add a comment