nicolasff/phpredis — Issue #132: Segfault using blPop after sleep'ing
Author: ihsw
Created: 2012-02-09 00:13:54+00:00
State: open

Example code:

while(true)
{
$this->writeln("Waiting for new realms:todo messages...");

// blocking for a new message
$message = $redis->blPop(array("realm_ids:downloaded"), 0);

// parsing the message
$listName = $message[0];
$realmId = $message[1];

do_stuff($realmId);

$redis->rPush("realm_ids:downloaded", $realmId);

sleep(600);
}

The first iteration completes successfully, but the second one segfaults.

Here is the output after segfaulting:

/opt/phpfarm/src/php-5.3.8/main/streams/streams.c(438) : Stream of type 'tcp_socket' 0x1b57c90 (path:(null)) was not closed
Segmentation fault