[omniNotify] 64 bit notifd on Solaris 2.8 core dumps immediately

Mark Zimmerman markzimm at frii.com
Mon Jun 13 11:03:14 BST 2005


Greetings:

I have gotten omniNotify to compile as a 64 bit program (using gcc
3.4.3) but notifd core dumps immediately upon startup. I built a debug
version and ran it under gdb (output attached) and the segmentation
fault occurs in dereferencing a pointer that appears to be OK when
looked at in gdb. This makes it hard to debug.

OmniORB, when built this way, has been working fine for me and the
64-bit programs that I have linked with OmniORB are communicating with
an older 32-bit notifd without any problems. It is only a 64-bit
notifd that fails.

I have also attached a patch file that shows what I had to do to get
omniNotify to compile. This is only to show what I am running; it is
definitely not a set of proposed changes. I am building the latest
omniNotify snapshot.

Any insights would be appreciated.

-- Mark
-------------- next part --------------
Starting program: /home/zimmermm/64build/omniNotify/build/daemon/notifd -c /home/zimmermm/.omniOrb/omniNotify.cfg
[New LWP 1]
[New LWP 2]
[New LWP 3]
[New LWP 4]
[New LWP 5]
[New LWP 6]
[New LWP 7]
[New LWP 8]
[New LWP 9]
[New LWP 10]
[New LWP 11]

Program received signal SIGSEGV, Segmentation fault.
0xffffffff7ed5d9a0 in RDI_ULongHash (K=0xffffffff7fffc714) at RDIHashFuncs.h:97
97      { return *((unsigned long *) K); }

(gdb) p *((unsigned long*)K)
$3 = 0

(gdb) p K
$4 = (const void *) 0xffffffff7fffc714

(gdb) where
#0  0xffffffff7ed5d9a0 in RDI_ULongHash (K=0xffffffff7fffc714) at RDIHashFuncs.h:97
#1  0xffffffff7eddf018 in RDI_Hash<int, ConsumerAdmin_i*>::pseudo_hash (this=0x100140d70, key=@0xffffffff7fffc714) at RDIHash.h:375
#2  0xffffffff7eddef60 in RDI_Hash<int, ConsumerAdmin_i*>::lookup (this=0x100140d70, key=@0xffffffff7fffc714, prev=@0xffffffff7fffc458, 
    bnum=@0xffffffff7fffc468) at RDIHash.h:388
#3  0xffffffff7eddccd8 in RDI_Hash<int, ConsumerAdmin_i*>::insert (this=0x100140d70, key=@0xffffffff7fffc714, val=@0x100140bb0) at RDIHash.h:217
#4  0xffffffff7edba9f4 in EventChannel_i (this=0x100140b40, cfactory=0x10013e960, ffactory=0x10013e5f0, init_qos=@0x10013d4b0, init_adm=@0x10013d600, 
    s_qos=0x10013cc70, myserial=@0xffffffff7fffcd44) at ../../lib/EventChannel_i.cc:153
#5  0xffffffff7edd0810 in EventChannelFactory_i::_create_channel (this=0x10013e960, myID=@0xffffffff7fffcd44) at ../../lib/EventChannel_i.cc:1811
#6  0xffffffff7edd0a40 in EventChannelFactory_i::create_channel (this=0x10013e960, myID=@0xffffffff7fffcd44) at ../../lib/EventChannel_i.cc:1827
#7  0xffffffff7eea9b9c in RDINotifServer::create (argc=@0xffffffff7fffd160, argv=0xffffffff7fffd198) at ../../lib/RDINotifServer.cc:385
#8  0xffffffff7ee7b430 in RDI::init_server (argc=@0xffffffff7fffd160, argv=0xffffffff7fffd198) at ../../lib/RDI.cc:45
#9  0xffffffff7ee0252c in omniNotify::init_server (argc=@0xffffffff7fffd160, argv=0xffffffff7fffd198) at ../../lib/omniNotify.cc:38
#10 0x0000000100004fa8 in main (argc=1, argv=0xffffffff7fffd198) at ../../daemon/ReadyChannel_d.cc:97

