Coder Social home page Coder Social logo

perl-gearman's People

Contributors

hidden-primary-net avatar jozef avatar manwar avatar p-alik avatar plicease avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

perl-gearman's Issues

v2.004.011 breaks Gearman-Client-Async-0.94

Gearman-Client-Async-0.94's t/allinone.t test fails after upgrading Gearman from 2.004.010 to 2.004.011:

$ PERL5LIB=/home/test/fedora/perl-Gearman-Server/Gearman-Server-v1.130.1/lib:/tmp/perl-Gearman/lib:./lib perl t/allinone.t 
1..2
provided value is not a blessed object at /tmp/perl-Gearman/lib/Gearman/Util.pm line 120.
RETRY: [1]
Timeout, test fails at t/allinone.t line 62.
# Looks like your test exited with 255 before it could output anything.

This happens since this Gearman commit:

commit e2665604b11db52e58df061a708bd4dbba2f6b08
Author: Alexei Pastuchov <[email protected]>
Date:   Fri Dec 8 21:22:32 2017 +0100

    refactoring: put SSL socket checkt outside of loop

worker's performance loss in v2.004.009

On 03 November 2017 at 01:33 @esabol [email protected] wrote:

Well, I have tested the upstream branch, and I have good news and bad news.

The good news is that it solves the problem with the CPU usage. 10 seconds after starting the workers, ps auxgww shows 0.0% CPU usage.

The bad news is that the workers' response times are at least 25 times slower in my benchmarks. :( This is in comparison to version 2.004.008. (2.004.009 has even worse problems.)

I am using a simple SSL worker that just responds with "pong" when it receives the task "ping". Doing 100 iterations of running "ping" task using the identical client code:

Benchmark: timing 100 iterations of 47300, 47301...
     47300:  1 wallclock secs ( 0.14 usr +  0.02 sys =  0.16 CPU) @ 625.00/s (n=100)
            (warning: too few iterations for a reliable count)
     47301: 30 wallclock secs ( 0.17 usr +  0.02 sys =  0.19 CPU) @ 526.32/s (n=100)
            (warning: too few iterations for a reliable count)
Done.

Port 47300 is running 2.004.008 SSL. Port running 47301 is github/upstream SSL.

If I revert port 47301 to 2.004.008, and re-run my benchmarks:

Benchmark: timing 100 iterations of 47300, 47301...
     47300:  0 wallclock secs ( 0.06 usr +  0.01 sys =  0.07 CPU) @ 1428.57/s (n=100)
            (warning: too few iterations for a reliable count)
     47301:  0 wallclock secs ( 0.05 usr +  0.01 sys =  0.06 CPU) @ 1666.67/s (n=100)
            (warning: too few iterations for a reliable count)
Done.

I would call this an unacceptable performance regression.

Gearman-v2.003_002 t/20-send-work-command.t test fails with: Can't locate object method "CMD_work_data" via package "Gearman::Server::Client"

I gave a try to Gearman-v2.003_002 and when running t/20-send-work-command.t tests against Gearman-Server-1.130.1, I see these failures:

$ prove -b t/20-send-work-command.t
t/20-send-work-command.t .. 1/? Error: Can't locate object method "CMD_work_data" via package "Gearman::Server::Client" at /usr/share/perl5/vendor_perl/Gearman/Server/Client.pm line 55
2.

Error: Can't locate object method "CMD_work_data" via package "Gearman::Server::Client" at /usr/share/perl5/vendor_perl/Gearman/Server/Client.pm line 552.

Error: Can't locate object method "CMD_work_data" via package "Gearman::Server::Client" at /usr/share/perl5/vendor_perl/Gearman/Server/Client.pm line 552.

[...]

Uh, wasn't expecting a error packet. [server_error -- Can't locate object method "CMD_work_data" via package "Gearman::Server::Client" at /usr/share/perl5/vendor_perl/Gearman/Server/Cl
ient.pm line 552.
]

    #   Failed test 'on_data count'  
    #   at t/20-send-work-command.t line 48.
    #          got: '11'
    #     expected: '0'

    #   Failed test 'sum result'
    #   at t/20-send-work-command.t line 49.
    #          got: '494'
    #     expected: '0'
    # Looks like you failed 2 tests of 3.

#   Failed test 'work_data'
#   at t/20-send-work-command.t line 50.
[...]
Error: Can't locate object method "CMD_work_warning" via package "Gearman::Server::Client" at /usr/share/perl5/vendor_perl/Gearman/Server/Client.pm line 552.

Uh, wasn't expecting a error packet. [server_error -- Can't locate object method "CMD_work_warning" via package "Gearman::Server::Client" at /usr/share/perl5/vendor_perl/Gearman/Server/Client.pm line 552.
]   

    #   Failed test 'on_warning count'
    #   at t/20-send-work-command.t line 48.
    #          got: '11'
    #     expected: '0'

    #   Failed test 'sum result'
    #   at t/20-send-work-command.t line 49.
    #          got: '494'
    #     expected: '0'
    # Looks like you failed 2 tests of 3.

#   Failed test 'work_warning'
#   at t/20-send-work-command.t line 50.
# Looks like you failed 2 tests of 4.

Gearman::Worker minor optimizations

I'm not sure if the Perl compiler already optimizes these these things or not, but I suspect not. The following simple optimizations could be made:

  1. Replace
sub _rc {
    return Gearman::Util::pack_req_command(@_);
}

with

*_rc = \&Gearman::Util::pack_req_command;

A simple change that should improve efficiency.

  1. _send() is a little different though. The second argument is a SCALAR, but Gearman::Util::send_req() wants a REF.
