Local reference overflow in android_rpc on v0.6 branch

the android_prc_test.py script succeeded, however if I run an actual auto-tuning task, it always crashes due to this local reference overflow, looks like an issue in java binding library.

    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132] JNI ERROR (app bug): local reference table overflow (max=512)
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132] local reference table dump:
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]   Last 10 entries (of 511):
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       510: 0x12d546b8 org.apache.tvm.TVMValueLong
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       509: 0x12d55970 org.apache.tvm.TVMValueBytes
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       508: 0x12d54688 org.apache.tvm.TVMValueLong
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       507: 0x12cbfba0 java.lang.Class<org.apache.tvm.TVMValue>
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       506: 0x12d55930 org.apache.tvm.TVMValueBytes
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       505: 0x12d54670 org.apache.tvm.TVMValueLong
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       504: 0x12d55990 org.apache.tvm.TVMValue[] (1 elements)
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       503: 0x12d558f0 org.apache.tvm.TVMValueBytes
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       502: 0x12d55960 org.apache.tvm.TVMValue[] (1 elements)
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       501: 0x6f76d670 java.lang.Integer
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]   Summary:
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       170 of org.apache.tvm.TVMValue[] (1 elements) (170 unique instances)
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       167 of org.apache.tvm.TVMValueBytes (167 unique instances)
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]       148 of org.apache.tvm.TVMValueLong (148 unique instances)
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]        20 of java.lang.Integer (3 unique instances)
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]         2 of org.apache.tvm.TVMValueString (2 unique instances)
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]         1 of org.apache.tvm.Module
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]         1 of org.apache.tvm.tvmrpc.RPCProcessor
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]         1 of java.lang.String
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132]         1 of java.lang.Class
    02-05 10:41:21.628 18112 18130 F art     : art/runtime/indirect_reference_table.cc:132] 
    02-05 10:41:21.941 18112 18130 F art     : art/runtime/runtime.cc:430] Runtime aborting...

I meet the same issue with the latest code. @yongsun have you fixed this problem?

No, I used cpp_rpc in the end, build it with ndk.

@yongsun, Thanks, I will try it!