Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl IPC Sharable : Carp/Heavy.pmc not present..

27 views
Skip to first unread message

smuja...@gmail.com

unread,
Nov 19, 2012, 8:28:07 AM11/19/12
to
Hi,

When I load the small data into the shared memory it works fine. When try with huge data, faced with below problem.

Not sure how the Carp/Heavy.pmc is not present !

From where to get this ?

Please find the truss o/p and the perl script below.

Any help would be great !

Truss -p <pid> Error:

stat64("/opt/app/portal/7.4/pin/perl-5.8.0/lib/5.8.0/sun4-solaris-thread-multi/Carp/Heavy.pmc", 0xFFBF26C0) Err#2 ENOENT
open64("/opt/app/portal/7.4/pin/perl-5.8.0/lib/5.8.0/sun4-solaris-thread-multi/Carp/Heavy.pm", O_RDONLY) Err#2 ENOENT
stat64("/opt/app/portal/7.4/pin/perl-5.8.0/lib/5.8.0/Carp/Heavy.pmc", 0xFFBF26C0) Err#2 ENOENT
open64("/opt/app/portal/7.4/pin/perl-5.8.0/lib/5.8.0/Carp/Heavy.pm", O_RDONLY) Err#2 ENOENT
stat64("/opt/app/portal/7.4/pin/perl-5.8.0/lib/Carp/Heavy.pmc", 0xFFBF26C0) Err#2 ENOENT
open64("/opt/app/portal/7.4/pin/perl-5.8.0/lib/Carp/Heavy.pm", O_RDONLY) = 3
fstat64(3, 0xFFBEFDE8) = 0
fstat64(3, 0xFFBEFC90) = 0
ioctl(3, TCGETA, 0xFFBEFD74) Err#25 ENOTTY
read(3, " # C a r p : : H e a v".., 8192) = 5918
read(3, 0x023DC564, 8192) = 0
llseek(3, 0, SEEK_CUR) = 5918
close(3) = 0
fstat64(2, 0xFFBF2160) = 0
Length of shared data exceeds shared segment size at /opt/app/portal/7.4/pin/apps/gprs_preproc_dup_billdue_chk/billing_due_test.txt line 0
Compilation failed in require at snm.pl line 16.
write(2, " L e n g t h o f s h".., 188) = 188
setcontext(0xFFBF2090)
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFEA50000
munmap(0xFEA50000, 8192) = 0
_exit(255)

Perl Script:
pin@ssapp1033[pin]$ cat snm.pl
use strict;
use IPC::Shareable;

our %billdue_imsi;


my $glue = 'imsi';
my %options = (
create => 'yes',
exclusive => 0,
mode => 0644,
destroy => 'no',
);

tie %billdue_imsi, 'IPC::Shareable', $glue, { %options } or die "server: tie failed\n";
require "/opt/app/portal/7.4/pin/apps/gprs_preproc_dup_billdue_chk/billing_due_test.txt";

foreach my $c (keys %billdue_imsi) {
print "server: these are $c: $billdue_imsi{$c}";
exit;
}

exit;

Peter Makholm

unread,
Nov 19, 2012, 9:49:56 AM11/19/12
to
smuja...@gmail.com writes:

> When I load the small data into the shared memory it works fine. When
> try with huge data, faced with below problem.

According to the documentation IPC::Shareable by default allocates
IPC::Shareable::SHM_BUFSIZ bytes shared storage. This seems to be 64 KB.

Peharps your 'huge data' exceeds this size? If so, then you need to
declare the size of the shared segment in your %options.

> Not sure how the Carp/Heavy.pmc is not present !

This is expected. Files ending with .pmc instead of the usual .pm is a
very rarely used feature (if ever). I believe it was supposed to be used
for pre-compiled versions of the modules.

So the non-existence of Carp/Heavy.pmc has nothing to do with you
problem, other than trying to print the warning make Perl try to load
Carp::Heavy previously unneeded.

//Makholm

smuja...@gmail.com

unread,
Nov 19, 2012, 11:13:39 AM11/19/12
to
Thanks for the reply. Please see inline

On Monday, November 19, 2012 8:19:57 PM UTC+5:30, Peter Makholm wrote:
> smujamadar at gmail dot com writes: > When I load the small data into the shared memory it works fine. When > try with huge data, faced with below problem.

According to the documentation IPC::Shareable by default allocates IPC::Shareable::SHM_BUFSIZ bytes shared storage. This seems to be 64 KB. Peharps your 'huge data' exceeds this size? If so, then you need to declare the size of the shared segment in your %options.

[[Subramanya]]
Had faced the problem with creating the shared memory with size > 64KB

my %options = (
create => 'yes',
exclusive => 0,
mode => 0644,
destroy => 'yes',
#128 KB
size => 131072
);

tie %colours, 'IPC::Shareable', $glue, { %options } or
die "server: tie failed\n";

Was giving the error as invalid argument.

When size was set to <= 64KB same code was working fine.

Not sure why ! Hence created the shared memory using a c programe. and wanted to load the hash into it using the perl.. Even for that faced with a problem. Anything I am missing.


0 new messages