php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6528 shared memory foult
Submitted: 2000-09-04 07:41 UTC Modified: 2000-12-07 11:36 UTC
From: sozzi at netw dot it Assigned:
Status: Closed Package: Semaphore related
PHP Version: 4.0.1pl2 OS: linux 2.2.16-3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sozzi at netw dot it
New email:
PHP Version: OS:

 

 [2000-09-04 07:41 UTC] sozzi at netw dot it
Shared memory managed with standard php calls (shm_attach(), shm_get_var() etc. ) gets corrupted after some hours after initialization.

On the same system shared memory managed with standard C calls from linux library is stable.

Configure line is:

configure --with-mysql --with-apache=../apache_1.3.12 --enable-track-vars --enable-sysvsh

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-01 11:03 UTC] sniper@php.net
Have you tried PHP4.0.3pl1? 
Does this problem exist with it?

--Jani
 [2000-11-01 11:22 UTC] derick@php.net
I forwarded this bugreport to the creators of this extension.

 [2000-11-02 04:07 UTC] sozzi at netw dot it
> Have you tried PHP4.0.3pl1?
> Does this problem exist with it?

No, I actually didn't: however we are going to upgrade to PHP4.0.3pl1 soon.

I analyzed the problem in a more serious way and found the cause in allocation of arrays. I place an array (lets's say of n integers) in shared memory ... after an impredictable amount if time (from some hours to a couple of days) the function shm_get_var() gives a warning about "not
enought shared memory".

Function sizeof() shows that the array seems to contain more than n elements ... lets's say m ... where m * sizeof int is greater than memory allocated.

The first n-elements readed by shm_get_var() however are the right ones.

I perform about 1 access for second , where every operation is protected by semaphores.

Thanks for attention

-- andrea

 [2000-12-07 11:36 UTC] sniper@php.net
Reopen, if this still happens when using latest snapshot
from http://snaps.php.net/

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 05:01:30 2024 UTC