diff --git a/xdist/dsession.py b/xdist/dsession.py
index <HASH>..<HASH> 100644
--- a/xdist/dsession.py
+++ b/xdist/dsession.py
@@ -159,7 +159,7 @@ class DSession:
         self.countfailures = 0
         self.maxfail = config.getvalue("maxfail")
         self.queue = queue.Queue()
-        self._failed_collection_paths = {}
+        self._failed_collection_errors = {}
         try:
             self.terminal = config.pluginmanager.getplugin("terminalreporter")
         except KeyError:
@@ -290,10 +290,10 @@ class DSession:
             self._failed_slave_collectreport(node, rep)
 
     def _failed_slave_collectreport(self, node, rep):
-        # Check we haven't already seen this report.
-        str_path = str(rep.fspath)
-        if str_path not in self._failed_collection_paths:
-            self._failed_collection_paths[str_path] = True
+        # Check we haven't already seen this report (from
+        # another slave).
+        if rep.longrepr not in self._failed_collection_errors:
+            self._failed_collection_errors[rep.longrepr] = True
             self.config.hook.pytest_collectreport(report=rep)
             self._handlefailures(rep)
Use the error longrepr rather than the file path to check
for duplicate errors.