I rebuilt the code from the Debian source archive (version 2.5.9-9), and
changed StatHist.c line 93 to this:

    {
    double shv = statHistVal(H, 0);
    double answer = floor(0.99L + shv - min);
    int iAnswer = (int) answer;
    if (iAnswer != 0) {  // ### Stephen Blackheath
        fprintf(debug_log, "Bug 310642 assertion values:\n");
        fprintf(debug_log, "  H->min = %f\n", H->min);
        fprintf(debug_log, "  H->max = %f\n", H->max);
        fprintf(debug_log, "  H->capacity = %d\n", H->capacity);
        fprintf(debug_log, "  H->scale = %f\n", H->scale);
        fprintf(debug_log, "  statHistVal(H, 0) = %f\n", shv);
        fprintf(debug_log, "  answer = %f\n", answer);
        fprintf(debug_log, "  iAnswer = %d\n", iAnswer);
        fflush(debug_log);
    }
    assert(iAnswer == 0);
    }

Some script is obviously successfully restarting the daemon now, so it
*appears* to be reliable, unlike before where the script sometimes
failed to restart.

Here are the relevant excerpts from cache.log - I have no idea what
these numbers mean.  A wild guess - perhaps it should be "floor(0.99f +
statHistVal(H,0) - min)" ??  0.99L seems like nonsense to me.

-------------------------------------
2005/06/01 06:29:33| storeDirWriteCleanLogs: Starting...
2005/06/01 06:29:35|   Finished.  Wrote 1053 entries.
2005/06/01 06:29:35|   Took 0.2 seconds (5949.0 entries/sec).
2005/06/01 06:29:35| logfileRotate: /var/log/squid/store.log
Bug 310642 assertion values:
  H->min = -1.000000
  H->max = 6.000000
  H->capacity = 7
  H->scale = 1.000000
  statHistVal(H, 0) = -1.000000
  answer = 1.000000
  iAnswer = 1
2005/06/01 10:14:22| assertion failed: StatHist.c:108: "iAnswer == 0"
2005/06/01 10:14:26| Starting Squid Cache version 2.5.STABLE9 for
i386-debian-linux-gnu...
-------------------------------------
2005/06/01 10:14:27| Beginning Validation Procedure
2005/06/01 10:14:27|   Completed Validation Procedure
2005/06/01 10:14:27|   Validated 1103 Entries
2005/06/01 10:14:27|   store_swap_size = 124068k
2005/06/01 10:14:27| storeLateRelease: released 0 objects
2005/06/01 10:14:28| WARNING: Disk space over limit: 122728 KB > 102400 KB
Bug 310642 assertion values:
  H->min = -1.000000
  H->max = 6.000000
  H->capacity = 7
  H->scale = 1.000000
  statHistVal(H, 0) = -1.000000
  answer = 1.000000
  iAnswer = 1
2005/06/02 06:09:17| assertion failed: StatHist.c:108: "iAnswer == 0"
2005/06/02 06:09:21| Starting Squid Cache version 2.5.STABLE9 for
i386-debian-linux-gnu...
2005/06/02 06:09:21| Process ID 1737
2005/06/02 06:09:21| With 1024 file descriptors available
2005/06/02 06:09:21| DNS Socket created at 0.0.0.0, port 3838, FD 7
2005/06/02 06:09:21| Adding nameserver 203.79.104.69 from /etc/resolv.conf
2005/06/02 06:09:21| User-Agent logging is disabled.
2005/06/02 06:09:21| Referer logging is disabled.
2005/06/02 06:09:21| Unlinkd pipe opened on FD 11
Bug 310642 assertion values:
  H->min = -1.000000
  H->max = 6.000000
  H->capacity = 7
  H->scale = 1.000000
  statHistVal(H, 0) = -1.000000
  answer = 1.000000
  iAnswer = 1
2005/06/02 06:09:21| assertion failed: StatHist.c:108: "iAnswer == 0"
2005/06/02 06:09:24| Starting Squid Cache version 2.5.STABLE9 for
i386-debian-linux-gnu...
2005/06/02 06:09:24| Process ID 1740
2005/06/02 06:09:24| With 1024 file descriptors available
2005/06/02 06:09:24| DNS Socket created at 0.0.0.0, port 3838, FD 7
2005/06/02 06:09:24| Adding nameserver 203.79.104.69 from /etc/resolv.conf
-------------------------------------
2005/06/02 06:29:36| storeDirWriteCleanLogs: Starting...
2005/06/02 06:29:38|   Finished.  Wrote 109 entries.
2005/06/02 06:29:38|   Took 0.1 seconds (1227.3 entries/sec).
2005/06/02 06:29:38| logfileRotate: /var/log/squid/store.log
Bug 310642 assertion values:
  H->min = -1.000000
  H->max = 6.000000
  H->capacity = 7
  H->scale = 1.000000
  statHistVal(H, 0) = -1.000000
  answer = 1.000000
  iAnswer = 1
2005/06/02 08:42:35| assertion failed: StatHist.c:108: "iAnswer == 0"
2005/06/02 08:42:39| Starting Squid Cache version 2.5.STABLE9 for
i386-debian-linux-gnu...
2005/06/02 08:42:39| Process ID 3194
2005/06/02 08:42:39| With 1024 file descriptors available
2005/06/02 08:42:39| DNS Socket created at 0.0.0.0, port 4972, FD 7
-------------------------------------
2005/06/02 08:42:39|   Completed Validation Procedure
2005/06/02 08:42:39|   Validated 109 Entries
2005/06/02 08:42:39|   store_swap_size = 92112k
2005/06/02 08:42:40| storeLateRelease: released 0 objects
Bug 310642 assertion values:
  H->min = -1.000000
  H->max = 17.000000
  H->capacity = 18
  H->scale = 1.000000
  statHistVal(H, 0) = -1.000000
  answer = 1.000000
  iAnswer = 1
2005/06/02 17:46:12| assertion failed: StatHist.c:108: "iAnswer == 0"
2005/06/02 17:46:16| Starting Squid Cache version 2.5.STABLE9 for
i386-debian-linux-gnu...
2005/06/02 17:46:16| Process ID 7873
2005/06/02 17:46:16| With 1024 file descriptors available
2005/06/02 17:46:16| DNS Socket created at 0.0.0.0, port 1366, FD 7
2005/06/02 17:46:16| Adding nameserver 203.79.104.69 from /etc/resolv.conf
-------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to