php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69858 Segmentation fault when worker timeout is low
Submitted: 2015-06-17 06:18 UTC Modified: 2017-01-10 08:25 UTC
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:2 (66.7%)
From: anatoly dot ruglaev at gmail dot com Assigned:
Status: Suspended Package: gearman (PECL)
PHP Version: 5.6.10 OS: Solaris (SunOS)
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
33 - 5 = ?
Subscribe to this entry?

 
 [2015-06-17 06:18 UTC] anatoly dot ruglaev at gmail dot com
Description:
------------
We have been noticed that our PHP gearman daemon periodically fails with segmentation fault. Yesterday it started to fail on each task coming from queue. 
Fault appears somewhere in GearmanWorker::work() function.
Core analysis says:

Program terminated with signal 11, Segmentation fault.
[New process 88489    ]
#0  gearman_real_malloc (allocator=@0x858, size=342, 
    func=0xffff80ffb8d4411f "receiving", 
    file=0xffff80ffb8d45c34 "libgearman/connection.cc", 
    line=1037) at libgearman/allocator.cc:52
52	  if (allocator.malloc)


After increasing worker timeout from 10ms to 1000ms problem was gone.

Why 10ms? This is default hardcoded timeout in composer package sinergi/gearman.

Reproduced in:
PHP 5.4.42 + gearman 1.1.2
PHP 5.6.6 + gearman 1.1.2

Expected result:
----------------
At least an exception throwed from library if timeout is too low to process jobs

Actual result:
--------------
Segmentation fault

Program terminated with signal 11, Segmentation fault.
[New process 88489    ]
#0  gearman_real_malloc (allocator=@0x858, size=342, 
    func=0xffff80ffb8d4411f "receiving", 
    file=0xffff80ffb8d45c34 "libgearman/connection.cc", 
    line=1037) at libgearman/allocator.cc:52
52	  if (allocator.malloc)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-10 08:25 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 08:25 UTC] kalle@php.net
The gearman extension have not had much activity in the past few years, so I'm taking the safe bet that this is no longer under active development (as I don't consider the typo fixes on the github repo an active development), besides that it also targets unsupported PHP versions. Please unsuspend this report in case it begins to blossom with life once more
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 02:01:30 2024 UTC