Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.4.0

Bug #5186 IPC Share memory segments stay resident
Submitted: 2005-08-23 15:05 UTC
From: leandro at cnts dot com dot br Assigned:
Status: Open Package: PHP_Fork
PHP Version: 4.3.11 OS: Linux Slackware 9.1.0
Roadmaps: (Not assigned)    
Subscription  


 [2005-08-23 15:05 UTC] leandro at cnts dot com dot br
Description: ------------ When you create a lot of new processes (and stoping them) using the class php_fork.php (version 1.1), a lot of shared memory segments stays active. If you execute the comand "ipcs" on the shell, you will see them. It keeps creating them (for process inter-communication) indefinetely. So that it reaches the shared memory limit and no other proccess can create any shared segments anymore. i had to manually clear them using ipcrm to continue using the system without the need of reboot. I ended up removing the code for process communication, to use it sucessfully. (sorry for the poor english =)

Comments

 [2007-04-08 09:21 UTC] wehatespam (Dave Grummer)
Using PHP_Fork v1.0 in this package, PHP_Fork-0.3.0 . Will use example file, simple_controller.php to show how to reproduce this issue. * Start ten threads (lets make this slightly interesting hmmmm). instead of two threads. Change define ("NUM_THREAD", 2); -> define ("NUM_THREAD", 10); * Run simple_controller.php * kill one of the threads (in this example killed the first thread) * type T to view the number of seconds each thread has been running. Notice the we can not get the number of seconds the respawned thread has been running because the shared memory isn't working for the respawned thread. Here is the error message: idx0 actual elasped time 43 idx1 actual elasped time 43 idx2 actual elasped time 43 idx3 actual elasped time 43 idx4 actual elasped time 43 idx5 actual elasped time 43 idx6 actual elasped time 43 idx7 actual elasped time 43 idx8 actual elasped time 43 Warning: shmop_size(): no shared memory segment with an id of [27] in /opt/lampp/htdocs/cli/inc/PHP/Fork.php on line 630 Warning: shmop_read(): no shared memory segment with an id of [27] in /opt/lampp/htdocs/cli/inc/PHP/Fork.php on line 630 Fatal exception reading SHM segment (shmop_read) idx9 actual elasped time Hey no elapsed time printed for the respawned thread. Meaning respawned threads interprocess communication does not work. So if a thread hangs, the controller won't be able to restart it because the controller does not know how long the thread has been running. Please get back to me if there is a solution to this issue.