]> feistymeow.org Git - feisty_meow.git/commitdiff
testing with callstack tracker disabled
authorFred T. Hamster <fred@feistymeow.org>
Tue, 17 Feb 2026 11:55:06 +0000 (06:55 -0500)
committerFred T. Hamster <fred@feistymeow.org>
Tue, 17 Feb 2026 11:55:06 +0000 (06:55 -0500)
turning off the tracker got rid of one class of problems, but now we're seeing that a pure virtual method
is being invoked.  something is calling into our code after its been destroyed, or we're using dead objects.

nucleus/library/processes/ethread.cpp
octopi/library/tests_octopus/test_bin_threaded.cpp
production/feisty_meow_config.ini

index d88b94bb6530c929fa08b0adf20fa8820fb498a3..a21102f60be82f31c1d70533da7d77ed53b3e6e7 100644 (file)
@@ -162,11 +162,9 @@ bool ethread::start(void *thread_data)
     if (aret) LOG("failed to set detach state.");
     int ret = -1;
     if (_periodic)
-      ret = pthread_create(_handle, &attribs, periodic_thread_driver,
-          (void *)this);
+      ret = pthread_create(_handle, &attribs, periodic_thread_driver, (void *)this);
     else
-      ret = pthread_create(_handle, &attribs, one_shot_thread_driver,
-          (void *)this);
+      ret = pthread_create(_handle, &attribs, one_shot_thread_driver, (void *)this);
     if (!ret) success = true;
     else error = ret;
 /*
index c0e8c2a20785e16a46c75589cb67a5d33bad7f94..2b13b634059fd39b0c49f69f012f8dd308d5004c 100644 (file)
@@ -52,6 +52,9 @@ using namespace textual;
 using namespace timely;
 using namespace unit_test;
 
+// uncomment if you want the more careful shutdown of the threads.
+//#define FANCY_UNNECESSARY_THREAD_STOP ugh
+
 // synchronization for logged messages to avoid overwriting on the console.
 SAFE_STATIC(mutex, __loggers_lock, )
 
@@ -269,12 +272,12 @@ class obsessive_compulsive : public ethread
 public:
   obsessive_compulsive() : ethread(MIN_TIDIER_THREAD_PAUSE, ethread::TIGHT_INTERVAL) {
     FUNCDEF("constructor");
-    LOG("<< new cleaner <<");
+    LOG(">> new cleaner >>");
   }
 
   virtual ~obsessive_compulsive() {
     FUNCDEF("destructor");
-    LOG(">> cleaner exits >>");
+    LOG("<< cleaner exits <<");
   }
 
   DEFINE_CLASS_NAME("obsessive_compulsive");
@@ -405,10 +408,12 @@ int test_entity_data_bin_threaded::execute()
 
   __threads_can_run_wild_and_free() = false;
 
-#ifdef FANCY_UNNECESSARY_THREAD_STOP
-  //hmmm: this code shouldn't be needed!  thread cabinet should do it!!!!
+//deciding whether the cancel really should be done every time, to let the threads bail on their own rather than single stepping through their shutdowns.
   LOG("now cancelling all threads...");
   for (int j = 0; j < thread_list.elements(); j++) { thread_list[j]->cancel(); }
+
+#ifdef FANCY_UNNECESSARY_THREAD_STOP
+  //hmmm: this code shouldn't be needed!  thread cabinet should do it!!!!
   LOG("now stopping all threads...");
   for (int k = 0; k < thread_list.elements(); k++) { thread_list[k]->stop(); }
 #endif
index 21853785536c9498508c85971d4f936243461a7d..1e63a567e621c74e3fc5143543f81ce0a44d5782 100644 (file)
@@ -84,6 +84,6 @@ endif
 # methods with a way to know how they were invoked.  to get this information.
 # the invoker must be fitted with FUNCDEF macros.
 ifeq "$(BOOT_STRAPPING)" ""
-  DEFINITIONS += ENABLE_CALLSTACK_TRACKING
+#  DEFINITIONS += ENABLE_CALLSTACK_TRACKING
 endif