RT RT/krbdev.mit.edu: Ticket #7873 ulog_map doesn't work with very large ulogentries values Signed in as guest.
[Logout]

[Home] [Search] [Configuration]

[Display] [History] [Basics] [Dates] [People] [Links] [Jumbo]

 
 

 The Basics  
Id
7873
Status
open
Worked
0 min
Priority
0/0
Queue
krb5
 

 Keyword Selections  
Component
Tags
Version_reported
Version_Fixed
Target_Version
 

 Relationships  
Depends on:
Depended on by:
Parents:
Children:

Refers to:
  • 7368: (ghudson) MAX_ULOGENTRIES is too low [resolved]
Referred to by:
 
 Dates  
Created: Tue Mar 11 13:46:06 2014
Starts: Not set
Started: Not set
Last Contact: Not set
Due: Not set
Updated: Tue Mar 11 13:48:24 2014 by ghudson
 

 People  
Owner
 Nobody
Requestors
 ghudson@mit.edu
Cc
 
AdminCc
 
 

 More about Greg Hudson  
Comments about this user:
No comment entered about this user
This user's 25 highest priority tickets:
 

History   Display mode: [Brief headers] [Full headers]
      Tue Mar 11 13:46:06 2014  ghudson - Ticket created    
     
Subject: ulog_map doesn't work with very large ulogentries values

Ticket #7368 removed the maximum value of ulogentries (formerly 2500),
but did not add checking of make enough changes to avoid problems with
very large values of ulogentries:

* If ulogentries is 128K or more, then ulog_map won't map the full ulog,
since it always maps MAXLOGLEN bytes (256MB) without regard to the file
size.  In this case the code will eventually experience a segmentation
fault.

* resize_ulog computes the new file size (headersize + newblocksize *
ulogentries) and errors if that exceeds MAXLOGLEN bytes.  So if
ulogentries is something like 100K, then the ulog will until the record
size needs to be expanded, and will then fail.

The best fix is to get rid of MAXLOGLEN, map the file size in ulog_map,
and remap the file in resize().  Failing that, a check in ulog_map()
would make the current approach safer.


Download (untitled) 845b
      Tue Mar 11 13:48:24 2014  ghudson - Ticket 7873 RefersTo ticket 7368.