gearmand infinite loop invokes oom-killer
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-
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-
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:~$
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).