Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: mtanski [...] gridapp.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.44
Fixed in: 0.45

Attachments
proc-process-table-linux-improvements.patch



Subject: Proc::ProcessTable not thread safe on linux
Download (untitled) / with headers
text/plain 1.1k
While using the excellent Proc::ProcessTable on many os/arch combinations, we ran into some Linux issues. Namely, crashes caused by thread-safety issues and large on-stack allocations. So we decided to go ahead and fix those and send them upstream. When you look at the diff you'll see there are quite a few changes. Almost all the allocations now are done using heap (glib's obstacks) instead on the process/thread stack ... reducing the likelihood of blocking the stack. In addition to making the Linux bits thread safe I made sure all the strings & pointers to them were stored in the read-only data section. This will reduce relocation on load and reduce the size of the writable data section. Please note I also got rid of the magic hertz calculation code. I noticed that it looks looks like the code was original taken from procps, which is GPL licensed. The readme specifies that Proc::ProcessTable is licensed under the Perl license. Instead I choose to rely on the sysconf(_SC_CLK_TCK) POSIX behavior (ideally glibc does the right thing internal). I hope the fixes are beneficial for the Linux portion of Proc::ProcessTable. -- Milosz
Subject: proc-process-table-linux-improvements.patch

Message body is not shown because it is too large.



This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.