thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jens Geyer (Jira)" <>
Subject [jira] [Assigned] (THRIFT-5092) Panic on nil buffer writes
Date Thu, 13 Feb 2020 21:44:00 GMT


Jens Geyer reassigned THRIFT-5092:

    Assignee: Renan DelValle

> Panic on nil buffer writes
> --------------------------
>                 Key: THRIFT-5092
>                 URL:
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Library
>    Affects Versions: 0.13.0
>            Reporter: Renan DelValle
>            Assignee: Renan DelValle
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
> Whenever a buffer from a THttpClient is set to nil, any subsequent attempts to write
to the connection will result in a panic.
> Regardless of how the buffer ended up in a nil state, it is a better approach to handle
the error in the call to the Write than to have the program panic.
> We've been hitting this issue once in a while and it's been difficult to replicate but
here is some sanitized relevant stack trace:
> {code:java}
>  panic(0x1446380, 0x1fcff90)
>  	/usr/local/go/src/runtime/panic.go:491 +0x283
>  bytes.(*Buffer).Write(0x0, 0xc42143b000, 0x87, 0x1000, 0x1, 0x0, 0x0)
>  	/usr/local/go/src/bytes/buffer.go:160 +0x26
0xc42143b000, 0x87, 0x1000, 0xc421018538, 0x9195a8, 0xc42085ae10)
>  	/go/src/
>  bufio.(*Writer).Flush(0xc421418b80, 0x90f42e, 0xc42085ae10)
>  	/usr/local/go/src/bufio/bufio.go:567 +0x7e
0x1f8d4c0, 0xc420016088, 0x0, 0x0)
>  	/go/src/
0x1f8d4c0, 0xc420016088, 0x1f9b720, 0xc4203562d0, 0x11, 0x1655325, 0xe, 0x1f7f500, 0xc420360020,
> {code}
> followed by the root cause of the panic:
> {code:java}
> runtime error: invalid memory address or nil pointer dereference
> {code}
> I have a patch I'm testing out. I would love some feedback on it.
> []

This message was sent by Atlassian Jira

View raw message