jar doesn't work

Bug #1871478 reported by Mauro Mancinetti
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman Java
New
Undecided
Unassigned

Bug Description

Hi guys,

I write you cause I am trying to use the jar but I believe that there might be a problem with the latest version of gearman as when I try to run the examples, it doesn't work.

I am not familiar with gearman so I am just following your instructions and what happen is that the program gets stuck.
The point where it gets stuck is when the following instruction gets executed:

client.addJobServer(conn);

Could you give me any help please as I'd like to use your library instead of some other non official handcrafted ones.
This one looks pretty good to me even if it looks like it's quite a while nobody works on it.

I hope to get an answer from you.

Thank you in advance.

Mauro

Tags: bug
Revision history for this message
Antoine "hashar" Musso (hashar) wrote :

Indeed this project hasn't been active in a while. I had some issue in the code running into an infinite loop while running with Java 11 while it works fine under Java 8. Maybe that is your case as well?

I have a made a fix that breaks the infinite loop and that seems to do the trick for Java 11:

 --- src/main/java/org/gearman/common/GearmanJobServerSession.java 2011-02-01 21:26:50 +0000
 +++ src/main/java/org/gearman/common/GearmanJobServerSession.java 2021-01-11 21:49:54 +0000
 @@ -198,7 +198,7 @@
          while (canRead()) {
              p = connection.read();
              if (p == null) {
 - continue;
 + break;
              }
              handleSessionEvent(new GearmanSessionEvent(p, this)); //NOPMD
          }

More details at https://phabricator.wikimedia.org/T271683#6737850

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.