gearmand infinite loop invokes oom-killer

Bug #1070900 reported by Ryan Steele
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gearmand (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Distro: Ubuntu Lucid (10.04)

Kernel: 2.6.32-33-server #72-Ubuntu SMP Fri Jul 29 21:21:55 UTC 2011 x86_64 GNU/Linux

Packages:
   ii gearman 0.32-0~598-1~lucid1
   ii gearman-job-server 0.32-0~598-1~lucid1
   ii gearman-tools 0.32-0~598-1~lucid1
   ii libgearman6 0.32-0~598-1~lucid1
   ii python-gearman-cluster 1.1.0

Error:
   (Loops endlessly until oom-killer kills the job server)

   ERROR 2012-09-24 14:04:03.000000 [ 1 ] bad method: HTTP/1.0 -> libgearman-server/plugins/protocol/http/protocol.cc:287

Cause:
   When testing gearman, I accidentally included the line "HTTP/1.0 200 OK" while POST'ing to the HTTP listener during a telnet session (I was copying/pasting a query from a colleague and accidentally caught the gearman response from his session). This caused gearman to go into an infinite loop until oom-killer, well, killed the job server.

Sanitized Copy of Session:
   laptop:~$ ssh server

   server:~$ telnet 127.0.0.1 8888
   Trying 127.0.0.1...
   Connected to 127.0.0.1.
   Escape character is '^]'.
   POST /foo HTTP/1.1
   Content-Length: 219

   {"aaa": "bbb", "ccc": [ { "ddd": {"eee": "fff", "ggg": "hhh", "iii": 5}, "jjj": "kkk", "lll": ["mmm"] } ] }
   HTTP/1.0 200 OK

   Connection to server closed.

   laptop:~$

description: updated
description: updated
description: updated
Revision history for this message
Ryan Steele (ryans-aweber) wrote :

This also happens if a Content-Length that is too short for the data is provided (for example, setting it to 200 when the actual Content-Length is 220).

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Neither of these work on 1.1.18 in Ubuntu 18.04. This was likely fixed upstream and released long ago.

Changed in gearmand (Ubuntu):
status: New → Fix Released
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.