Public bug reported:

I reproduced this problem on 2 very different computers.
Running this simple php script makes apache to seg fault :
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://google.fr');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,15);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,30);
echo(curl_exec($ch));
curl_close($ch);

Here is the trace I get :
fstat(48, {st_mode=S_IFREG|0664, st_size=418, ...}) = 0
fstat(48, {st_mode=S_IFREG|0664, st_size=418, ...}) = 0
fstat(48, {st_mode=S_IFREG|0664, st_size=418, ...}) = 0
fstat(48, {st_mode=S_IFREG|0664, st_size=418, ...}) = 0
mmap(NULL, 418, PROT_READ, MAP_SHARED, 48, 0) = 0x7fdac3b1f000
munmap(0x7fdac3b1f000, 418)             = 0
close(48)                               = 0
stat("/tmp/cachegrind.out.6982", 0x7fffe57b85d0) = -1 ENOENT (No such file or 
directory)
open("/tmp/cachegrind.out.6982", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 48
flock(48, LOCK_EX|LOCK_NB)              = 0
fstat(48, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fdac3b1f000
write(48, "version: 1\ncreator: xdebug 2.1.2"..., 115) = 115
write(48, "fl=php:internal\nfn=php::curl_ini"..., 34) = 34
write(48, "10 40\n\n", 7)               = 7
write(48, "fl=php:internal\nfn=php::curl_set"..., 36) = 36
write(48, "11 5\n\n", 6)                = 6
write(48, "fl=php:internal\nfn=php::curl_set"..., 36) = 36
write(48, "12 0\n\n", 6)                = 6
write(48, "fl=php:internal\nfn=php::curl_set"..., 36) = 36
write(48, "13 0\n\n", 6)                = 6
write(48, "fl=php:internal\nfn=php::curl_set"..., 36) = 36
write(48, "14 0\n\n", 6)                = 6
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
chdir("/*****/apache2-gdb-dump/")         = 0
rt_sigaction(SIGSEGV, {SIG_DFL, [], SA_RESTORER|SA_INTERRUPT, 0x7fdac917f060}, 
{SIG_DFL, [], SA_RESTORER|SA_RESETHAND, 0x7fdac917f060}, 8) = 0
kill(6982, SIGSEGV)                     = 0
rt_sigreturn(0x1b46)                    = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---

Here are binary versions
Ubuntu 11.10
PHP 5.3.6-13ubuntu3.2 with Suhosin-Patch (cli) (built: Oct 13 2011 23:09:42)
Server version: Apache/2.2.20 (Ubuntu)
curl 7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 
libidn/1.22 librtmp/2.3

Regards
Laurent

EDIT : forgot to mention, same script works just fine launched in cli.

** Affects: curl (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  I reproduced this problem on 2 very different computers.
  Running this simple php script makes apache to seg fault :
  <?php
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'http://google.fr');
  curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,15);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_TIMEOUT,30);
  echo(curl_exec($ch));
  curl_close($ch);
  
  Here is the trace I get :
  fstat(48, {st_mode=S_IFREG|0664, st_size=418, ...}) = 0
  fstat(48, {st_mode=S_IFREG|0664, st_size=418, ...}) = 0
  fstat(48, {st_mode=S_IFREG|0664, st_size=418, ...}) = 0
  fstat(48, {st_mode=S_IFREG|0664, st_size=418, ...}) = 0
  mmap(NULL, 418, PROT_READ, MAP_SHARED, 48, 0) = 0x7fdac3b1f000
  munmap(0x7fdac3b1f000, 418)             = 0
  close(48)                               = 0
  stat("/tmp/cachegrind.out.6982", 0x7fffe57b85d0) = -1 ENOENT (No such file or 
directory)
  open("/tmp/cachegrind.out.6982", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 48
  flock(48, LOCK_EX|LOCK_NB)              = 0
  fstat(48, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x7fdac3b1f000
  write(48, "version: 1\ncreator: xdebug 2.1.2"..., 115) = 115
  write(48, "fl=php:internal\nfn=php::curl_ini"..., 34) = 34
  write(48, "10 40\n\n", 7)               = 7
  write(48, "fl=php:internal\nfn=php::curl_set"..., 36) = 36
  write(48, "11 5\n\n", 6)                = 6
  write(48, "fl=php:internal\nfn=php::curl_set"..., 36) = 36
  write(48, "12 0\n\n", 6)                = 6
  write(48, "fl=php:internal\nfn=php::curl_set"..., 36) = 36
  write(48, "13 0\n\n", 6)                = 6
  write(48, "fl=php:internal\nfn=php::curl_set"..., 36) = 36
  write(48, "14 0\n\n", 6)                = 6
  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
  chdir("/*****/apache2-gdb-dump/")         = 0
  rt_sigaction(SIGSEGV, {SIG_DFL, [], SA_RESTORER|SA_INTERRUPT, 
0x7fdac917f060}, {SIG_DFL, [], SA_RESTORER|SA_RESETHAND, 0x7fdac917f060}, 8) = 0
  kill(6982, SIGSEGV)                     = 0
  rt_sigreturn(0x1b46)                    = 0
  --- SIGSEGV (Segmentation fault) @ 0 (0) ---
  
  Here are binary versions
  Ubuntu 11.10
  PHP 5.3.6-13ubuntu3.2 with Suhosin-Patch (cli) (built: Oct 13 2011 23:09:42)
  Server version: Apache/2.2.20 (Ubuntu)
  curl 7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 
libidn/1.22 librtmp/2.3
  
  Regards
  Laurent
+ 
+ EDIT : forgot to mention, same script works just fine launched in cli.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/880756

Title:
  Segmentation fault using curl_exec (php5, apache2)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/curl/+bug/880756/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to