|  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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
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


Add a Patch

Pull Requests

Add a Pull Request


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

 [2000-11-01 11:22 UTC]
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]
Reopen, if this still happens when using latest snapshot

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Dec 03 10:01:41 2021 UTC