|
|
| Author |
Message |
< Erlang patches mailing list ~ log_mf_h can't store problem reports above 64K bytes (With p |
| Guest |
Posted: Tue Aug 21, 2007 11:50 am |
|
|
|
Guest
|
Release: OTP-R11b-5
Operating system: All
Problem description:
When the STDLIB module log_mf_h stores a problem report in the on-disk round-robin database, it can't store a problem report above a size of 64Kilobytes[*]. The reason is that the format used is to encode the report is (bit-syntax notation)
<<Size:16/integer, Report/binary>>
So since 2^16 = 64K, trying to store a larger problem report fails. Then, when the SASL module 'rb' tries to read the problem report, it fails becase the report has the wrong size.
Problem solution:
The attached patch changes the code so it
** Uses bit syntax rather than old peek/poke
** Uses a 4 byte size field rather than a 2 byte size field.
Solution considerations:
The patch will make all old log_mf_h logs on-disk unreadable. There is no upgrade path incorporated.
With a 32-bit integer word, it is possible to write enormously large error-reports to disk. Several gigabytes at least.
Solution alternatives:
Use a 3-byte field. Not because of space, but because it is then a 8/16Mb report that can be written which makes the second consideration much more tolerable.
Use list_to_binary(Bin, [compressed]). We would save some space and trade Disk I/O for CPU cycles. However, I don't know how well that is supported in the system.
[*] Maybe this is only 32 kilobytes because of signedness
Post recived from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|