You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "William Bardwell (JIRA)" <ji...@apache.org> on 2011/04/25 19:49:03 UTC

[jira] [Created] (TS-752) cache scan issues

cache scan issues
-----------------

                 Key: TS-752
                 URL: https://issues.apache.org/jira/browse/TS-752
             Project: Traffic Server
          Issue Type: Bug
          Components: Cache
    Affects Versions: 2.1.4, 2.1.5, 2.1.6, 2.1.7
         Environment: Any
            Reporter: William Bardwell
         Attachments: svn4.diff

Using the CacheScan plugin APIs I found a few issues.
Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.

Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.

Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (TS-752) cache scan issues

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom reassigned TS-752:
--------------------------------

    Assignee: Leif Hedstrom

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-752) cache scan issues

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027157#comment-13027157 ] 

Leif Hedstrom commented on TS-752:
----------------------------------

John: I'm +1 on committing this as well, so please go ahead. I already applied the first patch which fixes the crasher.

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-752) cache scan issues

Posted by "William Bardwell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Bardwell updated TS-752:
--------------------------------

    Attachment: svn4.diff

Lets try that again, previous patch was not properly ported to trunk.

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>         Attachments: svn4.diff, svn4.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-752) cache scan issues

Posted by "John Plevyak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026758#comment-13026758 ] 

John Plevyak commented on TS-752:
---------------------------------

I reviewed this and it looks good to me.  I'd move vol_relative_length
into the header (for symetry).

The fix for partial objects I think is nice as well.  

I don't see the crash fix in svn5.diff, so I am assuming that the two are independent.

Since this patch is all about scan it should be safe.

William, how much testing have you given this?  If you are comfortable, I'll give it a smoke test and commit.

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-752) cache scan issues

Posted by "William Bardwell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025251#comment-13025251 ] 

William Bardwell commented on TS-752:
-------------------------------------

The second svn4.diff (second attachment) should be reviewed and committed, and is small, fixing a crash in canceling.
The svn5.diff (third attachment) should be reviewed and possibly committed, but it is larger and mixes in a performance improvement with the bug fix for entries on a read block boundary.

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-752) cache scan issues

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-752:
-----------------------------

    Fix Version/s: 2.1.8

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-752) cache scan issues

Posted by "William Bardwell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026804#comment-13026804 ] 

William Bardwell commented on TS-752:
-------------------------------------

We have run it a bunch, but it was a different version of these two patches that was against 2.1.4.
(The only difference in the patch is renames between vol and part, and I don't think that the Cache or Cache scan changed too much since 2.1.4.)

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>            Assignee: Leif Hedstrom
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TS-752) cache scan issues

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025159#comment-13025159 ] 

Leif Hedstrom commented on TS-752:
----------------------------------

William: Just to be safe, which of the patched submitted should be reviewed and committed?

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-752) cache scan issues

Posted by "William Bardwell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Bardwell updated TS-752:
--------------------------------

    Attachment: svn4.diff

This fixes the crash on fast cache scan canceling.

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>         Attachments: svn4.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (TS-752) cache scan issues

Posted by "William Bardwell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Bardwell updated TS-752:
--------------------------------

    Attachment: svn5.diff

Big fix to speed up cache scanning by skipping sections that have no entries in it.  (A fancier system could be made but this helps for non-full caches and shouldn't be too expensive for empty ones.)
And includes a fix to read part of a buffer when an entry overlaps a partition/volume boundary.

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (TS-752) cache scan issues

Posted by "John Plevyak (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Plevyak resolved TS-752.
-----------------------------

    Resolution: Fixed

Committed revision 1097979.


I committed both patches after making some minor changes.

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>            Assignee: John Plevyak
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (TS-752) cache scan issues

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-752?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom reassigned TS-752:
--------------------------------

    Assignee: John Plevyak  (was: Leif Hedstrom)

> cache scan issues
> -----------------
>
>                 Key: TS-752
>                 URL: https://issues.apache.org/jira/browse/TS-752
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 2.1.7, 2.1.6, 2.1.5, 2.1.4
>         Environment: Any
>            Reporter: William Bardwell
>            Assignee: John Plevyak
>             Fix For: 2.1.8
>
>         Attachments: svn4.diff, svn4.diff, svn5.diff
>
>
> Using the CacheScan plugin APIs I found a few issues.
> Issue 1 is that if you cancel a scan really quickly you can get a NULL dereference, the fix for this is easy.
> Issue 2 is that the cache scan code can skip over entries if the initial header overlaps a buffer boundary.
> Issue 3 is that the cache scan code is crazy slow if your cache is not full, it still scans everything.
> I will attach a patch for Issues 2 & 3 mixed together...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira