[ 
https://issues.apache.org/jira/browse/HTRACE-282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14979800#comment-14979800
 ] 

Masatake Iwasaki edited comment on HTRACE-282 at 10/29/15 5:08 AM:
-------------------------------------------------------------------

In addition, reaper itself seems to be accessed after closed.

{noformat}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x48eb4c]

goroutine 52 [running]:
org/apache/htrace/htraced.(*Reaper).GetReaperDate(0x0, 0x0)
        
/home/iwasakims/srcs/htrace/htrace-htraced/go/src/org/apache/htrace/htraced/datastore.go:414
 +0x9c
org/apache/htrace/htraced.(*shard).pruneExpired(0xc8201c6280)
        
/home/iwasakims/srcs/htrace/htrace-htraced/go/src/org/apache/htrace/htraced/datastore.go:164
 +0x2be
{noformat}

Closing reaper after shards could avoid this.

{code}
        if store.rpr != nil {
                store.rpr.Shutdown()
                store.rpr = nil
        }
        for idx := range store.shards {
                store.shards[idx].Close()
                store.shards[idx] = nil
        }
{code}



was (Author: iwasakims):
In addition, reaper itself seems to be accessed after closed.

{noformat}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x48eb4c]

goroutine 52 [running]:
org/apache/htrace/htraced.(*Reaper).GetReaperDate(0x0, 0x0)
        
/home/iwasakims/srcs/htrace/htrace-htraced/go/src/org/apache/htrace/htraced/datastore.go:414
 +0x9c
org/apache/htrace/htraced.(*shard).pruneExpired(0xc8201c6280)
        
/home/iwasakims/srcs/htrace/htrace-htraced/go/src/org/apache/htrace/htraced/datastore.go:164
 +0x2be
{noformat}


> htraced: reap spans which are older than a configurable interval
> ----------------------------------------------------------------
>
>                 Key: HTRACE-282
>                 URL: https://issues.apache.org/jira/browse/HTRACE-282
>             Project: HTrace
>          Issue Type: Bug
>          Components: htraced
>    Affects Versions: 3.2.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HTRACE-282.001.patch, HTRACE-282.002.patch, 
> HTRACE-282.003.patch, HTRACE-282.004.patch, TestReapingOldSpans.log
>
>
> htraced: reap spans which are older than a configurable interval



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to