From: Alex Rousskov Date: Tue, 18 Mar 2014 22:49:20 +0000 (-0600) Subject: Make sure Squid dumps core and not just promises one X-Git-Tag: SQUID_3_5_0_1~170^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24fe24be38427ccba2471cea3d1e7813eeb48e08;p=thirdparty%2Fsquid.git Make sure Squid dumps core and not just promises one when memory management goes wrong. --- diff --git a/src/stmem.cc b/src/stmem.cc index 44899eb9ae..011dca0463 100644 --- a/src/stmem.cc +++ b/src/stmem.cc @@ -269,7 +269,7 @@ mem_hdr::copy(StoreIOBuffer const &target) const debugs(19, DBG_IMPORTANT, "memCopy: could not find start of " << target.range() << " in memory."); debugDump(); - fatal("Squid has attempted to read data from memory that is not present. This is an indication of of (pre-3.0) code that hasn't been updated to deal with sparse objects in memory. Squid should coredump.allowing to review the cause. Immediately preceding this message is a dump of the available data in the format [start,end). The [ means from the value, the ) means up to the value. I.e. [1,5) means that there are 4 bytes of data, at offsets 1,2,3,4.\n"); + fatal_dump("Squid has attempted to read data from memory that is not present. This is an indication of of (pre-3.0) code that hasn't been updated to deal with sparse objects in memory. Squid should coredump.allowing to review the cause. Immediately preceding this message is a dump of the available data in the format [start,end). The [ means from the value, the ) means up to the value. I.e. [1,5) means that there are 4 bytes of data, at offsets 1,2,3,4.\n"); return 0; } @@ -368,7 +368,7 @@ mem_hdr::write (StoreIOBuffer const &writeBuffer) if (unionNotEmpty(writeBuffer)) { debugs(19, DBG_CRITICAL, "mem_hdr::write: writeBuffer: " << writeBuffer.range()); debugDump(); - fatal("Attempt to overwrite already in-memory data. Preceeding this there should be a mem_hdr::write output that lists the attempted write, and the currently present data. Please get a 'backtrace full' from this error - using the generated core, and file a bug report with the squid developers including the last 10 lines of cache.log and the backtrace.\n"); + fatal_dump("Attempt to overwrite already in-memory data. Preceeding this there should be a mem_hdr::write output that lists the attempted write, and the currently present data. Please get a 'backtrace full' from this error - using the generated core, and file a bug report with the squid developers including the last 10 lines of cache.log and the backtrace.\n"); PROF_stop(mem_hdr_write); return false; }