]> git.evergreen-ils.org Git - Evergreen.git/commit
Serials: MFHD::get_compressed_holdings() can reach infinite loop
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 6 May 2013 18:15:18 +0000 (14:15 -0400)
committerDan Wells <dbw2@calvin.edu>
Tue, 14 May 2013 13:04:51 +0000 (09:04 -0400)
commit6037151b6fc62bd59535b53d74518eeb123e82f2
treee419e4e60f0a55c3b290d4f276481dd27b29c76a
parent3e754bef1bb15fbe4cf963f9c001f36e928fdb7c
Serials: MFHD::get_compressed_holdings() can reach infinite loop

Even controlled serials holdings involve the internal creation of MFHD
fields, upon which caculations are performed for such purposes as the
display of holdings summaries in the OPAC.

There are too many ways that incorrect MFHD (or MFHD that our code just
can't yet handle) can lead our MFHD routines to crash. We can't address
all these possibilities in a single bug fix. But we can avoid this
infinite loop.

A subroutine within open-ils.serial (_summarize_contents()) relies on
MFHD::get_compressed_holdings(). When the latter went into an infinite
loop the result would be an open-il.serial drone process consuming CPU
time indefinitely and, depending on the data that provoked the loop,
potentially writing repeating messages to stderr indefinitely.

End users will still see the item receiving fail in these cases, and be
obliged to work around the issue as before until more robust
holdings summarization code can be written, but at least the overall
condition of the running Evergreen system won't be affected, and there
will be better information in the error logs.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Remington Steed <rjs7@calvin.edu>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm
Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD.pm