MDVA-2470
diff -Nuar a/vendor/magento/framework/View/Asset/LockerProcess.php b/vendor/magento/framework/View/Asset/LockerProcess.php
--- a/vendor/magento/framework/View/Asset/LockerProcess.php	2017-02-13 17:38:15.000000000 +0000
+++ b/vendor/magento/framework/View/Asset/LockerProcess.php	2017-02-13 18:53:22.000000000 +0000
@@ -68,12 +68,26 @@

         $this->tmpDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
         $this->lockFilePath = $this->getFilePath($lockName);
+        $this->waitForLock();

-        while ($this->isProcessLocked()) {
-            usleep(1000);
+        try {
+            $this->tmpDirectory->writeFile($this->lockFilePath, time(), 'x+');
+        }catch (\Exception $e) {
+            $this->waitForLock();
+            try {
+                $this->tmpDirectory->writeFile($this->lockFilePath, time(), 'x+');
+            }catch (\Exception $e) {
+                throw new \Exception($e->getMessage());
+            }
         }

-        $this->tmpDirectory->writeFile($this->lockFilePath, time());
+    }
+
+    public function waitForLock()
+    {
+        while ($this->isProcessLocked() ) {
+            usleep(500);
+        }
     }

     /**
diff -Nuar a/vendor/magento/framework/View/Asset/PreProcessor/AlternativeSource.php b/vendor/magento/framework/View/Asset/PreProcessor/AlternativeSource.php
--- a/vendor/magento/framework/View/Asset/PreProcessor/AlternativeSource.php	2017-02-14 20:49:33.000000000 +0000
+++ b/vendor/magento/framework/View/Asset/PreProcessor/AlternativeSource.php	2017-02-15 15:00:41.000000000 +0000
@@ -106,7 +106,7 @@
         }

         try {
-            $this->lockerProcess->lockProcess($this->lockName);
+            $this->lockerProcess->lockProcess($chain->getAsset()->getPath());

             $module = $chain->getAsset()->getModule();

diff -Nuar a/vendor/magento/framework/View/Asset/LockerProcess.php b/vendor/magento/framework/View/Asset/LockerProcess.php
--- a/vendor/magento/framework/View/Asset/LockerProcess.php	2017-02-14 21:50:57.000000000 +0000
+++ b/vendor/magento/framework/View/Asset/LockerProcess.php	2017-02-15 15:00:41.000000000 +0000
@@ -67,7 +67,7 @@
         }

         $this->tmpDirectory = $this->filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
-        $this->lockFilePath = $this->getFilePath($lockName);
+        $this->lockFilePath = $this->getFilePath(str_replace(DIRECTORY_SEPARATOR, '_', $lockName));
         $this->waitForLock();

         try {
@@ -77,7 +77,8 @@
             try {
                 $this->tmpDirectory->writeFile($this->lockFilePath, time(), 'x+');
             }catch (\Exception $e) {
-                throw new \Exception($e->getMessage());
+                echo($this->lockFilePath);
+                throw new \Exception("In exception for lock process" . $e->getMessage());
             }
         }

diff -Nuar a/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php b/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php
--- a/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php	2017-02-15 16:24:07.000000000 +0000
+++ b/vendor/magento/module-developer/Model/View/Asset/PreProcessor/FrontendCompilation.php	2017-02-15 16:24:07.000000000 +0000
@@ -76,7 +76,7 @@
     {

         try {
-            $this->lockerProcess->lockProcess($this->lockName);
+            $this->lockerProcess->lockProcess($chain->getAsset()->getPath());

             $path = $chain->getAsset()->getFilePath();
             $module = $chain->getAsset()->getModule();
