Open
Bug 1879463
Opened 2 years ago
Updated 2 years ago
Intermittent Assertion failed: (mPath.length() > 0), function ScopedUniqueDirectory, file ../../gtests/common/util.h, line 65.
Categories
(NSS :: Test, defect, P5)
NSS
Test
Tracking
(Not tracked)
NEW
People
(Reporter: intermittent-bug-filer, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: assertion, good-first-bug, intermittent-failure)
Attachments
(1 obsolete file)
Filed by: jschanck [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=446533717&repo=nss-try
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/sgnSz-a5TXi_0w0LHCqZZw/runs/0/artifacts/public/logs/live_backing.log
Comment 1•2 years ago
|
||
This has been a perma failure on our mac workers for a while. I just ran into it on Linux and tracked it down. It happens because we use an (unseeded) call to rand() to choose a name for a temporary directory.
Here's a (not very serious) patch. Doing something more robust here would be a good first bug for someone.
diff --git gtests/common/util.h gtests/common/util.h
--- gtests/common/util.h
+++ gtests/common/util.h
@@ -13,6 +13,7 @@
#include <iostream>
#include <sstream>
#include <sys/stat.h>
+#include <time.h>
#include <vector>
#if defined(_WIN32)
#include <windows.h>
@@ -90,7 +91,9 @@ class ScopedUniqueDirectory {
std::stringstream ss;
ss << prefix;
// RAND_MAX is at least 32767.
- ss << std::setfill('0') << std::setw(4) << std::hex << rand() << rand();
+ ss << std::setfill('0') << std::setw(4) << std::hex;
+ ss << time(nullptr);
+ ss << rand();
// This will overwrite the value of prefix. This is a little inefficient,
// but at least it makes the code simple.
ss >> prefix;
Keywords: good-first-bug
| Comment hidden (Intermittent Failures Robot) |
Comment 3•2 years ago
|
||
Updated•2 years ago
|
Attachment #9389730 -
Attachment is obsolete: true
Comment 4•2 years ago
|
||
Hm, there must be multiple ways to cause this same error, because the patch didn't work in try.
You need to log in
before you can comment on or make changes to this bug.
Description
•