-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
BugLang: GolangGolang wrapper issueGolang wrapper issueOS: LinuxGNU/Linux OSGNU/Linux OSSolver: CP-SAT SolverRelates to the CP-SAT solverRelates to the CP-SAT solver
Milestone
Description
What version of OR-Tools and what language are you using?
Version: main/v9.14
Language: C++/Go
Which solver are you using
CP-SAT
What operating system (Linux, Windows, ...) and version?
Ubuntu 24
What did you do?
Hard to reproduce, timing issue.
- Solver configured with 4 workers, fails on rather large run, which takes up to a minute to finish. Sometimes solver crashes with:
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
F0000 00:00:1762346483.864814 391862 stats.cc:201] Check failed: seconds >= 0.0 (-0.784035 vs. 0)
*** Check failure stack trace: ***
@ 0x155dc08 (unknown)
@ 0x155dc84 (unknown)
@ 0x155d70c (unknown)
@ 0x6763ec (unknown)
@ 0x10c69d0 (unknown)
@ 0xd2e91c (unknown)
@ 0xd2d02c (unknown)
@ 0xd2e56c (unknown)
@ 0xd2e32c (unknown)
@ 0xd2de88 (unknown)
@ 0x6ad270 (unknown)
@ 0x1154ea8 (unknown)
@ 0x1157738 (unknown)
@ 0x11576bc (unknown)
@ 0x1157620 (unknown)
@ 0x11575d8 (unknown)
@ 0x11575b8 (unknown)
@ 0xf70426581ae0 (unknown)
@ 0xf7042624595c (unknown)
- Ubuntu adjusts the clock with ntpdate - likely this is important.
What did you expect to see
No crashes on timing issues.
Anything else we should know about your project / environment
Likely fix would be at ortools/sat/subsolver.h to check for duration to be positive:
// Note that this is protected by the global execution mutex and so it is
// called sequentially. Subclasses do not need to call this.
void AddTaskDuration(double duration_in_seconds) {
++num_finished_tasks_;
wall_time_ += duration_in_seconds;
if (duration_in_seconds > 0) {
timing_.AddTimeInSec(duration_in_seconds);
}
}This follows the same pattern already used in that file for AddTaskDeterministicDuration
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugLang: GolangGolang wrapper issueGolang wrapper issueOS: LinuxGNU/Linux OSGNU/Linux OSSolver: CP-SAT SolverRelates to the CP-SAT solverRelates to the CP-SAT solver