Debian Bug report logs - #528600
php5-cli: segfaults if invoked with #!/usr/bin/php5 -f

version graph

Package: php5-cli; Maintainer for php5-cli is (unknown);

Reported by: Niu Kun <haoniukun@gmail.com>

Date: Thu, 14 May 2009 02:30:02 UTC

Severity: minor

Fixed in version 5.3.3-7

Done: Ondřej Surý <ondrej@sury.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Roland Mas <lolando@debian.org>:
Bug#528600; Package gforge. (Thu, 14 May 2009 02:30:04 GMT) (full text, mbox, link).


Acknowledgement sent to Niu Kun <haoniukun@gmail.com>:
New Bug report received and forwarded. Copy sent to Roland Mas <lolando@debian.org>. (Thu, 14 May 2009 02:30:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Niu Kun <haoniukun@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: gforge: massmail.php segfault
Date: Thu, 14 May 2009 10:28:48 +0800
Package: gforge
Version: 4.7.2-7
Severity: important

Hi,
I've got the following message from dmesg command:
[ 2338.290564] massmail.php[13641]: segfault at b5611e20 ip b5611e20 sp bf9081ec error 4 in libnss_files-2.9.so[b561b000+a000]
And a lot of mails are sent to my root user.
Is it a bug caused by gforge?

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/2 CPU cores)
Locale: LANG=zh_CN.UTF-8, LC_CTYPE=zh_CN.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages gforge depends on:
ii  debconf [debconf-2.0]         1.5.26     Debian configuration management sy
ii  gforge-common                 4.7.2-7    collaborative development tool - s
ii  gforge-db-postgresql [gforge- 4.7.2-7    collaborative development tool - d
ii  gforge-ftp-proftpd [gforge-ft 4.7.2-7    collaborative development tool - F
ii  gforge-lists-mailman [gforge- 4.7.2-7    collaborative development tool - m
ii  gforge-mta-exim4 [gforge-mta] 4.7.2-7    collaborative development tool - m
ii  gforge-shell-postgresql [gfor 4.7.2-7    collaborative development tool - s
ii  gforge-web-apache2 [gforge-we 4.7.2-7    collaborative development tool - w
ii  ucf                           3.0018     Update Configuration File: preserv

Versions of packages gforge recommends:
ii  gforge-plugin-scmcvs [gforge- 4.7.2-7    collaborative development tool - C

gforge suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Roland Mas <lolando@debian.org>:
Bug#528600; Package gforge. (Thu, 14 May 2009 02:57:02 GMT) (full text, mbox, link).


Acknowledgement sent to Niu Kun <haoniukun@gmail.com>:
Extra info received and forwarded to list. Copy sent to Roland Mas <lolando@debian.org>. (Thu, 14 May 2009 02:57:02 GMT) (full text, mbox, link).


Message #10 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Niu Kun <haoniukun@gmail.com>
To: 528600@bugs.debian.org
Subject: Part of the segfault email is copied here
Date: Thu, 14 May 2009 10:53:47 +0800
X-Cron-Env: 
<INCLUDE_PATH=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Mail-From: root@niutestlab.com
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on
       shuang.niutestlab.com
X-Spam-Level:
X-Spam-Status: No, score=0.1 required=5.0 tests=AWL,NO_RELAYS autolearn=ham
       version=3.2.5
Subject: Cron <root@shuang> [ -x /usr/lib/gforge/bin/massmail.php ] && 
/usr/lib/gforge/bin/massmail.php -d
       include_path=$INCLUDE_PATH > /dev/null 2>&1
X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000)
X-SA-Exim-Scanned: Yes (on shuang)

/bin/sh: line 1: 20947 Segmentation fault      
/usr/lib/gforge/bin/massmail.php -d include_path=$INCLUDE_PATH > /dev/null
+2>&1





Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#528600; Package gforge. (Thu, 14 May 2009 19:27:07 GMT) (full text, mbox, link).


Acknowledgement sent to Roland Mas <lolando@debian.org>:
Extra info received and forwarded to list. (Thu, 14 May 2009 19:27:07 GMT) (full text, mbox, link).


Message #15 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Roland Mas <lolando@debian.org>
To: Niu Kun <haoniukun@gmail.com>
Cc: 528600@bugs.debian.org
Subject: Re: Bug#528600: gforge: massmail.php segfault
Date: Thu, 14 May 2009 21:25:09 +0200
Niu Kun, 2009-05-14 10:28:48 +0800 :

> Package: gforge
> Version: 4.7.2-7
> Severity: important
>
> Hi,
> I've got the following message from dmesg command:
> [ 2338.290564] massmail.php[13641]: segfault at b5611e20 ip b5611e20 sp bf9081ec error 4 in libnss_files-2.9.so[b561b000+a000]
> And a lot of mails are sent to my root user.
> Is it a bug caused by gforge?

  I don't know.  GForge/FusionForge is purely interpreted PHP, so I'd
suspect the PHP interpreter itself (or maybe .  Could you run the following command
by hand and report the results?  If it works, could you try removing the
"> /dev/null 2>&1" part in /etc/cron.d/gforge-db-postgresql and see if
you get more details in your emails?

,----
| /usr/lib/gforge/bin/massmail.php -d include_path=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
`----

  It could also be related to the libc.  Could you have a look at
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516301 and see if it
rings any bells?

  Thanks,

Roland.
-- 
Roland Mas

Time is a drug.  Too much of it kills you.
  -- in Small Gods (Terry Pratchett)




Information forwarded to debian-bugs-dist@lists.debian.org, Roland Mas <lolando@debian.org>:
Bug#528600; Package gforge. (Fri, 15 May 2009 01:03:02 GMT) (full text, mbox, link).


Acknowledgement sent to Niu Kun <haoniukun@gmail.com>:
Extra info received and forwarded to list. Copy sent to Roland Mas <lolando@debian.org>. (Fri, 15 May 2009 01:03:02 GMT) (full text, mbox, link).


Message #20 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Niu Kun <haoniukun@gmail.com>
To: Roland Mas <lolando@debian.org>
Cc: 528600@bugs.debian.org
Subject: Re: Bug#528600: gforge: massmail.php segfault
Date: Fri, 15 May 2009 08:57:34 +0800
Hi Roland,
Thank you for your reply and your attention to my problem.

I tried the following command line:
/usr/lib/gforge/bin/massmail.php -d 
include_path=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common

But the output is just like this:
Segmentation fault
dmesg output remains the same:
[ 3662.680836] massmail.php[14617]: segfault at b5599e20 ip b5599e20 sp 
bffecbac error 4 in libnss_files-2.9.so[b55a3000+a000]

Roland Mas 写道:
> Niu Kun, 2009-05-14 10:28:48 +0800 :
>
>   
>> Package: gforge
>> Version: 4.7.2-7
>> Severity: important
>>
>> Hi,
>> I've got the following message from dmesg command:
>> [ 2338.290564] massmail.php[13641]: segfault at b5611e20 ip b5611e20 sp bf9081ec error 4 in libnss_files-2.9.so[b561b000+a000]
>> And a lot of mails are sent to my root user.
>> Is it a bug caused by gforge?
>>     
>
>   I don't know.  GForge/FusionForge is purely interpreted PHP, so I'd
> suspect the PHP interpreter itself (or maybe .  Could you run the following command
> by hand and report the results?  If it works, could you try removing the
> "> /dev/null 2>&1" part in /etc/cron.d/gforge-db-postgresql and see if
> you get more details in your emails?
>
> ,----
> | /usr/lib/gforge/bin/massmail.php -d include_path=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
> `----
>
>   It could also be related to the libc.  Could you have a look at
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516301 and see if it
>   
I followed the link. Does it mean that I have to downgrade my libc library?
I find that mine is the latest version and libnss_file is provided by libc.
> rings any bells?
>
>   Thanks,
>
> Roland.
>   
Regards,
Kun




Information forwarded to debian-bugs-dist@lists.debian.org, Roland Mas <lolando@debian.org>:
Bug#528600; Package gforge. (Fri, 15 May 2009 12:30:02 GMT) (full text, mbox, link).


Acknowledgement sent to Niu Kun <haoniukun@gmail.com>:
Extra info received and forwarded to list. Copy sent to Roland Mas <lolando@debian.org>. (Fri, 15 May 2009 12:30:02 GMT) (full text, mbox, link).


Message #25 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Niu Kun <haoniukun@gmail.com>
To: Roland Mas <lolando@debian.org>
Cc: 528600@bugs.debian.org
Subject: Re: Bug#528600: gforge: massmail.php segfault
Date: Fri, 15 May 2009 20:27:39 +0800
Hi Roland,
Funny thing has been detected that the first line of my massmail.php is 
written like this:
#! /usr/bin/php5 -f
When I change the line to "#!/usr/bin/php5 -f", the seg fault remains 
the same.
But when I change the line to "#!/usr/bin/php5" or "#! /usr/bin/php5", 
seg fault disappeared.
Does it mean that this bug is caused by php5?
Thanks for your attention to my problem.

Roland Mas 写道:
> Niu Kun, 2009-05-14 10:28:48 +0800 :
>
>   
>> Package: gforge
>> Version: 4.7.2-7
>> Severity: important
>>
>> Hi,
>> I've got the following message from dmesg command:
>> [ 2338.290564] massmail.php[13641]: segfault at b5611e20 ip b5611e20 sp bf9081ec error 4 in libnss_files-2.9.so[b561b000+a000]
>> And a lot of mails are sent to my root user.
>> Is it a bug caused by gforge?
>>     
>
>   I don't know.  GForge/FusionForge is purely interpreted PHP, so I'd
> suspect the PHP interpreter itself (or maybe .  Could you run the following command
> by hand and report the results?  If it works, could you try removing the
> "> /dev/null 2>&1" part in /etc/cron.d/gforge-db-postgresql and see if
> you get more details in your emails?
>
> ,----
> | /usr/lib/gforge/bin/massmail.php -d include_path=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
> `----
>
>   It could also be related to the libc.  Could you have a look at
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516301 and see if it
> rings any bells?
>
>   Thanks,
>
> Roland.
>   





Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#528600; Package gforge. (Fri, 15 May 2009 13:21:02 GMT) (full text, mbox, link).


Acknowledgement sent to Roland Mas <lolando@debian.org>:
Extra info received and forwarded to list. (Fri, 15 May 2009 13:21:02 GMT) (full text, mbox, link).


Message #30 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Roland Mas <lolando@debian.org>
To: Niu Kun <haoniukun@gmail.com>
Cc: 528600@bugs.debian.org, Roland Mas <lolando@debian.org>, Debian BTS control <control@bugs.debian.org>
Subject: Re: Bug#528600: gforge: massmail.php segfault
Date: Fri, 15 May 2009 15:19:35 +0200
reassign 528600 php5-cli
thanks

Niu Kun, 2009-05-15 08:57:34 +0800 :

> Hi Roland,

Hi again,

> Thank you for your reply and your attention to my problem.
>
> I tried the following command line:
> /usr/lib/gforge/bin/massmail.php -d 
> include_path=/etc/gforge:/usr/share/gforge/:/usr/share/gforge/www:/usr/share/gforge/common
>
> But the output is just like this:
> Segmentation fault
> dmesg output remains the same:
> [ 3662.680836] massmail.php[14617]: segfault at b5599e20 ip b5599e20
> sp bffecbac error 4 in libnss_files-2.9.so[b55a3000+a000]

  I looked around a bit, but I didn't find anything that could be the
root cause of this.  The massmail.php script is rather simple (note for
php5 maintainers: PostgreSQL queries and email sending), so I suspect a
bug in the interpreter or in libc6.  I'm reassigning to php5-cli, its
maintainers should be able to guide you into how to gather the
information they need for further debugging (a backtrace probably).
Feel free to ask for extra information related to that script if needed,
I'll answer as best I can.

Roland.
-- 
Roland Mas

Sauvez les castors, imprimez en recto-verso.




Bug reassigned from package `gforge' to `php5-cli'. Request was from Roland Mas <lolando@debian.org> to control@bugs.debian.org. (Fri, 15 May 2009 13:21:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#528600; Package php5-cli. (Fri, 15 May 2009 13:30:02 GMT) (full text, mbox, link).


Acknowledgement sent to Roland Mas <lolando@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Fri, 15 May 2009 13:30:02 GMT) (full text, mbox, link).


Message #37 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Roland Mas <lolando@debian.org>
To: Niu Kun <haoniukun@gmail.com>
Cc: 528600@bugs.debian.org, Roland Mas <lolando@debian.org>, Debian BTS control <control@bugs.debian.org>
Subject: Re: Bug#528600: gforge: massmail.php segfault
Date: Fri, 15 May 2009 15:27:05 +0200
retitle 528600 php5-cli: segfaults if invoked with #!/usr/bin/php5 -f
thanks

Niu Kun, 2009-05-15 20:27:39 +0800 :

> Hi Roland,
> Funny thing has been detected that the first line of my massmail.php
> is written like this:
> #! /usr/bin/php5 -f
> When I change the line to "#!/usr/bin/php5 -f", the seg fault remains
> the same.
> But when I change the line to "#!/usr/bin/php5" or "#! /usr/bin/php5",
> seg fault disappeared.
> Does it mean that this bug is caused by php5?

Interesting.  I think it could very well be a bug in PHP indeed (and the
bug has been reassigned already).  If it's confirmed, then I'll commit
the workaround (removing the -f) in the gforge packages.  Please keep me
in touch :-)

Roland.
-- 
Roland Mas

  ()    Campagne du ruban ASCII :
  /\    Contre les mails en HTML et les vcard !




Changed Bug title to `php5-cli: segfaults if invoked with #!/usr/bin/php5 -f' from `gforge: massmail.php segfault'. Request was from Roland Mas <lolando@debian.org> to control@bugs.debian.org. (Fri, 15 May 2009 13:30:03 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#528600; Package php5-cli. (Fri, 15 May 2009 14:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to Niu Kun <haoniukun@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Fri, 15 May 2009 14:03:03 GMT) (full text, mbox, link).


Message #44 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Niu Kun <haoniukun@gmail.com>
To: Roland Mas <lolando@debian.org>
Cc: 528600@bugs.debian.org, Debian BTS control <control@bugs.debian.org>
Subject: Re: Bug#528600: gforge: massmail.php segfault
Date: Fri, 15 May 2009 21:58:52 +0800
Thank you for your reply and patient help.:)

Regards,
Kun
Roland Mas 写道:
> retitle 528600 php5-cli: segfaults if invoked with #!/usr/bin/php5 -f
> thanks
>
> Niu Kun, 2009-05-15 20:27:39 +0800 :
>
>   
>> Hi Roland,
>> Funny thing has been detected that the first line of my massmail.php
>> is written like this:
>> #! /usr/bin/php5 -f
>> When I change the line to "#!/usr/bin/php5 -f", the seg fault remains
>> the same.
>> But when I change the line to "#!/usr/bin/php5" or "#! /usr/bin/php5",
>> seg fault disappeared.
>> Does it mean that this bug is caused by php5?
>>     
>
> Interesting.  I think it could very well be a bug in PHP indeed (and the
> bug has been reassigned already).  If it's confirmed, then I'll commit
> the workaround (removing the -f) in the gforge packages.  Please keep me
> in touch :-)
>
> Roland.
>   





Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#528600; Package php5-cli. (Fri, 15 May 2009 16:24:05 GMT) (full text, mbox, link).


Message #47 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Raphael Geissert <atomo64@gmail.com>
To: Roland Mas <lolando@debian.org>, 528600@bugs.debian.org
Cc: Niu Kun <haoniukun@gmail.com>, control@bugs.debian.org
Subject: Re: [php-maint] Bug#528600: gforge: massmail.php segfault
Date: Fri, 15 May 2009 11:22:43 -0500
[Message part 1 (text/plain, inline)]
clone 528600 -1
reassign -1 gforge
retitle -1 gforge: shebangs should not pass an empty -f parameter
severity 528600 minor
thanks

On Friday 15 May 2009 08:27:05 Roland Mas wrote:
> Niu Kun, 2009-05-15 20:27:39 +0800 :
> > Hi Roland,
> > Funny thing has been detected that the first line of my massmail.php
> > is written like this:
> > #! /usr/bin/php5 -f
> > When I change the line to "#!/usr/bin/php5 -f", the seg fault remains
> > the same.
> > But when I change the line to "#!/usr/bin/php5" or "#! /usr/bin/php5",
> > seg fault disappeared.
> > Does it mean that this bug is caused by php5?
>
> Interesting.  I think it could very well be a bug in PHP indeed (and the
> bug has been reassigned already).

It is a bug the fact that it segfaults, but calling php5 with -f but without 
passing it a file name is a bug on your side. The man page specifically says 

php5(1):
> You can parse and execute files by using parameter -f followed by the name
> of the file to be executed. 
[...]
> If  none of -r -f -B -R -F or -E is present but a single parameter is given
> then this parameter is taken as the filename to parse and execute (same as
> with -f). If no parameter is  present  then  the  standard input is read and
> executed. 

So am cloning the report and assigning the copy back to gforge.

I've tried to but failed at reproducing the bug with a simple script. So, Niu, 
could you please install the php5-dbg package and run the following commands?

$ cat > test.php <<'FOO'
#!/usr/bin/php5 -f
<?php
echo "hello world\n";
?>
FOO
$ chmod +x test.php
$ ./test.php

And see if it segfaults? if it does, then please run:

$ ulimit -c unlimited
$ ./test.php
$ gdb -c core
(gdb) bt
<attach in your reply what is displayed here>
(gdb) q

If it doesn't segfault then please repeat the same steps but instead of 
running the test script run the massmail.php script as you did before.

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net
[signature.asc (application/pgp-signature, inline)]

Bug 528600 cloned as bug 528792. Request was from Raphael Geissert <atomo64@gmail.com> to control@bugs.debian.org. (Fri, 15 May 2009 16:24:05 GMT) (full text, mbox, link).


Severity set to `minor' from `important' Request was from Raphael Geissert <atomo64@gmail.com> to control@bugs.debian.org. (Fri, 15 May 2009 16:24:09 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#528600; Package php5-cli. (Fri, 15 May 2009 16:33:02 GMT) (full text, mbox, link).


Acknowledgement sent to Niu Kun <haoniukun@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Fri, 15 May 2009 16:33:02 GMT) (full text, mbox, link).


Message #56 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Niu Kun <haoniukun@gmail.com>
To: Raphael Geissert <atomo64@gmail.com>
Cc: Roland Mas <lolando@debian.org>, 528600@bugs.debian.org, control@bugs.debian.org
Subject: Re: [php-maint] Bug#528600: gforge: massmail.php segfault
Date: Sat, 16 May 2009 00:30:23 +0800
Hi Raphael,
Thank you for your reply.
But I failed to get a php5-dbg package on my system.
Here's my sources.list file
deb http://mirrors.kernel.org/debian/ testing main non-free contrib
deb-src http://mirrors.kernel.org/debian testing main non-free contrib
#deb http://www.emdebian.org/debian/ testing main
#deb-src http://www.emdebian.org/debian/ testing main
deb http://www.symfony-project.org/get debian/

#deb http://download.videolan.org/pub/videolan/debian sid main
deb http://oss.oracle.com/debian unstable main non-free

And I've run test.php file.
It works fine on my system.
Do you have any other hints?
Thanks again for your attention to my problem.

Regards,
Kun
Raphael Geissert 写道:
> clone 528600 -1
> reassign -1 gforge
> retitle -1 gforge: shebangs should not pass an empty -f parameter
> severity 528600 minor
> thanks
>
> On Friday 15 May 2009 08:27:05 Roland Mas wrote:
>   
>> Niu Kun, 2009-05-15 20:27:39 +0800 :
>>     
>>> Hi Roland,
>>> Funny thing has been detected that the first line of my massmail.php
>>> is written like this:
>>> #! /usr/bin/php5 -f
>>> When I change the line to "#!/usr/bin/php5 -f", the seg fault remains
>>> the same.
>>> But when I change the line to "#!/usr/bin/php5" or "#! /usr/bin/php5",
>>> seg fault disappeared.
>>> Does it mean that this bug is caused by php5?
>>>       
>> Interesting.  I think it could very well be a bug in PHP indeed (and the
>> bug has been reassigned already).
>>     
>
> It is a bug the fact that it segfaults, but calling php5 with -f but without 
> passing it a file name is a bug on your side. The man page specifically says 
>
> php5(1):
>   
>> You can parse and execute files by using parameter -f followed by the name
>> of the file to be executed. 
>>     
> [...]
>   
>> If  none of -r -f -B -R -F or -E is present but a single parameter is given
>> then this parameter is taken as the filename to parse and execute (same as
>> with -f). If no parameter is  present  then  the  standard input is read and
>> executed. 
>>     
>
> So am cloning the report and assigning the copy back to gforge.
>
> I've tried to but failed at reproducing the bug with a simple script. So, Niu, 
> could you please install the php5-dbg package and run the following commands?
>
> $ cat > test.php <<'FOO'
> #!/usr/bin/php5 -f
> <?php
> echo "hello world\n";
> ?>
> FOO
> $ chmod +x test.php
> $ ./test.php
>
> And see if it segfaults? if it does, then please run:
>
> $ ulimit -c unlimited
> $ ./test.php
> $ gdb -c core
> (gdb) bt
> <attach in your reply what is displayed here>
> (gdb) q
>
> If it doesn't segfault then please repeat the same steps but instead of 
> running the test script run the massmail.php script as you did before.
>
> Cheers,
>   





Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#528600; Package php5-cli. (Fri, 15 May 2009 17:45:03 GMT) (full text, mbox, link).


Message #59 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Raphael Geissert <atomo64@gmail.com>
To: Niu Kun <haoniukun@gmail.com>
Cc: 528600@bugs.debian.org
Subject: Re: [php-maint] Bug#528600: gforge: massmail.php segfault
Date: Fri, 15 May 2009 12:26:23 -0500
On Friday 15 May 2009 11:30:23 Niu Kun wrote:
> Hi Raphael,
> Thank you for your reply.
> But I failed to get a php5-dbg package on my system.

Could you please attach apt/aptitude's output?

> Here's my sources.list file
> deb http://mirrors.kernel.org/debian/ testing main non-free contrib

http://mirrors.kernel.org/debian/pool/main/p/php5/:
php5-dbg_5.2.6.dfsg.1-3_i386.deb
or
php5-dbg_5.2.9.dfsg.1-2_i386.deb

Depends on what version you have installed.

>
> And I've run test.php file.
> It works fine on my system.
> Do you have any other hints?

The please run massmail.php like you did before in
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=528600#20
But don't forget to run the other commands (ulimit, gdb, etc.)

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#528600; Package php5-cli. (Sat, 16 May 2009 06:12:02 GMT) (full text, mbox, link).


Message #62 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Raphael Geissert <atomo64@gmail.com>
To: Niu Kun <haoniukun@gmail.com>
Cc: 528600@bugs.debian.org
Subject: Re: [php-maint] Bug#528600: gforge: massmail.php segfault
Date: Sat, 16 May 2009 01:11:23 -0500
Hi,

Please keep the @bugs.d.o address in your replies.

On Saturday 16 May 2009 01:02:34 Niu Kun wrote:
[...]
> shuang:/usr/lib/gforge/bin# gdb -c core

Oops, I forgot something. Run it as
$ gdb -c core /usr/bin/php5

(note that the path to the php5 binary is now specified)

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#528600; Package php5-cli. (Sat, 16 May 2009 06:18:02 GMT) (full text, mbox, link).


Acknowledgement sent to Niu Kun <haoniukun@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Sat, 16 May 2009 06:18:02 GMT) (full text, mbox, link).


Message #67 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Niu Kun <haoniukun@gmail.com>
To: Raphael Geissert <atomo64@gmail.com>
Cc: 528600@bugs.debian.org
Subject: Re: [php-maint] Bug#528600: gforge: massmail.php segfault
Date: Sat, 16 May 2009 14:14:38 +0800
Raphael Geissert 写道:
> Hi,
>
> Please keep the @bugs.d.o address in your replies.
>
> On Saturday 16 May 2009 01:02:34 Niu Kun wrote:
> [...]
>   
>> shuang:/usr/lib/gforge/bin# gdb -c core
>>     
>
> Oops, I forgot something. Run it as
> $ gdb -c core /usr/bin/php5
>
> (note that the path to the php5 binary is now specified)
>
> Cheers,
>   
I'm sorry for the inconvenience I caused.
Here's my output:
shuang:/usr/lib/gforge/bin# gdb -c core /usr/bin/php5
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...

warning: core file may not match specified executable file.

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/i686/cmov/libcrypt.so.1...done.
Loaded symbols for /lib/i686/cmov/libcrypt.so.1
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libpanel.so.5...done.
Loaded symbols for /usr/lib/libpanel.so.5
Reading symbols from /lib/libncurses.so.5...done.
Loaded symbols for /lib/libncurses.so.5
Reading symbols from /usr/lib/i686/cmov/libssl.so.0.9.8...done.
Loaded symbols for /usr/lib/i686/cmov/libssl.so.0.9.8
Reading symbols from /usr/lib/libdb-4.7.so...done.
Loaded symbols for /usr/lib/libdb-4.7.so
Reading symbols from /lib/libbz2.so.1.0...done.
Loaded symbols for /lib/libbz2.so.1.0
Reading symbols from /usr/lib/libpcre.so.3...done.
Loaded symbols for /usr/lib/libpcre.so.3
Reading symbols from /lib/i686/cmov/libresolv.so.2...done.
Loaded symbols for /lib/i686/cmov/libresolv.so.2
Reading symbols from /lib/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/i686/cmov/libm.so.6
Reading symbols from /lib/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/i686/cmov/libdl.so.2
Reading symbols from /lib/i686/cmov/libnsl.so.1...done.
Loaded symbols for /lib/i686/cmov/libnsl.so.1
Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /usr/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /lib/libcom_err.so.2...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/libxml2.so.2...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /lib/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/i686/cmov/libc.so.6
Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.8...done.
Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.8
Reading symbols from /lib/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/i686/cmov/libpthread.so.0
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/libkrb5support.so.0...done.
Loaded symbols for /usr/lib/libkrb5support.so.0
Reading symbols from /lib/libkeyutils.so.1...done.
Loaded symbols for /lib/libkeyutils.so.1
Reading symbols from /usr/lib/php5/20060613+lfs/xdebug.so...done.
Loaded symbols for /usr/lib/php5/20060613+lfs/xdebug.so
Reading symbols from /usr/lib/php5/20060613+lfs/IcePHP.so...done.
Loaded symbols for /usr/lib/php5/20060613+lfs/IcePHP.so
Reading symbols from /usr/lib/libIce.so.33...done.
Loaded symbols for /usr/lib/libIce.so.33
Reading symbols from /usr/lib/libSlice.so.33...done.
Loaded symbols for /usr/lib/libSlice.so.33
Reading symbols from /usr/lib/libIceUtil.so.33...done.
Loaded symbols for /usr/lib/libIceUtil.so.33
Reading symbols from /lib/i686/cmov/librt.so.1...done.
Loaded symbols for /lib/i686/cmov/librt.so.1
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /usr/lib/libmcpp.so.0...done.
Loaded symbols for /usr/lib/libmcpp.so.0
Reading symbols from /usr/lib/php5/20060613+lfs/adodb.so...done.
Loaded symbols for /usr/lib/php5/20060613+lfs/adodb.so
Reading symbols from /usr/lib/php5/20060613+lfs/curl.so...Reading 
symbols from /usr/lib/debug/usr/lib/php5/20060613+lfs/curl.so...done.
done.
Loaded symbols for /usr/lib/php5/20060613+lfs/curl.so
Reading symbols from /usr/lib/libcurl.so.4...done.
Loaded symbols for /usr/lib/libcurl.so.4
Reading symbols from /usr/lib/libidn.so.11...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /usr/lib/libssh2.so.1...done.
Loaded symbols for /usr/lib/libssh2.so.1
Reading symbols from /usr/lib/liblber-2.4.so.2...done.
Loaded symbols for /usr/lib/liblber-2.4.so.2
Reading symbols from /usr/lib/libldap_r-2.4.so.2...done.
Loaded symbols for /usr/lib/libldap_r-2.4.so.2
Reading symbols from /usr/lib/libgcrypt.so.11...done.
Loaded symbols for /usr/lib/libgcrypt.so.11
Reading symbols from /usr/lib/libsasl2.so.2...done.
Loaded symbols for /usr/lib/libsasl2.so.2
Reading symbols from /usr/lib/libgnutls.so.26...done.
Loaded symbols for /usr/lib/libgnutls.so.26
Reading symbols from /usr/lib/libgpg-error.so.0...done.
Loaded symbols for /usr/lib/libgpg-error.so.0
Reading symbols from /usr/lib/libtasn1.so.3...done.
Loaded symbols for /usr/lib/libtasn1.so.3
Reading symbols from /usr/lib/libnss_db.so.2...done.
Loaded symbols for /usr/lib/libnss_db.so.2
Reading symbols from /lib/i686/cmov/libnss_files.so.2...done.
Loaded symbols for /lib/i686/cmov/libnss_files.so.2
Reading symbols from /usr/lib/libdb-4.6.so...done.
Loaded symbols for /usr/lib/libdb-4.6.so
Reading symbols from /lib/i686/cmov/libnss_compat.so.2...done.
Loaded symbols for /lib/i686/cmov/libnss_compat.so.2
Reading symbols from /lib/i686/cmov/libnss_nis.so.2...done.
Loaded symbols for /lib/i686/cmov/libnss_nis.so.2
Core was generated by `/usr/bin/php5 -f /usr/lib/gforge/bin/massmail.php 
-d include_path=/etc/gforge:/'.
Program terminated with signal 11, Segmentation fault.
[New process 3013]
#0  0xb5473e20 in ?? ()
(gdb)

Will this be useful to you?
Thanks again for your attention.

Regards,
Kun




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#528600; Package php5-cli. (Mon, 18 May 2009 20:36:02 GMT) (full text, mbox, link).


Message #70 received at 528600@bugs.debian.org (full text, mbox, reply):

From: Raphael Geissert <atomo64@gmail.com>
To: Niu Kun <haoniukun@gmail.com>, 528600@bugs.debian.org
Subject: Re: [php-maint] Bug#528600: Bug#528600: gforge: massmail.php segfault
Date: Mon, 18 May 2009 09:30:25 -0500
Hi,

Please also install the libc6-dbg package.

On Saturday 16 May 2009 01:14:38 Niu Kun wrote:
> shuang:/usr/lib/gforge/bin# gdb -c core /usr/bin/php5
[...]
> Core was generated by `/usr/bin/php5 -f /usr/lib/gforge/bin/massmail.php
> -d include_path=/etc/gforge:/'.
> Program terminated with signal 11, Segmentation fault.
> [New process 3013]
> #0  0xb5473e20 in ?? ()
> (gdb)

and here don't forget to run the 'bt' command inside gdb, which will print the 
full backtrace.

Thanks.

Cheers,
-- 
Raphael Geissert - Debian Maintainer
www.debian.org - get.debian.net




Reply sent to Ondřej Surý <ondrej@sury.org>:
You have taken responsibility. (Wed, 27 Apr 2011 08:33:42 GMT) (full text, mbox, link).


Notification sent to Niu Kun <haoniukun@gmail.com>:
Bug acknowledged by developer. (Wed, 27 Apr 2011 08:33:43 GMT) (full text, mbox, link).


Message #75 received at 528600-done@bugs.debian.org (full text, mbox, reply):

From: Ondřej Surý <ondrej@sury.org>
To: 465081-done@bugs.debian.org, 537794-done@bugs.debian.org, 553048-done@bugs.debian.org, 574610-done@bugs.debian.org, 584885-done@bugs.debian.org, 584957-done@bugs.debian.org, 594613-done@bugs.debian.org, 493045-done@bugs.debian.org, 549492-done@bugs.debian.org, 450581-done@bugs.debian.org, 502174-done@bugs.debian.org, 543177-done@bugs.debian.org, 547134-done@bugs.debian.org, 552089-done@bugs.debian.org, 556523-done@bugs.debian.org, 559273-done@bugs.debian.org, 576147-done@bugs.debian.org, 578754-done@bugs.debian.org, 601602-done@bugs.debian.org, 609355-done@bugs.debian.org, 419649-done@bugs.debian.org, 442063-done@bugs.debian.org, 500567-done@bugs.debian.org, 513429-done@bugs.debian.org, 528600-done@bugs.debian.org, 597650-done@bugs.debian.org, 603641-done@bugs.debian.org, 405067-done@bugs.debian.org, 430397-done@bugs.debian.org, 440775-done@bugs.debian.org, 591759-done@bugs.debian.org, 565387-done@bugs.debian.org, 507762-done@bugs.debian.org, 529278-done@bugs.debian.org, 556459-done@bugs.debian.org
Subject: Closing segfaults (and some other minor bugs) for version older than squeeze (5.3.3)
Date: Wed, 27 Apr 2011 10:28:24 +0200
Version: 5.3.3-7

Hi,

since lenny is oldstable it will not get any updates now (except
security)[1], I am closing all segfault bugs filled against php5 in
lenny. (This is kind of saying that we don't care much about php5 in
lenny anymore).

If you believe the bug is still there, please provide evidence[2] and
a (preferably complete) test case with up-to-date squeeze (and/or
testing or unstable) version of php5 and reopen the bug.

O.
1. http://wiki.debian.org/PHP#Notes_on_PHP_and_security
2. Install php5-dbg and provide backtrace:
http://bugs.php.net/bugs-generating-backtrace.php
-- 
Ondřej Surý <ondrej@sury.org>




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 26 May 2011 07:30:58 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 01:11:50 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.