[ 
https://issues.apache.org/jira/browse/THRIFT-2500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

LiMing updated THRIFT-2500:
---------------------------

          Component/s:     (was: Java - Library)
                       Go - Library
          Description: 
Sending random data to a go thrift service causes it to crash with extreme 
prejudice.

dd if=/dev/urandom count=1 | nc $host 9160

... produces ...

throw: runtime: out of memory

goroutine 8 [running]:
git.apache.org/thrift.git/lib/go/thrift.(*TFramedTransport).readFrame(0xf8400b1020,
 0x7fb7cd49eb00, 0xf84007f000, 0x40894d)
        
/home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/framed_transport.go:118
 +0x2bf
git.apache.org/thrift.git/lib/go/thrift.(*TFramedTransport).Read(0xf8400b1020, 
0xf8400b1072, 0x800000004, 0x26eb068, 0xf84005bc00, ...)
        
/home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/framed_transport.go:77
 +0xe2
io.ReadAtLeast(0xf840062810, 0xf8400b1020, 0xf8400b1072, 0x800000004, 0x4, ...)
        /usr/lib/go/src/pkg/io/io.go:254 +0xc3
io.ReadFull(0xf840062810, 0xf8400b1020, 0xf8400b1072, 0x800000004, 
0xf8400b1020, ...)
        /usr/lib/go/src/pkg/io/io.go:273 +0x69
git.apache.org/thrift.git/lib/go/thrift.(*TBinaryProtocol).readAll(0xf8400b1060,
 0xf8400b1072, 0x800000004, 0x41513c, 0xf8400b1040, ...)
        
/home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/binary_protocol.go:430
 +0x5f
git.apache.org/thrift.git/lib/go/thrift.(*TBinaryProtocol).ReadI32(0xf8400b1060,
 0x0, 0x0, 0x0, 0x8, ...)
        
/home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/binary_protocol.go:379
 +0x66
git.apache.org/thrift.git/lib/go/thrift.(*TBinaryProtocol).ReadMessageBegin(0xf8400b1060,
 0x0, 0x0, 0x0, 0x0, ...)
        
/home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/binary_protocol.go:222
 +0x64
tutorial.(*AddServiceProcessor).Process(0xf84005cb00, 0xf8400af000, 
0xf8400b1060, 0xf8400af000, 0xf8400b1080, ...)
        
/home/liming/go/src/nefs/thrift_util/go_test/src/tutorial/add_service.go:137 
+0x5a
thrift_util.(*TNefsServer).processRequest(0xf84005de80, 0xf84005f900, 
0xf84005bae0, 0x0, 0x0, ...)
        
/home/liming/go/src/nefs/thrift_util/go_test/src/thrift_util/nefs_server.go:212 
+0x316
thrift_util._func_001(0xf840074278, 0xf84006d8e0, 0x0, 0x0)
        
/home/liming/go/src/nefs/thrift_util/go_test/src/thrift_util/nefs_server.go:182 
+0x37
created by thrift_util.(*TNefsServer).Serve
        
/home/liming/go/src/nefs/thrift_util/go_test/src/thrift_util/nefs_server.go:186 
+0x46e

  was:
Sending random data to a Java thrift service causes it to crash with extreme 
prejudice.

dd if=/dev/urandom count=1 | nc $host 9160

... produces ...

java.lang.OutOfMemoryError: Java heap space
        at 
org.apache.thrift.protocol.TBinaryProtocol.readStringBody(TBinaryProtocol.java:296)
        at 
org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:203)
        at 
org.apache.cassandra.service.Cassandra$Processor.process(Cassandra.java:615)
        at 
org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:253)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
        at java.lang.Thread.run(Thread.java:636)

    Affects Version/s:     (was: 0.2)
                       0.9.1
        Fix Version/s:     (was: 0.3)

> sending random data crashes thrift service
> ------------------------------------------
>
>                 Key: THRIFT-2500
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2500
>             Project: Thrift
>          Issue Type: Bug
>          Components: Go - Library
>    Affects Versions: 0.9.1
>            Reporter: LiMing
>            Assignee: David Reiss
>            Priority: Critical
>              Labels: gsoc
>
> Sending random data to a go thrift service causes it to crash with extreme 
> prejudice.
> dd if=/dev/urandom count=1 | nc $host 9160
> ... produces ...
> throw: runtime: out of memory
> goroutine 8 [running]:
> git.apache.org/thrift.git/lib/go/thrift.(*TFramedTransport).readFrame(0xf8400b1020,
>  0x7fb7cd49eb00, 0xf84007f000, 0x40894d)
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/framed_transport.go:118
>  +0x2bf
> git.apache.org/thrift.git/lib/go/thrift.(*TFramedTransport).Read(0xf8400b1020,
>  0xf8400b1072, 0x800000004, 0x26eb068, 0xf84005bc00, ...)
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/framed_transport.go:77
>  +0xe2
> io.ReadAtLeast(0xf840062810, 0xf8400b1020, 0xf8400b1072, 0x800000004, 0x4, 
> ...)
>         /usr/lib/go/src/pkg/io/io.go:254 +0xc3
> io.ReadFull(0xf840062810, 0xf8400b1020, 0xf8400b1072, 0x800000004, 
> 0xf8400b1020, ...)
>         /usr/lib/go/src/pkg/io/io.go:273 +0x69
> git.apache.org/thrift.git/lib/go/thrift.(*TBinaryProtocol).readAll(0xf8400b1060,
>  0xf8400b1072, 0x800000004, 0x41513c, 0xf8400b1040, ...)
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/binary_protocol.go:430
>  +0x5f
> git.apache.org/thrift.git/lib/go/thrift.(*TBinaryProtocol).ReadI32(0xf8400b1060,
>  0x0, 0x0, 0x0, 0x8, ...)
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/binary_protocol.go:379
>  +0x66
> git.apache.org/thrift.git/lib/go/thrift.(*TBinaryProtocol).ReadMessageBegin(0xf8400b1060,
>  0x0, 0x0, 0x0, 0x0, ...)
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/git.apache.org/thrift.git/lib/go/thrift/binary_protocol.go:222
>  +0x64
> tutorial.(*AddServiceProcessor).Process(0xf84005cb00, 0xf8400af000, 
> 0xf8400b1060, 0xf8400af000, 0xf8400b1080, ...)
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/tutorial/add_service.go:137 
> +0x5a
> thrift_util.(*TNefsServer).processRequest(0xf84005de80, 0xf84005f900, 
> 0xf84005bae0, 0x0, 0x0, ...)
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/thrift_util/nefs_server.go:212
>  +0x316
> thrift_util._func_001(0xf840074278, 0xf84006d8e0, 0x0, 0x0)
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/thrift_util/nefs_server.go:182
>  +0x37
> created by thrift_util.(*TNefsServer).Serve
>         
> /home/liming/go/src/nefs/thrift_util/go_test/src/thrift_util/nefs_server.go:186
>  +0x46e



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to