Skip Menu |

This queue is for tickets about the Proc-ProcessTable CPAN distribution.

Report information
The Basics
Id: 1683
Status: resolved
Priority: 0/
Queue: Proc-ProcessTable

People
Owner: Nobody in particular
Requestors: likong [...] email.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.35
Fixed in: (no value)



Subject: running ProcessTable in multi-thread environment
Environment: 1. ProcessTable 0.35 2. Solaris 2.6, sun4u, sparc10 3. perl 5.6.1 sun4-solaris-thread-multi. I am trying to use the Proc::ProcessTable module in a multi-threaded environemnt where each thread has one perl engine, and each perl engine executes a scipt which may access to Proc::ProcessTable module. (The perl engine is built with ithread and threads.) 1. readdir() in Solaris.c should be changed to readdir_r for multi-threaded apps (at least for Solaris). 2. From time to time, I got the following messages from stderr. The frequency of the 1st msg is much higher than that of the 2nd msg. Attempt to free non-existent shared string at (eval 4) line 60. Attempt to free non-existent shared string at /usr/netiq/UnixAgent/lib/perl5/site_perl/5.6.1/sun4-solaris-thread-multi/Proc/ProcessTable.pm line 118. Line 60 in ProcessTable.pm is $self->p{cache_ttys} = 1 in new(), and line 118 in ProcessTable.pm is undef %Proc::ProcessTable::TTYDEVS; in _get_tty_list(). 3. Even with the fix of readdir_r(), I got core dump frequently. 3.1 I even serialized the invocation of OS_get_table by using a mutex, still got core dump. 3.2 The symbol PROC_FS is on for solaris 2.6. Even if I took out PROC_FS, still got core dump. Did any one have experiences with running ProcessTable from a multi-threaded environment? Any hints and pointers would be appreciated.
I guess this old bug is solved. If not, we can reopen it again.