sub _send {
    my ($jss, $req) = @_;
    return Gearman::Util::send_req($jss, \$req);
}

Passing a REF is more efficient, especially with very large requests.

Two possible solutions:

a. Modify Gearman::Util::send_req() to work with the second argument being either a REF or a SCALAR. Then, replace "sub _send { ...}" with

*_send = \&Gearman::Util::send_req_command;

Then, change all the second arguments in the _send() calls to pass the request as a reference.

b. Mark _send() as deprecated (but keep it in case third-party modules or subclasses use it) and change all _send() calls to Gearman::Util::send_req() with the second argument passed as a reference.

What do you think?

Gearman::Taskset: Wrong error reason

With issue #33 fixing the missing call of the on_fail callback I suggested an error reason containing the given timeout value. Unfortunately I missed the fact that the given value is manipulated. Instead of telling the given timeout value the user encounters a message like this:

Task task_that_does_not_exist elapsed timeout [1514988291.35953s]

The current time was added to the given timeout value.
This is not the (my) intended behaviour, I'll create a pull request fixing this issue.

some jobs are repeated indefinitely

Hi, I have a worker with this function registered

my $worker = ...

sub get_job_history {
        my $gearman = shift;
        my $args = thaw $gearman->arg;

        #.....

        $worker->send_work_complete($gearman);
        return 'ok';
}
$worker->register_function("get_job_history", \&get_job_history);
$worker->work(
        on_start => sub {
                my ($jobhandle) = @_;
                print STDERR "on_start:", $jobhandle, $/;
        },
        on_complete => sub {
                my ($jobhandle, $result) = @_;
                print STDERR "on_complete:", $jobhandle, "\n", Dumper($result), $/;
        },
        on_fail => sub {
                my ($jobhandle, $err) = @_;
                print STDERR "on_fail:", $jobhandle, "\t", $err, $/;
        },
);

which I call it once in the background. For some reason this function is executed until I stop the worker:

on_start:127.0.0.1:4730//H:server:80
on_complete:127.0.0.1:4730//H:server:80
$VAR1 = 'ok';

on_start:127.0.0.1:4730//H:server:80
on_complete:127.0.0.1:4730//H:server:80
$VAR1 = 'ok';

on_start:127.0.0.1:4730//H:server:80
on_complete:127.0.0.1:4730//H:server:80
$VAR1 = 'ok';

using gearadmin I can see these:

  • before starting the worker
$ gearadmin --show-jobs
H:server:80     0       0       1
  • after staring the worker, ran gearadmin a few times
$ gearadmin --show-jobs
H:server:80     2       0       1       

 $ gearadmin --show-jobs
H:server:80     102     0       1

$ gearadmin --show-jobs
H:server:80     182     0       1

$ gearadmin --show-jobs
H:server:80     5       0       1

How can I make sure the job runs only one time? I'm using gearmand v1.1.12 (not Gearman::Server). The server options are:

/usr/sbin/gearmand -d -p 4730 -R

Thanks,
Cornel

Gearman::Worker documentation

Found a typo. Please change "reset_abilityes" to "reset_abilities" here:

B<return> true if C<reset_abilityes> request successfully transmitted to C<job_servers>

Also, I feel that the stop_if, on_start, on_complete and on_fail callbacks for work need to be documented better. stop_if has an example, but the others are only barely mentioned. It's not clear what values are being passed to these callbacks unless you look at the source code (and even then it's not very clear).

A useful example might be a worker that stops working after N completed (or failed?) jobs.

set prefix separator

Gearman::Objects->func by using prefix Client and Worker deal with function names in form join "\t", prefix function-name.

The trouble is in persistence of gearmand queue only. In particular with libmemcached.

  • start gearmand with memcache persistence
    gearmand --queue-type libmemcached --libmemcached-servers 127.0.0.1:11211

  • dispatch some background jobs

echo "status" | nc -w 1 localhost 4730
Foo::Bar        foo     2       0       0
foo     2       0       0
  • after restarting gearmand doesn't recover Foo::Bar foo
echo "status" | nc -w 1 localhost 4730
foo     2       0       0

clean up output of "make test" [Gearman-2.004.007]

(1) t/04-task.t reports:
"my" variable $v masks earlier declaration in same scope at t/04-task.t line 241.

Proposed solution: Change my $v on line 249 of t/04-task.t to just $v.

(2) Many tests print out /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
This is only a warning message and doesn't affect anything, but it makes the output of "make test" rather untidy.

Proposed solution: Add --log-file /dev/stderr to %args in _start_server(). Something like:

            $args{"--log-file"} = "/dev/stderr" if (-e "/dev/stderr");

on line 64 of t/Server.pm.

Sample output of "make test":

  PALIK/Gearman-2.004.007.tar.gz
  /usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-use.t ...................... ok
