com.guidewire.live.dataService.DataServiceException: /data/store

Apache's JIRA Issue Tracker | Bruno Dumon | 6 years ago
  1. 0

    In an application that uses Avro as RPC mechanism (with the NettyTransceiver, but that's irrelevant), I've noticed in jprofiler that during normal operation quite some time was spent creating EOFExceptions: {noformat} 5.4% - 2,004 ms org.apache.avro.ipc.generic.GenericResponder.readRequest 5.0% - 1,871 ms org.apache.avro.generic.GenericDatumReader.read 4.9% - 1,832 ms org.apache.avro.generic.GenericDatumReader.read 4.9% - 1,832 ms org.apache.avro.generic.GenericDatumReader.readRecord 4.5% - 1,670 ms org.apache.avro.generic.GenericDatumReader.read 4.5% - 1,670 ms org.apache.avro.generic.GenericDatumReader.readRecord 4.3% - 1,596 ms org.apache.avro.generic.GenericDatumReader.read 2.8% - 1,048 ms org.apache.avro.generic.GenericDatumReader.readArray 1.3% - 477 ms org.apache.avro.io.ValidatingDecoder.arrayNext 1.3% - 471 ms org.apache.avro.io.BinaryDecoder.arrayNext 1.3% - 466 ms org.apache.avro.io.BinaryDecoder.doReadItemCount 1.3% - 466 ms org.apache.avro.io.BinaryDecoder.readLong 1.3% - 466 ms org.apache.avro.io.BinaryDecoder.ensureBounds 1.3% - 466 ms org.apache.avro.io.BinaryDecoder$ByteSource.compactAndFill 1.3% - 466 ms org.apache.avro.io.BinaryDecoder$InputStreamByteSource.tryReadRaw 1.3% - 466 ms org.apache.avro.util.ByteBufferInputStream.read 1.3% - 466 ms org.apache.avro.util.ByteBufferInputStream.getBuffer 1.3% - 466 ms java.io.EOFException.<init> 1.3% - 466 ms java.io.IOException.<init> 1.2% - 460 ms java.lang.Exception.<init> 1.2% - 460 ms java.lang.Throwable.<init> 1.2% - 460 ms java.lang.Throwable.fillInStackTrace {noformat} These exceptions are produced by the ByteBufferInputStream (which modifies InputStream's contract: return -1 at eof), but are catched higher up by the tryReadRaw method. What happens is this: The message in question has an (empty) array at the end of its message, thus the reader tries to read the size of this array in BinaryDecoder.readLong. This calls ensureBounds(10), whose contract is that it should read 10 bytes if they are available, and otherwise be quiet. ensureBounds calls via compactAndFill the tryReadRaw method. It is this method which catches the EOFException, because it only 'tries' to read so many bytes. Note that InputStreamByteSource.readRaw (without the 'try' part) does itself check if read < 0 in order to throw EOFException, making the throwing of EOFException in ByteBufferInputStream unnecessary (for this particular usage). There was some talk about EOFException in AVRO-392 too, though it seems this particular common case was not mentioned there. When using Avro RPC, or more in general, when using Avro to read small messages rather than large files, it seems like one can very easily run into this EOFException situation, which hurts performance. I'll attach a patch which simply removes the throwing of EOFException in ByteBufferInputStream, but this will likely break other cases which rely on the EOFException being thrown (haven't researched this to the bottom).

    Apache's JIRA Issue Tracker | 6 years ago | Bruno Dumon
    com.guidewire.live.dataService.DataServiceException: /data/store
  2. 0

    I assume that astyanax when calling to context just shutdown not closing the connection

    GitHub | 4 years ago | PavelTCo
    org.apache.thrift.transport.TTransportException: java.net.SocketException: Connection reset
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Retry mongodb connection

    GitHub | 3 years ago | j0hnsmith
    com.mongodb.MongoException$Network: Read operation to server /172.17.0.2:27017 failed on database local
  5. 0

    404 error

    GitHub | 4 years ago | xuniyuqi
    java.net.SocketException: Connection reset

  1. Andreas Häber 4 times, last 2 months ago
  2. sriharshakiran 1 times, last 7 months ago
14 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.net.SocketException

    Connection reset

    at java.net.SocketInputStream.read()
  2. Java RT
    BufferedInputStream.read
    1. java.net.SocketInputStream.read(SocketInputStream.java:209)
    2. java.net.SocketInputStream.read(SocketInputStream.java:141)
    3. java.io.BufferedInputStream.read1(BufferedInputStream.java:284)
    4. java.io.BufferedInputStream.read(BufferedInputStream.java:345)
    4 frames
  3. HttpClient
    WireLogInputStream.read
    1. org.apache.commons.httpclient.WireLogInputStream.read(WireLogInputStream.java:69)
    1 frame
  4. Java RT
    FilterInputStream.read
    1. java.io.FilterInputStream.read(FilterInputStream.java:133)
    1 frame
  5. HttpClient
    AutoCloseInputStream.read
    1. org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
    1 frame
  6. Apache Avro
    DataFileStream.<init>
    1. org.apache.avro.io.BinaryDecoder$InputStreamByteSource.tryReadRaw(BinaryDecoder.java:839)
    2. org.apache.avro.io.BinaryDecoder$ByteSource.compactAndFill(BinaryDecoder.java:692)
    3. org.apache.avro.io.BinaryDecoder.ensureBounds(BinaryDecoder.java:471)
    4. org.apache.avro.io.BinaryDecoder.readLong(BinaryDecoder.java:160)
    5. org.apache.avro.io.BinaryDecoder.doReadItemCount(BinaryDecoder.java:361)
    6. org.apache.avro.io.BinaryDecoder.readMapStart(BinaryDecoder.java:408)
    7. org.apache.avro.file.DataFileStream.initialize(DataFileStream.java:107)
    8. org.apache.avro.file.DataFileStream.<init>(DataFileStream.java:84)
    8 frames
  7. com.guidewire.live
    StoreAsyncService$StoreResultCallable.call
    1. com.guidewire.live.dataService.util.AvroSerde.fileStreamToObject(AvroSerde.java:80)
    2. com.guidewire.live.dataService.services.RemoteDataServiceImpl.transportOperation(RemoteDataServiceImpl.java:157)
    3. com.guidewire.live.dataService.services.RemoteDataServiceImpl.storeWire(RemoteDataServiceImpl.java:84)
    4. com.guidewire.live.dataService.services.StoreAsyncService$StoreResultCallable.call(StoreAsyncService.java:267)
    5. com.guidewire.live.dataService.services.StoreAsyncService$StoreResultCallable.call(StoreAsyncService.java:236)
    5 frames
  8. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    4. java.lang.Thread.run(Thread.java:745)
    4 frames