[OPNFLWJAVA-29] Null pointer exceptions when multiple concurrent restconf client attempting to program flows Created: 16/Jul/14 Updated: 18/Jul/14 Resolved: 18/Jul/14 |
|
| Status: | Resolved |
| Project: | openflowjava |
| Component/s: | General |
| Affects Version/s: | unspecified |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | Jan Medved | Assignee: | Jan Medved |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: Mac OS |
||
| External issue ID: | 1373 |
| Description |
|
I get a lot of null pointer exceptions when more than restconf client tries to program flows. See attached logs To reproduce: The test Python script below this line from random import randrange class Counter(object): class Timer(object): def _enter_(self): def _exit_(self, *args): putheaders = {'content-type': 'application/json'}getheaders = {'Accept': 'application/json'}
INVURL = 'restconf/operational/opendaylight-inventory:nodes' print_lock = threading.Lock() JSON_FLOW_MOD1 = '''{ }, add_ok_rate = Counter(0.0) def add_flow(url_template, s, res, tid, node, flow_id, metadata): try: def delete_flow(url_template, s, res, tid, node, flow_id): def get_num_nodes(inventory_url, s, default_nodes): return nodes def add_delete_flows(put_url, del_url, nnodes, nflows, tid, cond): s = requests.Session() with print_lock: with Timer() as t: add_time = t.secs with print_lock: with Timer() as t: del_time = t.secs add_ok_rate_t = add_res[200]/add_time add_ok_rate.increment(add_ok_rate_t) del_ok_rate_t = del_res[200]/del_time del_ok_rate.increment(del_ok_rate_t) with print_lock: with cond: if _name_ == "_main_": in_args = parser.parse_args() put_url = 'http://' + in_args.odlhost + ":" + in_args.odlport + '/' + PUTURL nnodes = in_args.nnodes cond = threading.Condition() for i in range(nthreads): finished = 0 print '\n Overall add success rate: %.2f, Overall add rate: %.2f' % \ |
| Comments |
| Comment by Jan Medved [ 16/Jul/14 ] |
|
Web Access log: |
| Comment by Jan Medved [ 16/Jul/14 ] |
|
Note that the null pointer exceptions (missing serializer, etc.) do not occur when only one thread add/deletes flows. |
| Comment by Michal Polkorab [ 16/Jul/14 ] |
|
I am unable to reproduce this issue. Tried with different mininet topologies, different number of thread and flows used. There are no ofjava logs after connection is established. I can see only exceptions (probably) related to Can you paste some of those missing serializer logs, please ? |
| Comment by Jan Medved [ 16/Jul/14 ] |
|
You have all the logs attached to a private email. |
| Comment by Michal Polkorab [ 16/Jul/14 ] |
|
Pasting one of NullPointerExceptions: 2014-07-15 23:02:06.857 PDT [nioEventLoopGroup-11-1] ERROR o.o.o.protocol.impl.core.OFEncoder - Serializer for key: msgVersion: 1 msgType: org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.actions.grouping.Action msgType2: org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.DecNwTtl was not found The NullPointerException for missing serializer is correct. There is no DecNwTtl action in OF 1.0. The message might have been translated incorrectly (outside the OFjava) or you might be trying to use this action with an OF 1.0 device (maybe cbench ?). |
| Comment by Tony Tkacik [ 16/Jul/14 ] |
|
Michal then log report should be different, you should throw NullPointer when |
| Comment by Jan Medved [ 16/Jul/14 ] |
|
The illegal state exceptions are still there, even if i use OF1.3 mininet. The rates did not change much |
| Comment by Michal Polkorab [ 17/Jul/14 ] |
|
Issue should be fixed by this change: Please verify. |