-------------- next part --------------
diff -ur omniNotify-orig/DEBUG.mk omniNotify/DEBUG.mk
--- omniNotify-orig/DEBUG.mk	Mon Jun 13 09:41:16 2005
+++ omniNotify/DEBUG.mk	Mon Jun 13 09:39:53 2005
@@ -4,14 +4,14 @@
 # There are three things you may wish to change:
 
 # (1) Uncomment the following to enable use of the debug log.
-#EnableDebugLog = 1
+EnableDebugLog = 1
 
 # (2) Uncomment the following to disable object garbage collection
 #DisableObjGC = 1
 
 # (3) Uncomment the following to compile with extended debugging info (-g compile option)
 #     Only works for Unix platforms.
-#EnableDashG = 1
+EnableDashG = 1
 
 ##########################################
 # Do not modify anything below this line #
Only in omniNotify: build
diff -ur omniNotify-orig/include/RDITimeWrappers.h omniNotify/include/RDITimeWrappers.h
--- omniNotify-orig/include/RDITimeWrappers.h	Mon Jun 13 09:41:27 2005
+++ omniNotify/include/RDITimeWrappers.h	Mon Jun 13 09:40:01 2005
@@ -235,7 +235,7 @@
 
   // pretty-printing of absolute local time -- no newline
   void out_local(RDIstrstream& str) {
-    CORBA::ULong ts, tn;
+    unsigned long ts, tn;
     get_posixbase_secs_nanosecs(ts, tn);
     RDI_posixbase_out_time(str, ts, tn);
     str << " (local time)";
@@ -395,7 +395,7 @@
   }
   // pretty-printing of absolute univ time -- no newline
   void out_gmt(RDIstrstream& str) {
-    CORBA::ULong ts, tn;
+    unsigned long ts, tn;
     get_gmt_posixbase_secs_nanosecs(ts, tn);
     RDI_posixbase_out_time(str, ts, tn);
     str << " (greenwich mean time)";
diff -ur omniNotify-orig/include/RDIstrstream.h omniNotify/include/RDIstrstream.h
--- omniNotify-orig/include/RDIstrstream.h	Mon Jun 13 09:41:28 2005
+++ omniNotify/include/RDIstrstream.h	Mon Jun 13 09:40:02 2005
@@ -61,7 +61,7 @@
   RDIstrstream& operator<<(unsigned long n);
   RDIstrstream& operator<<(short n) {return operator<<((int)n);}
   RDIstrstream& operator<<(unsigned short n) {return operator<<((unsigned int)n);}
-#ifdef HAS_LongLong
+#ifdef HAS_LongLong_DISABLE
   RDIstrstream& operator<<(WRAPPED_CORBA_LONGLONG_TYPE n);
   RDIstrstream& operator<<(WRAPPED_CORBA_ULONGLONG_TYPE n);
 #endif
diff -ur omniNotify-orig/lib/RDITimeWrappers.cc omniNotify/lib/RDITimeWrappers.cc
--- omniNotify-orig/lib/RDITimeWrappers.cc	Mon Jun 13 09:41:31 2005
+++ omniNotify/lib/RDITimeWrappers.cc	Mon Jun 13 09:40:05 2005
@@ -146,7 +146,7 @@
 #undef WHATFN
 #define WHATFN "RDI_TimeT::fmt_local"
 const char *RDI_TimeT::fmt_local() {
-  CORBA::ULong ts, tm;
+  unsigned long ts, tm;
   get_posixbase_secs_msecs(ts, tm);
   time_t secs_as_time_t = ts;
   TW_SCOPE_LOCK(otime_lock, RDI_out_time_lock, "RDI_out_time", WHATFN);
diff -ur omniNotify-orig/lib/RDIstrstream.cc omniNotify/lib/RDIstrstream.cc
--- omniNotify-orig/lib/RDIstrstream.cc	Mon Jun 13 09:41:32 2005
+++ omniNotify/lib/RDIstrstream.cc	Mon Jun 13 09:40:05 2005
@@ -195,7 +195,7 @@
   return *this;
 }
 
-#ifdef HAS_LongLong
+#ifdef HAS_LongLong_DISABLE
 RDIstrstream&
 RDIstrstream::operator<<(WRAPPED_CORBA_LONGLONG_TYPE n)
 {


More information about the omninotify-list mailing list