Omit the warning about session scheduled for termination but not idle.
authorArt Cancro <ajc@citadel.org>
Tue, 5 Sep 2023 03:59:44 +0000 (23:59 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 5 Sep 2023 03:59:44 +0000 (23:59 -0400)
Something about this warning makes it reference a bad pointer and crash
during periods of extremely high load.  I don't know why, but just leaving
it alone seems to fix the problem.

citadel/server/context.c
citadel/utils/loadtest.c

index 8b54b02b1ebcd755780ddf5e043477b896750acb..f7eea71f09b9de706afac9ea7ec7fb5bd9ccc85d 100644 (file)
@@ -511,9 +511,6 @@ void dead_session_purge(int force) {
        }
        time(&last_purge);
 
-       //if (try_critical_section(S_SESSION_TABLE))
-               //return;
-               //
        begin_critical_section(S_SESSION_TABLE);
        ptr = ContextList;
        while (ptr) {
@@ -537,9 +534,9 @@ void dead_session_purge(int force) {
                        ptr2->next = rem;
                        rem = ptr2;
                }
-               else if (ptr2->kill_me) {
-                       syslog(LOG_DEBUG, "context: session %d is timed out but non-idle", ptr->cs_pid);
-               }
+               //else if (ptr2->kill_me) {
+                       //syslog(LOG_DEBUG, "context: session %d is timed out but non-idle", ptr->cs_pid);
+               //}
        }
        end_critical_section(S_SESSION_TABLE);
 
index 4fb091dca5caee155ee5f2e04b1e18f5eb1438e3..89fad52ef4c1e440eaf5e8bb58be9be0ef587c6c 100644 (file)
@@ -301,7 +301,7 @@ void *loadtest(void *blah) {
        long ops = 0;
        printf("\033[%d;%dH\033[32m--------\033[0m", row, col);
        fflush(stdout);
-       sleep(1);
+       sleep(5);
        while(1) {
                perform_random_thing(serv_sock);
                printf("\033[%d;%dH\033[33m%8ld\033[0m", row, col, ++ops);