You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changes from 383f269 on noreaster:
(cd /home/yakra/TravelMapping/DataProcessing/siteupdate/cplusplus; git diff)
Makefile: compile with clang++ instead of g++.
Force single-threaded quadtree & colocation list sorting, via commenting out some ifdefs.
WaypointQuadtree.h
WaypointQuadtree.cpp
siteupdate.cpp
Debug text
Waypoint::sort_root_at_label: Print Waypoint* locations & the values they point to.
WaypointQuadtree::insert: Print locations of Waypoint*s and WaypointQuadtree nodes as insertions are made.
WaypointQuadtree::sort(): Print messages before & after points.sort(sort_root_at_label); & colocation list sorting.
To save time, condition out everything after quadtree sorting until the final timestamps.
Results:
$ grep -n 1ef93620 logs/siteupdate.log
1716534:Waypoint @ 0x91ef93620 inserted into Quadtree node @ 0x91b4b1580
8295287: 0x7fffffffca80 points to 0x91ef93620 al.al168@US431
8295295: 0x7fffffffcbf0 points to 0x91ef93620 al.al168@US431
8295302:sort_root_at_label: 0x7fffffffcd68 points to 0x91ef93620 al.al168@US431
8295304:sort_root_at_label: 0x7fffffffcd68 points to 0x91ef93620 al.al168@US431
8295306:sort_root_at_label: 0x7fffffffcd68 points to 0x91ef93620 al.al168@US431
8295308:sort_root_at_label: 0x7fffffffcd68 points to 0x91ef93620 al.al168@US431
8295359: 0x7fffffffced0 points to 0x91ef93620 al.al168@US431
8295414:sort_root_at_label: 0x7fffffffd048 points to 0x91ef93620 al.al168@US431
8295455:sort_root_at_label: 0x7fffffffd048 points to 0x1ef93620
See how we read the pointer at 0x7fffffffd048, got the address of al.al168@US431, read it again, and the value it stored magically lost 0x900000000.
This is in a single-threaded part of the program, after points.sort(sort_root_at_label); has already been called -- siteupdate doesn't have any other instructions in flight, and std::list::sort is all we're doing.
A pointer value decreasing by 0x900000000 is exactly what happened in #375 (comment).
A compiler bug looks unlikely here.
I see a couple possbilities...
Bad RAM? This could mean memtest86 and downtime for noreaster... :(
To avoid the downtime memtest86 would involve, maybe run for a while with just 32 GB on the new DIMMs?
A rogue pointer from some other software is writing to stuff it shouldn't. This has its own set of troubleshooting challenges...
siteupdate -t 1 has run in a loop 929 times & counting without crashing (Edit: I finally hit ^c after 978 iterations). With >1 thread, it rarely makes it beyond the low double digits.
This latter point is especially infuriating. It suggests the problem is in siteupdate.
Right after, per the previous post, the evidence said the problem is not in siteupdate, because our pointer is fine and then it's not, when all that's happening is std::list::sort.
Grasping at straws here...
Maybe a pointer runs out of bounds in siteupdate, which messes up another process (common to both our FreeBSD systems), which later on returns fire? Sounds unlikely but whatever's going on is pretty unlikely...
What next?
The next couple crashes observed after the one above happened when Reading waypoints. Makes sense to tackle that issue first. Happening first in the chain of events, that could be where some pointer first goes haywire and sets us up for failure later on.
The Bad RAM Hypothesis is... Eris having a laugh at my expense.
After maybe 50 passes of the next iteration of siteupdate with more debug text, lab4's front panel showed a message about RAM errors in DIMM1 thru DIMM8. Oh boy. I didn't notice when this first appeared, or if it was present around the time of the crash.
So I popped the hard disk into lab3 instead.
...And now, that program that crashed right away in a low double-digit # of passes per quasi-expectation is running strong at 182 passes.
Either I'm unusually lucky this time thru, or...
I'm gonna try it out on lab4 again...
Results
Lab4 crashed after 360 passes. Front panel reports no errors.
Only running siteupdate as far as Reading waypoints now, crashes are less frequent. 100+, 200+ or even 300+ passes before a crash are not uncommon.
If you'd like another option for testing, I can get you set up with an account on my home server, also running FreeBSD. We can arrange that by email if you're interested. It's an older machine running FreeBSD 11.4, due for an OS upgrade this summer.
Probably won't be necessary, but thanks though. I'll take a look at FreeBSD 13.0 soon, and if I decide I want to test out 11.4 as well I'll have a go at that with lab3 or lab4.
Activity
yakra commentedon Jun 21, 2021
Problem persists with single-threaded sort.
Occurs when sorting points in quadtree node, not colocation lists.
yakra commentedon Jun 23, 2021
There's a bad Waypoint pointer. Observed MT only; ST looks fine.
This cause can potentially explain all known BSD bugs.
Where's it coming from?
yakra commentedon Jun 24, 2021
TheSmoking GunChanges from 383f269 on noreaster:
(
cd /home/yakra/TravelMapping/DataProcessing/siteupdate/cplusplus; git diff)Waypoint*locations & the values they point to.Waypoint*s andWaypointQuadtreenodes as insertions are made.points.sort(sort_root_at_label);& colocation list sorting.Results:
See how we read the pointer at
0x7fffffffd048, got the address ofal.al168@US431, read it again, and the value it stored magically lost 0x900000000.This is in a single-threaded part of the program, after
points.sort(sort_root_at_label);has already been called --siteupdatedoesn't have any other instructions in flight, andstd::list::sortis all we're doing.A pointer value decreasing by 0x900000000 is exactly what happened in #375 (comment).
A compiler bug looks unlikely here.
I see a couple possbilities...
@jteresco, thoughts?
yakra commentedon Jun 25, 2021
The Bad RAM Hypothesis is ruled out.
siteupdate -t 1has run in a loop 929 times & counting without crashing (Edit: I finally hit^cafter 978 iterations). With >1 thread, it rarely makes it beyond the low double digits.This latter point is especially infuriating. It suggests the problem is in siteupdate.
Right after, per the previous post, the evidence said the problem is not in siteupdate, because our pointer is fine and then it's not, when all that's happening is
std::list::sort.Grasping at straws here...
Maybe a pointer runs out of bounds in siteupdate, which messes up another process (common to both our FreeBSD systems), which later on returns fire? Sounds unlikely but whatever's going on is pretty unlikely...
What next?
The next couple crashes observed after the one above happened when Reading waypoints. Makes sense to tackle that issue first. Happening first in the chain of events, that could be where some pointer first goes haywire and sets us up for failure later on.
yakra commentedon Jun 26, 2021
RAM Redux
The Bad RAM Hypothesis is... Eris having a laugh at my expense.
Results
Lab4 crashed after 360 passes. Front panel reports no errors.
Only running siteupdate as far as Reading waypoints now, crashes are less frequent. 100+, 200+ or even 300+ passes before a crash are not uncommon.
jteresco commentedon Jun 26, 2021
If you'd like another option for testing, I can get you set up with an account on my home server, also running FreeBSD. We can arrange that by email if you're interested. It's an older machine running FreeBSD 11.4, due for an OS upgrade this summer.
yakra commentedon Jun 26, 2021
Probably won't be necessary, but thanks though. I'll take a look at FreeBSD 13.0 soon, and if I decide I want to test out 11.4 as well I'll have a go at that with lab3 or lab4.
yakra commentedon Jun 27, 2021
jteresco commentedon Jun 27, 2021
Helpful to get a FreeBSD VM install on the Siena cloud server? I should be able to create one you could access by hopping through noreaster.
yakra commentedon Jun 27, 2021
Should be easy enough to do it at home. FreeBSD installation is quick & painless, and I've hard disks to spare, easily swappable.
yakra commentedon Jul 6, 2021
Closing this under the assumption it arises from the same cause as #443.