Yesterday I got another core dump and, again, it was like the previous ones:

#1  0x0000000000412927 in TCP_Client::unblock_handler (closure=0x1ffa030) at 
TCP_Client.c++:270

I checked the assertions were indeed compiled in, by (gdb) disass 
((TCP_Client*)$closure)->dequeue_from_scan, which ended with:

  0x00000000004129e4 <+84>:    callq  0x402310 <__assert_fail@plt>


Yet, those assertions didn't catch anything.  So I must have extracted from 
client->to_be_scanned an ip with vtbl[4] == 0, which was never put into the 
set.  That suggests that Set.h doesn't work as expected.  To check the latter 
hypothesis, I modified TCP_Client.h so as to use a standard set instead:

--- fam2/fam-2.7.0/build-tree/fam-2.7.0/src/TCP_Client.h        2003-01-18 
15:18:12.000000000 +0100
+++ fam/fam-2.7.0/build-tree/fam-2.7.0/src/TCP_Client.h 2018-03-30 
10:53:03.000000000 +0200
@@ -25,9 +25,28 @@
 
 #include "ClientConnection.h"
 #include "MxClient.h"
-#include "Set.h"
+
+// use std::set instead
+//#include "Set.h"
+#include <set>
 #include "Cred.h"
 
+class stdset : public std::set<Interest *>
+{
+public:
+    // Inherit insert(), size()
+    bool contains(const key_type e) {return find(e) != end();}
+    void remove(const key_type e) {erase(e);}
+    key_type first() const {return begin() == end()? NULL: *begin();}
+    key_type next(const key_type k) const {
+       const_iterator it = find(k);
+       if (it != end()) ++it;
+       if (it == end()) return NULL;
+       return *it;
+    }
+    // sizeofnode() method is not used
+};
+
 struct sockaddr_un;
 
 //  A TCP_Client is a client that connects to fam using the TCP/IP
@@ -60,7 +79,8 @@ protected:
 
 private:
 
-    Set<Interest *> to_be_scanned;
+    // Set<Interest *> to_be_scanned;
+    stdset to_be_scanned;
     Scanner *my_scanner;
     ClientConnection conn;
     Activity a;                                // simply declaring it 
activates timer.


Waiting for next core dump...

Reply via email to