t/01-object.t ................... ok
t/02-client.t ................... 1/? /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/02-client.t ................... ok
t/03-worker.t ................... 1/? /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
/sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
/sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/03-worker.t ................... 6/? /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/03-worker.t ................... ok
t/04-task.t ..................... "my" variable $v masks earlier declaration in same scope at t/04-task.t line 241.
t/04-task.t ..................... 1/33 Gearman::Task key high_priority is deprecated.
Use priority => "high" instead
Gearman::Task key high_priority is deprecated.
Use priority => "high" instead
t/04-task.t ..................... ok
t/05-taskset.t .................. 1/17 /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
/sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/05-taskset.t .................. ok
t/06-response-parser.t .......... ok
t/07-response-parser-taskset.t .. ok
t/08-jobstatus.t ................ ok
t/09-connect.t .................. skipped: without $ENV{AUTHOR_TESTING}
t/10-job.t ...................... ok
t/11-unit.t ..................... ok
t/12-sum.t ...................... /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/12-sum.t ...................... ok
t/13-fail.t ..................... /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/13-fail.t ..................... ok
t/14-sleep.t .................... /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/14-sleep.t .................... ok
t/15-priority.t ................. /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/15-priority.t ................. 1/? Gearman::Task key high_priority is deprecated.
Use priority => "high" instead
t/15-priority.t ................. ok
t/16-background.t ............... /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/16-background.t ............... ok
t/17-status.t ................... /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/17-status.t ................... ok
t/18-ssl.t ...................... skipped: without $ENV{AUTHOR_TESTING}
t/20-send-work-command.t ........ skipped: without $ENV{AUTHOR_TESTING}
t/25-work-finish-command.t ...... 1/6 /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/25-work-finish-command.t ...... ok
t/40-prefix.t ................... /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/40-prefix.t ................... ok
t/50-wait_timeout.t ............. /sbin/gearmand: Could not open log file "/var/log/gearmand.log", from "/path/to/build/Gearman-2.004.007-t7QIlV", switching to stderr. (Permission denied)
t/50-wait_timeout.t ............. ok
t/65-responseparser.t ........... ok
All tests successful.

Deep recursion on subroutine "Gearman::Util::_read_sock" warning with large task payloads

For very large responses to do_task() (> 100 MB), Perl prints the following warning:

Deep recursion on subroutine "Gearman::Util::_read_sock" at /path/to/Gearman/Util.pm line 224.

This seems harmless enough (the response is completely intact). Based on my googling, this warning is issued when you reach 100 levels of recursion.

Since _read_sock heavily utilizes recursion, I think adding

no warnings 'recursion';

on line 7 of Gearman/Util.pm might be a good idea. It doesn't seem to be possible to turn this warning off elsewhere in one's code. My client code that calls Gearman::* can't turn it off, for example. What do you think?

Allow subclassing of Gearman::Client

I'm an old school object-oriented programmer that still uses inheritance, so I subclassed Gearman::Client to make my own client that provides default settings for my project. Unfortunately, there's a line in Taskset.pm (in both the master and ssl branches) that requires the client object to be a reference to a Gearman::Client object and nothing else.

The fix is rather simple, of course. I changed

ref($client) eq "Gearman::Client"

to

(Scalar::Util::blessed($client) && $client->isa("Gearman::Client"))

Once I made that change in Taskset.pm, my Client subclass worked fine.

There might be other cases of 'ref($object) eq "Gearman::whatever"' in the code, but I am mainly interested in subclassing Gearman::Client.

Gearman::Worker->work ignores some of job servers

simple client/worker implementation:

  • client
use v5.10;
use strict;
use warnings;

use Gearman::Client;
use DateTime;

my @js = (
    {
        host => "localhost",
        port => 4730,
    },
    {
        host => "localhost",
        port => 4731,
    }
);

foreach my $s (@js) {
    my $c = Gearman::Client->new(job_servers => $s);
    my $dt = DateTime->now;
    my $v = join ' ', $dt->dmy, $dt->hms;
    my $h = eval {$c->dispatch_background("morning_bag", $v)};

    say join ' ', $s->{host}, $v, $h || '', $@ ||'';
    sleep(int(rand(1))+1);
}
  • worker
use v5.10;
use strict;
use warnings;

use Gearman::Worker;

my @js = (
    {
        host => "localhost",
        port => 4730,
    },
    {
        host => "localhost",
        port => 4731,
    }
);

my $w = Gearman::Worker->new(job_servers => [@js]);
$w->register_function(
    "morning_bag",
    sub {
        say join ' ', $_[0]->handle, $_[0]->arg || '';
        return 1;
    }
);

$w->work();

worker runs endless. After a while worker does not work on some of the job servers.

missing documentation of Gearman::Task's on_-callbacks

RTFS reveals the number of on_xxx fields is 8, but the manpage covers only 5. Three are missing:

| on_complete   | โœ“ |
| on_data       |   |
| on_fail       | โœ“ |
| on_exception  |   |
| on_warning    | โœ“ |
| on_retry      | โœ“ |
| on_status     | โœ“ |
| on_post_hooks |   |

Fails tests without '.' in @INC

5.25.* with -Ddefault_inc_excludes_dot ( default since 5.25.11 )

