php5-ps segmentation fault on ps_setfont (64bit)

Bug #1024207 reported by Tom Kaminski
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-ps (Debian)
Fix Released
Unknown
php-ps (Ubuntu)
Fix Released
Critical
sahana

Bug Description

php5-ps doesn't work on amd64 based systems. It will throw a segmentation fault at the ps_setfont() function. I was able to reproduce on two separate amd64 machines, including directly from a live CD. From a live CD, here are the steps to reproduce:

1. Add universe to apt-get sources.list
2. apt-get update
3. apt-get install php5 php5-ps
4. Run command: php ps.php (where ps.php is the attached sample program)

- When I compiled and ran the example libps C programs, there were no problems with the same set of functions.
- When I booted with a 32bit live CD (12.04), the above steps worked fine. No segmentation fault.
- I recompiled the module using "pecl install ps", and it still seg faulted on 64bit.

Extra Info:
php5-ps: Installed: 1.3.6-6
Ubuntu 12.04 LTS 64bit

Revision history for this message
Tom Kaminski (ttkaminski) wrote :
description: updated
Revision history for this message
Tom Kaminski (ttkaminski) wrote :

Found this: https://bugs.php.net/bug.php?id=58211

Which gave me enough information on what needed to be changed in the rest of the code to make it all work. Attached is a complete patch to make the php ps module 64 bit compatible.

Briefly tested. At least it doesn't seg fault anymore.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for php5-ps to make it 64bit compatible" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Confirmed on raring:

# php ps.php
start
pre-setfont
Segmentation fault (core dumped)

Changed in php-ps (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
Changed in php-ps (Ubuntu):
status: Confirmed → Triaged
Changed in php-ps (Debian):
status: Unknown → Confirmed
Changed in php-ps (Debian):
status: Confirmed → Fix Released
Revision history for this message
Ray Still (ray-stilltech) wrote :

I have the same problem, and I'm happy to see that a fix has been released by Debian, but will this fix be released on either the PECL package page or through the Ubuntu repositories?

Anders (eddiedog988)
Changed in php-ps (Ubuntu):
status: Triaged → Confirmed
nathan (nathan95-b)
Changed in php-ps (Ubuntu):
assignee: nobody → nathan (nathan95-b)
status: Confirmed → In Progress
nathan (nathan95-b)
Changed in php-ps (Ubuntu):
status: In Progress → New
assignee: nathan (nathan95-b) → nobody
Revision history for this message
James (jamesd009) wrote :
sahana (smriti1234)
Changed in php-ps (Ubuntu):
assignee: nobody → sahana (smriti1234)
Changed in php-ps (Ubuntu):
status: New → Confirmed
Revision history for this message
Simon Quigley (tsimonq2) wrote :

This seems to have been fixed in all supported releases.

Changed in php-ps (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.