Add some more debugging to the session destroyer; -> backtrace.
authorWilfried Goesgens <dothebart@citadel.org>
Tue, 15 Mar 2011 22:36:28 +0000 (23:36 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 15:07:50 +0000 (15:07 +0000)
citadel/context.c
citadel/debian/rules

index cfe30334ecdd3526d95bf1fb17659ec0b7798621..0b545139b0998a7a32e7dba2c0807ae0f30b5be8 100644 (file)
@@ -332,12 +332,17 @@ void terminate_stuck_sessions(void)
  */
 void RemoveContext (CitContext *con)
 {
+       const char *c;
        if (con==NULL) {
                syslog(LOG_ERR,
                        "WARNING: RemoveContext() called with NULL!\n");
                return;
        }
-       syslog(LOG_DEBUG, "RemoveContext() session %d\n", con->cs_pid);
+       c = con->ServiceName;
+       if (c == NULL)
+               c = "WTF?";
+       syslog(LOG_DEBUG, "RemoveContext(%s) session %d\n", c, con->cs_pid);
+       cit_backtrace ();
 
        /* Run any cleanup routines registered by loadable modules.
         * Note: We have to "become_session()" because the cleanup functions
index a28907b67351e99aa685a5b077be315ffb79e4b7..85489575c077f88c549fd83a25edcea05b6816db 100755 (executable)
@@ -23,6 +23,7 @@ endif
 ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
        PROFILE_ARGS= --with-gprof
 endif
+
 ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0 -ggdb -rdynamic -D_GNU_SOURCE -MD -MP -D TECH_PREVIEW
        LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed
@@ -35,6 +36,12 @@ else
        CFLAGS += -O2
 endif
 
+ifneq (,$(findstring backtrace,$(DEB_BUILD_OPTIONS)))
+       CFLAGS+= -rdynamic -D_GNU_SOURCE -MD -MP
+       LDFLAGS+=-Wl,--no-undefined -Wl,--as-needed
+       EXTRA_ARGS += --with-backtrace
+endif
+
 ifneq (,$(findstring threadoff,$(DEB_BUILD_OPTIONS)))
        THREAD_ARGS=--without-threaded-client
        CFLAGS += -D WITH_THREADLOG