PERL_DL_NONLAZY=1 "/home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/bin/perl5.25.10" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/02-client.t line 8.
BEGIN failed--compilation aborted at t/02-client.t line 8.
t/02-client.t ................... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/06-response-parser.t .......... ok
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/05-taskset.t line 7.
BEGIN failed--compilation aborted at t/05-taskset.t line 7.
t/05-taskset.t .................. 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/03-worker.t line 10.
BEGIN failed--compilation aborted at t/03-worker.t line 10.
t/03-worker.t ................... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/08-jobstatus.t ................ ok
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/13-fail.t line 7.
BEGIN failed--compilation aborted at t/13-fail.t line 7.
t/13-fail.t ..................... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/12-sum.t line 10.
BEGIN failed--compilation aborted at t/12-sum.t line 10.
t/12-sum.t ...................... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/10-job.t ...................... ok
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/14-sleep.t line 9.
BEGIN failed--compilation aborted at t/14-sleep.t line 9.
t/14-sleep.t .................... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/07-response-parser-taskset.t .. ok
t/00-use.t ...................... ok
readline() on unopened filehandle GEN0 at /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib/Gearman/Util.pm line 246.
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/50-wait_timeout.t line 9.
BEGIN failed--compilation aborted at t/50-wait_timeout.t line 9.
t/50-wait_timeout.t ............. 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/17-status.t line 7.
BEGIN failed--compilation aborted at t/17-status.t line 7.
t/17-status.t ................... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/15-priority.t line 7.
BEGIN failed--compilation aborted at t/15-priority.t line 7.
t/15-priority.t ................. 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/Worker.pm in @INC (you may need to install the t::Worker module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/18-ssl.t line 6.
BEGIN failed--compilation aborted at t/18-ssl.t line 6.
t/18-ssl.t ...................... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/16-background.t line 7.
BEGIN failed--compilation aborted at t/16-background.t line 7.
t/16-background.t ............... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
Can't locate t/Server.pm in @INC (you may need to install the t::Server module) (@INC contains: /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/lib /home/kent/.cpanm/work/1490341893.3308/Gearman-2.002.004/blib/arch /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/site_perl/5.25.10 /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10/x86_64-linux /home/kent/perl5/perlbrew/perls/5.25.10-nossp-sdbm-nopmc-nodot/lib/5.25.10) at t/40-prefix.t line 9.
BEGIN failed--compilation aborted at t/40-prefix.t line 9.
t/40-prefix.t ................... 
Dubious, test returned 2 (wstat 512, 0x200)
No subtests run 
t/11-unit.t ..................... ok
t/09-connect.t .................. skipped: without $ENV{AUTHOR_TESTING}
t/01-object.t ................... ok
t/04-task.t ..................... ok
t/65-responseparser.t ........... ok

Test Summary Report
-------------------
t/02-client.t                 (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/05-taskset.t                (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/03-worker.t                 (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/13-fail.t                   (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/12-sum.t                    (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/14-sleep.t                  (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/50-wait_timeout.t           (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/17-status.t                 (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/15-priority.t               (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/18-ssl.t                    (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/16-background.t             (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
t/40-prefix.t                 (Wstat: 512 Tests: 0 Failed: 0)
  Non-zero exit status: 2
  Parse errors: No plan found in TAP output
Files=22, Tests=241,  4 wallclock secs ( 0.10 usr  0.05 sys +  2.47 cusr  0.48 csys =  3.10 CPU)
Result: FAIL
Failed 12/22 test programs. 0/241 subtests failed.

Gearman::Client problem with strings flagged as UTF8

I'm not sure if this is a bug or not? What do you think? If it's not a bug, I will close the issue.

I recently modified my Gearman clients to read some configuration information from an XML file using XML::LibXML. Afterward, I started getting the following error in my clients with 2.004.009 whenever I called do_task() with a string based on one of the values I parsed from the XML file:

reading response packet failed: timeout at /path/to/Gearman-2.004.009/blib/lib/Gearman/Client.pm line 354.

If I specified the string in the code instead of parsing the XML file to get the string, Gearman::Client worked just fine. That was very perplexing for a while. Eventually, I compared the two variables using
Devel::Peek and discovered that the string that caused the error had the UTF8 flag set:

$string1 = SV = PVMG(0x1f394e0) at 0x1c99438
  REFCNT = 1
  FLAGS = (PADMY,POK,pPOK,UTF8)
  IV = 0
  NV = 0
  PV = 0x1f58850 "blahblahblah..."\0 [UTF8 "blahblahblah..."]
  CUR = 33
  LEN = 40

Compare that with the string that worked:

$string2 = SV = PVMG(0x1f398d0) at 0x1a902b0
  REFCNT = 1
  FLAGS = (PADMY,GMG,SMG,pPOK)
  IV = 0
  NV = 0
  PV = 0x1eba390 "blahblahblah..."\0
  CUR = 33
  LEN = 40
  MAGIC = 0x19287f0
    MG_VIRTUAL = &PL_vtbl_taint
    MG_TYPE = PERL_MAGIC_taint(t)

I modified my client code to call utf8::downgrade($string1), and everything started working again.

Maybe the documentation for Gearman::Client should mention that it does not work with UTF-8 strings?

The error message I was getting wasn't very useful. Can anything be done about that?

Right before submitting this issue, I googled "IO::Socket::SSL utf8" and found this issue, which may be related:
https://rt.cpan.org/Public/Bug/Display.html?id=98372

Multiple gearman servers and redundancy

Hi

The gearman documentation says on multiple servers:

You are able to run multiple job servers and have the clients and workers connect to the first available job server they are configured with. This way if one job server dies, clients and workers automatically fail over to another job server.

When we experimented with one of many gearman servers to be stopped we experienced broadcasting to be 100 to 200 times slower, compared to all gearman server running.

I would like to ask if this is the expected behavior and/or if there is something additional we could do to improve the situation:

Results

  • client.pl 2 out of 2 servers running
    timethis 500: 1 wallclock secs ( 0.23 usr + 0.04 sys = 0.27 CPU) @ 1851.85/s (n=500)

  • client.pl: 1 out of 2 servers running (1 stopped)
    timethis 500: 247 wallclock secs ( 0.36 usr + 0.07 sys = 0.43 CPU) @ 1162.79/s (n=500) and 50% of tasks are processed

  • client: 3 out of 3 servers running
    timethis 500: 1 wallclock secs ( 0.18 usr + 0.02 sys = 0.20 CPU) @ 2500.00/s (n=500)

  • client: 2 out of 3 servers running (1 stopped)
    timethis 500: 155 wallclock secs ( 0.18 usr + 0.02 sys = 0.20 CPU) @ 2500.00/s (n=500) and 66% of tasks are processed

client.pl

use Benchmark;
use Gearman::Client;
use Data::UUID;
use Storable qw( freeze );
$i = 1;
my $uuid_gen = Data::UUID->new;
timethis (500, \&gearman_client);

sub gearman_client {
  my $client = Gearman::Client->new;
  $client->job_servers(
    { host => '10.30.5.41', port => 4900 },
    { host => '10.30.6.194', port => 4900 },
    { host => '10.30.6.108', port => 4900 }, # comment out for 2 gearman servers setup
  );
  my $serialized = freeze([ 3, 5 ]);
  my $task = Gearman::Task->new(
    'sum',
    \$serialized,
    {
      uniq => $uuid_gen->create_str,
    }
  );
  $client->dispatch_background($task);
  print "Sum of tasks sent $i\n";
  $i++
}

worker.pl

use Gearman::Worker;
use Storable qw( thaw );
use List::Util qw( sum );
$i = 1;
my $worker = Gearman::Worker->new;
$worker->job_servers(
  { host => '10.30.5.41', port => 4900 },
  { host => '10.30.6.194', port => 4900 },
  { host => '10.30.6.108', port => 4900 }, # comment out for 2 gearman servers setup
);
$worker->register_function(
  'sum',
  sub {
    sum @{ thaw($_[0]->arg) };
    print "Sum of tasks received $i\n";
    $i++;
  }
);
$worker->work while 1;

Setup

  • gearman C server: 1.1.18
  • perl client: 2.004.014
  • server compiled with:
wget https://github.com/gearman/gearmand/releases/download/1.1.18/gearmand-1.1.18.tar.gz
./configure --enable-ssl
make
make install
  • on Ubuntu 14.04.5 LTS
  • perl v5.26.2
Summary of my perl5 (revision 5 version 26 subversion 2) configuration:
   
  Platform:
    osname=linux
    osvers=3.13.0-145-generic
    archname=x86_64-linux
    uname='linux ip-10-0-0-112 3.13.0-145-generic #194-ubuntu smp thu apr 5 15:20:44 utc 2018 x86_64 x86_64 x86_64 gnulinux '
    config_args='-de -Dprefix=/opt/perlbrew/perls/perl-5.26.2 -Aeval:scriptdir=/opt/perlbrew/perls/perl-5.26.2/bin'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
    bincompat5005=undef
  Compiler:
    cc='cc'
    ccflags ='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    optimize='-O2'
    cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion=''
    gccversion='4.8.4'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='cc'
    ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.19.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -O2 -L/usr/local/lib -fstack-protector'


Characteristics of this binary (from libperl): 
  Compile-time options:
    HAS_TIMES
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    USE_64_BIT_ALL
    USE_64_BIT_INT
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
  Locally applied patches:
    Devel::PatchPerl 1.48
  Built under linux
  Compiled at May  4 2018 17:12:37
  %ENV:
    PERL5LIB="/a_directory"
  @INC:
    /a_directory
    /opt/perlbrew/perls/perl-5.26.2/lib/site_perl/5.26.2/x86_64-linux
    /opt/perlbrew/perls/perl-5.26.2/lib/site_perl/5.26.2
    /opt/perlbrew/perls/perl-5.26.2/lib/5.26.2/x86_64-linux
    /opt/perlbrew/perls/perl-5.26.2/lib/5.26.2

unreliable tests

  1. t/14-sleep.t
    When I was installing/testing 2.004.001 using 'cpan', t/14-sleep.t hanged
    during either test #4 or #5 ("4/?" was displayed on the screen).... After I
    gave up and hit control-C, I ran the test again, and then it worked.
  2. t/50-wait_timeout.t
    http://www.cpantesters.org/cpan/report/5db73e0c-1589-11e7-807f-f398cc11fead
    #   Failed test 'timeout'
    #   at /home/sand/src/perl/repoperls/installed-perls/host/k93msid/v5.25.3/f11c/lib/site_perl/5.25.3/Test/Timer.pm line 24.
    # Test exceeded specified threshold
    # Looks like you failed 1 test of 10.

#   Failed test 'wait with timeout'
#   at t/50-wait_timeout.t line 65.
# Looks like you failed 1 test of 4.
t/50-wait_timeout.t ............. 

Gearman-Client-Async tests hang since Gearman > 1.130.004

I noticed Gearman-Client-Async-0.94 started to fail tests after upgrading Gearmean from 1.130.004 to 2.002.003 https://rt.cpan.org/Public/Bug/Display.html?id=120306.

I bisected the failure to Gearman's commit:

commit 049bc8fb998759ec0435e2879a456064b9f28170
Author: Alexei Pastuchov <[email protected]>
Date:   Sun Jul 24 18:48:49 2016 +0200

    bug fix: worker provide all parameters to super

Do you have an idea if this is a bug in new Gearman or Gearman-Client-Async uses Gearman in a wrong way?

GEARMAND_ADDR=localhost:4730 prove -l t/16-background.t runs fine in first attempt and fails by next one

It could be an gearmand issue.

$ GEARMAND_ADDR=localhost:4730 prove -l t/16-background.t 
t/16-background.t .. ok   
All tests successful.
Files=1, Tests=3,  2 wallclock secs ( 0.02 usr  0.00 sys +  0.14 cusr  0.01 csys =  0.17 CPU)
Result: PASS
$ GEARMAND_ADDR=localhost:4730 prove -l t/16-background.t 
t/16-background.t .. 1/? 
    #   Failed test 'Job is still running'
    #   at t/16-background.t line 54.

    #   Failed test 'Job is 50 percent complete'
    #   at t/16-background.t line 55.
    #          got: undef
    #     expected: '0.5'
Use of uninitialized value in numeric eq (==) at t/16-background.t line 57.
Use of uninitialized value in numeric eq (==) at t/16-background.t line 57.
    # Looks like you failed 2 tests of 5.
t/16-background.t .. 3/? 
#   Failed test 'dispatch background'
#   at t/16-background.t line 62.
# Looks like you failed 1 test of 3.
t/16-background.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/3 subtests 

Test Summary Report
-------------------
t/16-background.t (Wstat: 256 Tests: 3 Failed: 1)
  Failed test:  3
  Non-zero exit status: 1
Files=1, Tests=3,  6 wallclock secs ( 0.03 usr  0.00 sys +  0.14 cusr  0.01 csys =  0.18 CPU)
Result: FAIL

During second execution of t/16-background.t gearmand logs:

$ ./gearmand/gearmand 
./gearmand/gearmand: Could not open log file "/usr/local/var/log/gearmand.log", from "/opt/devel/Gearman/gearmand", switching to stderr. (No such file or directory)
  ERROR 2018-11-09 17:06:19.000000 [     2 ] realloc(char, count: 18446744073709551615 size: 1) -> libgearman-server/io.cc:823

Gearman-2.004.008 tests report "Unknown option: log-file"

Gearman-2.004.008 added --log-file option to server invocation when running tests. But running the tests against Gearman-Server-1.130.1 results in warnings about an unknown option:

t/01-object.t ................... ok
Unknown option: log-file
t/02-client.t ................... ok
Unknown option: log-file
Unknown option: log-file
Unknown option: log-file
Unknown option: log-file
Unknown option: log-file

add a check for undefined $fd in Gearman::Taskset

Use of uninitialized value $fd in vec at /path/to/build/Gearman-2.001.001-0/blib/lib/Gearman/Taskset.pm line 221.
Use of uninitialized value $fd in hash element at /path/to/build/Gearman-2.001.001-0/blib/lib/Gearman/Taskset.pm line 222.
Use of uninitialized value $fd in vec at /path/to/build/Gearman-2.001.001-0/blib/lib/Gearman/Taskset.pm line 221.
Use of uninitialized value $fd in hash element at /path/to/build/Gearman-2.001.001-0/blib/lib/Gearman/Taskset.pm line 222.

Gearman workers intensively hog CPU while idling (instead of sleeping)

Hi,
the issue has been observed aprox. starting from the middle of Oct 2017 (I assume after update of module on CPAN from 2.004.008->2.004.009).

System info:

[silent@vbox ~]$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)
[silent@vbox ~]$ uname -a
Linux vbox.intra 3.10.0-123.20.1.el7.x86_64 #1 SMP Thu Jan 29 18:05:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@dev_gearman-worker:~]# perl -MGearman::Worker -we 'print($Gearman::Worker::VERSION, $/);'
2.004.009

STR:

  • run perl application that spawns aprox. 10 workers (indeed issue is observed even with 1-2 workers);
  • do not submit any tasks to job server to let workers idle after start;

Observed result:

  • in a matter of 5-10 seconds workers processes bump load averages up to 25-30;
  • all worker porcesses are in running state;
  • workers and job server communicate at very high rate (see strace shots in the attachment)

Expected result:

  • workers should sleep and there should be nearly zero contribution to system load by workers awaiting for a jobs to run;

Workaround:

  • downgrade perl-Gearman to v. 2.004.008

Additional info

  • process list:
  1  [###########################################*******************100.0%]   Tasks: 111, 292 thr; 35 running
  2  [#############################################*****************100.0%]   Load average: 28.94 10.57 5.22 
  3  [#############################################*****************100.0%]   Uptime: 48 days, 10:34:23
  Mem[|||||||||||###******************                         2.08G/13.2G]
  Swp[||                                                       51.6M/3.00G]

  PID USER      PRI  NI  VIRT   RES   SHR S CPU% MEM%   TIME+  Command                                                                                       
14963 unbound    20   0  169M 55300  2424 R  9.9  0.4  0:07.30 perl /opt/selc/script/selc gearman worker start --foreground
14933 unbound    20   0  186M 68068  2612 R  9.3  0.5  0:07.26 perl /opt/selc/script/selc gearman worker start --foreground
14962 unbound    20   0  169M 55304  2424 R  9.3  0.4  0:07.27 perl /opt/selc/script/selc gearman worker start --foreground
14955 unbound    20   0  165M 53324  2352 R  9.3  0.4  0:07.29 perl /opt/selc/script/selc gearman worker start --foreground                                  
14942 unbound    20   0  186M 68092  2616 R  9.3  0.5  0:07.26 perl /opt/selc/script/selc gearman worker start --foreground
14951 unbound    20   0  177M 61668  2544 R  8.6  0.4  0:06.31 perl /opt/selc/script/selc gearman worker start --foreground
14947 unbound    20   0  169M 55224  2420 R  8.6  0.4  0:06.31 perl /opt/selc/script/selc gearman worker start --foreground
14965 unbound    20   0  169M 55304  2424 R  8.6  0.4  0:06.31 perl /opt/selc/script/selc gearman worker start --foreground
14956 unbound    20   0  163M 50548  2292 R  8.6  0.4  0:06.31 perl /opt/selc/script/selc gearman worker start --foreground
14938 unbound    20   0  163M 50440  2272 R  8.6  0.4  0:07.28 perl /opt/selc/script/selc gearman worker start --foreground
14940 unbound    20   0  163M 50440  2272 R  8.6  0.4  0:07.29 perl /opt/selc/script/selc gearman worker start --foreground
14936 unbound    20   0  186M 68080  2616 R  8.6  0.5  0:07.26 perl /opt/selc/script/selc gearman worker start --foreground
14953 unbound    20   0  228M 99380  2680 R  7.9  0.7  0:06.59 perl /opt/selc/script/selc gearman worker start --foreground
14946 unbound    20   0  186M 68096  2616 R  7.9  0.5  0:06.29 perl /opt/selc/script/selc gearman worker start --foreground
14943 unbound    20   0  186M 68088  2616 R  7.9  0.5  0:06.28 perl /opt/selc/script/selc gearman worker start --foreground
14960 unbound    20   0  163M 50552  2296 R  7.9  0.4  0:06.29 perl /opt/selc/script/selc gearman worker start --foreground
14939 unbound    20   0  163M 50440  2272 R  7.9  0.4  0:06.29 perl /opt/selc/script/selc gearman worker start --foreground
14961 unbound    20   0  169M 55300  2424 R  4.6  0.4  0:06.81 perl /opt/selc/script/selc gearman worker start --foreground
14954 unbound    20   0  165M 53324  2352 R  4.6  0.4  0:06.80 perl /opt/selc/script/selc gearman worker start --foreground
14932 unbound    20   0  186M 68072  2612 R  4.6  0.5  0:06.81 perl /opt/selc/script/selc gearman worker start --foreground
14959 unbound    20   0  163M 50548  2292 R  4.6  0.4  0:06.80 perl /opt/selc/script/selc gearman worker start --foreground
14964 unbound    20   0  169M 55304  2424 R  4.6  0.4  0:06.79 perl /opt/selc/script/selc gearman worker start --foreground
14941 unbound    20   0  163M 50448  2280 R  4.6  0.4  0:06.79 perl /opt/selc/script/selc gearman worker start --foreground
14945 unbound    20   0  186M 68096  2616 R  4.6  0.5  0:06.79 perl /opt/selc/script/selc gearman worker start --foreground
14934 unbound    20   0  186M 68080  2616 R  4.6  0.5  0:06.54 perl /opt/selc/script/selc gearman worker start --foreground
14949 unbound    20   0  169M 55224  2420 R  4.6  0.4  0:06.49 perl /opt/selc/script/selc gearman worker start --foreground
14950 unbound    20   0  177M 61660  2544 R  4.6  0.4  0:06.55 perl /opt/selc/script/selc gearman worker start --foreground
14935 unbound    20   0  186M 68068  2612 R  4.0  0.5  0:06.79 perl /opt/selc/script/selc gearman worker start --foreground
14957 unbound    20   0  163M 50548  2292 R  4.0  0.4  0:06.48 perl /opt/selc/script/selc gearman worker start --foreground
14948 unbound    20   0  169M 55224  2420 R  4.0  0.4  0:06.50 perl /opt/selc/script/selc gearman worker start --foreground
14958 unbound    20   0  163M 50552  2296 R  4.0  0.4  0:06.51 perl /opt/selc/script/selc gearman worker start --foreground
14952 unbound    20   0  228M 99380  2680 R  4.0  0.7  0:06.89 perl /opt/selc/script/selc gearman worker start --foreground
14937 unbound    20   0  163M 50448  2280 R  4.0  0.4  0:06.50 perl /opt/selc/script/selc gearman worker start --foreground
14944 unbound    20   0  186M 68080  2612 R  4.0  0.5  0:06.52 perl /opt/selc/script/selc gearman worker start --foreground
14841 root       20   0 79804  2020  1480 S  0.0  0.0  0:00.01 gearman-worker -s /bin/bash - gearmand -c /opt/selc/script/selc gearman worker start --foregro
14860 unbound    20   0  158M 52448  4572 S  0.0  0.4  0:00.66 perl /opt/selc/script/selc gearman worker start --foreground
  • strace of worker process:
Trace of process 14951 - perl /opt/selc/script/selc gearman worker start --foreground                                                                        
strace: Process 14951 attached
select(72, [64], NULL, NULL, {0, 500000}) = 1 (in [64], left {0, 499997})
fcntl(64, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(64, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
select(72, [64], NULL, NULL, NULL)      = 1 (in [64])
read(64, "\0RES\0\0\0\n\0\0\0\0", 12)   = 12
fcntl(64, F_GETFL)                      = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(64, F_SETFL, O_RDWR)              = 0
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7fd8e8f455e0}, {0x49c2c0, [], SA_RESTORER, 0x7fd8e8f455e0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0                                                                                                                 
write(64, "\0REQ\0\0\0\4\0\0\0\0", 12)  = 12
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
rt_sigaction(SIGPIPE, {0x49c2c0, [], SA_RESTORER, 0x7fd8e8f455e0}, {SIG_IGN, [], SA_RESTORER, 0x7fd8e8f455e0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
getpeername(64, {sa_family=AF_INET, sin_port=htons(4730), sin_addr=inet_addr("10.0.0.12")}, [16]) = 0
select(72, NULL, [64], NULL, {10, 0})   = 1 (out [64], left {9, 999855})
getpeername(64, {sa_family=AF_INET, sin_port=htons(4730), sin_addr=inet_addr("10.0.0.12")}, [16]) = 0
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7fd8e8f455e0}, {0x49c2c0, [], SA_RESTORER, 0x7fd8e8f455e0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(64, "\0REQ\0\0\0\t\0\0\0\0", 12)  = 12
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
rt_sigaction(SIGPIPE, {0x49c2c0, [], SA_RESTORER, 0x7fd8e8f455e0}, {SIG_IGN, [], SA_RESTORER, 0x7fd8e8f455e0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(72, [64], NULL, NULL, {0, 500000}) = 1 (in [64], left {0, 499997})
fcntl(64, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(64, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
select(72, [64], NULL, NULL, NULL)      = 1 (in [64])
read(64, "\0RES\0\0\0\n\0\0\0\0", 12)   = 12
fcntl(64, F_GETFL)                      = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(64, F_SETFL, O_RDWR)              = 0
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
rt_sigaction(SIGPIPE, {SIG_IGN, [], SA_RESTORER, 0x7fd8e8f455e0}, {0x49c2c0, [], SA_RESTORER, 0x7fd8e8f455e0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
write(64, "\0REQ\0\0\0\4\0\0\0\0", 12)  = 12
rt_sigprocmask(SIG_BLOCK, [PIPE], [], 8) = 0
rt_sigaction(SIGPIPE, {0x49c2c0, [], SA_RESTORER, 0x7fd8e8f455e0}, {SIG_IGN, [], SA_RESTORER, 0x7fd8e8f455e0}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
getpeername(64, {sa_family=AF_INET, sin_port=htons(4730), sin_addr=inet_addr("10.0.0.12")}, [16]) = 0
F3Search F4Filter F8AutoScroll F9Stop Tracing   EscDone
  • strace of job server process:
Trace of process 7681 - gearmand -u gearmand --verbose INFO --log-file /var/log/selc/gearmand.log --port 4730 --round-robin                                  
strace: Process 7681 attached                                                                                                                                
epoll_wait(13, [{EPOLLIN, {u32=42, u64=42}}], 32, -1) = 1
recvfrom(42, "\0REQ\0\0\0\t\0\0\0\0", 8192, MSG_DONTWAIT, NULL, NULL) = 12
futex(0x7f042d042f84, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7f042d042f80, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7f042d042f58, FUTEX_WAKE_PRIVATE, 1) = 1
recvfrom(42, 0x7f042003e0e8, 8192, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=16, u64=16}}], 32, -1) = 1
read(16, "\4", 256)                     = 1
sendto(42, "\0RES\0\0\0\n\0\0\0\0", 12, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 12
read(16, 0x7f0425666bc0, 256)           = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=34, u64=34}}], 32, -1) = 1
recvfrom(34, "\0REQ\0\0\0\4\0\0\0\0", 8192, MSG_DONTWAIT, NULL, NULL) = 12
recvfrom(34, 0x7f0420020188, 8192, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=66, u64=66}}], 32, -1) = 1
recvfrom(66, "\0REQ\0\0\0\t\0\0\0\0", 8192, MSG_DONTWAIT, NULL, NULL) = 12
futex(0x7f042d042f84, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7f042d042f80, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7f042d042f58, FUTEX_WAKE_PRIVATE, 1) = 1
recvfrom(66, 0x7f0420039b08, 8192, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=16, u64=16}}], 32, -1) = 1
read(16, "\4", 256)                     = 1
sendto(66, "\0RES\0\0\0\n\0\0\0\0", 12, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 12
read(16, 0x7f0425666bc0, 256)           = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=50, u64=50}}], 32, -1) = 1
recvfrom(50, "\0REQ\0\0\0\t\0\0\0\0", 8192, MSG_DONTWAIT, NULL, NULL) = 12
futex(0x7f042d042f84, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7f042d042f80, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7f042d042f58, FUTEX_WAKE_PRIVATE, 1) = 1
recvfrom(50, 0x7f0420002ac8, 8192, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=16, u64=16}}], 32, -1) = 1
read(16, "\4", 256)                     = 1
sendto(50, "\0RES\0\0\0\n\0\0\0\0", 12, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 12
read(16, 0x7f0425666bc0, 256)           = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=62, u64=62}}], 32, -1) = 1
recvfrom(62, "\0REQ\0\0\0\t\0\0\0\0", 8192, MSG_DONTWAIT, NULL, NULL) = 12
futex(0x7f042d042f84, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7f042d042f80, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7f042d042f58, FUTEX_WAKE_PRIVATE, 1) = 1
recvfrom(62, 0x7f0420046df8, 8192, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=16, u64=16}}], 32, -1) = 1
read(16, "\4", 256)                     = 1
sendto(62, "\0RES\0\0\0\n\0\0\0\0", 12, MSG_DONTWAIT|MSG_NOSIGNAL, NULL, 0) = 12
read(16, 0x7f0425666bc0, 256)           = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=54, u64=54}}], 32, -1) = 1
recvfrom(54, "\0REQ\0\0\0\4\0\0\0\0", 8192, MSG_DONTWAIT, NULL, NULL) = 12
futex(0x7f042d042f84, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7f042d042f80, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7f042d042f58, FUTEX_WAKE_PRIVATE, 1) = 1
recvfrom(54, 0x7f04200357a8, 8192, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=58, u64=58}}], 32, -1) = 1
recvfrom(58, "\0REQ\0\0\0\t\0\0\0\0", 8192, MSG_DONTWAIT, NULL, NULL) = 12
futex(0x7f042d042f84, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x7f042d042f80, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x7f042d042f58, FUTEX_WAKE_PRIVATE, 1) = 0
recvfrom(58, 0x7f042002f0d8, 8192, MSG_DONTWAIT, NULL, NULL) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(13, [{EPOLLIN, {u32=16, u64=16}}], 32, -1) = 1
F3Search F4Filter F8AutoScroll F9Stop Tracing   EscDone

taskset tests

add tests process_packet for

  • work_data
  • work_warning

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.