NullPointerException from GearmanJobImpl.getHandle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman Java |
Confirmed
|
High
|
Eric Lambert |
Bug Description
Sometimes, without an obvious reason - I get this NPE:
java.lang.
at org.gearman.
at org.gearman.
at org.gearman.
at org.gearman.
at org.gearman.
at org.gearman.
at org.gearman.
at org.gearman.
at org.gearman.
Changed in gearman-java: | |
milestone: | none → 0.05 |
This issue appears to be due to a mismatch in how the session and client handle the scenario where a submit_job timesout. The client clears the job from the jobAwaitingCreation set, but the session still has a task for this submit in it's tasksAwaitingAck set. So when the session gets reused to submit a new job and that job receives a response from the server, the task for the original submit (which still has a handle on the original job) handles the response in order to extract the job_handle from the response. But when the client attempts to handle the response, it only has a handle on the newer job (via jobAwatingCreation) since this newer job has not seen the response from the server, the handle for the new job is null and hence the NPE. Put simply, the session is corrupted by the initial timeout.