Perl CPAN failing to install modules

IRIX/Nekoware development, porting and related topics.
Forum rules
Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.
User avatar
dexter1
Moderator
Moderator
Posts: 2629
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Re: Perl CPAN failing to install modules

Unread postby dexter1 » Sat Jan 14, 2017 12:01 pm

I think Josehill is indeed right:

Before entering nekoware perl CPAN shell, try to do this first:

Code: Select all

chkconfig vswap on

This seems to work on my ChallengeS, at least installing a new CPAN. Khalid, can you test this?

[edit] before this, i added extra swap via a swap file, but that didn't help, Maybe the combination of vswap and adding extra swap did the trick. In order to test vswap without extra swap, i have to let CPAN go its course, which takes a rather long time. :(
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:

User avatar
khalidschofield
Posts: 540
Joined: Thu May 06, 2004 6:18 am

Re: Perl CPAN failing to install modules

Unread postby khalidschofield » Sat Jan 14, 2017 4:03 pm

Mine fails saying can't fork is that a symptom of out of memory? My o2 has the same issue with 1gb ram
############################
Re-install with OpenBSD :)

User avatar
dexter1
Moderator
Moderator
Posts: 2629
Joined: Thu Feb 20, 2003 6:57 am
Location: Zoetermeer, The Netherlands

Re: Perl CPAN failing to install modules

Unread postby dexter1 » Sat Jan 14, 2017 4:06 pm

Um, how big is your swap? I now have:

Code: Select all

cyane:/home/frank> swap -l
lswap path         dev    pri swaplo   blocks     free  maxswap    vswap
    2 /swap/swap1
                   0,46     2      0   262144   262144   262144        0
    1 /dev/swap
                   0,50     0      0   262144   251000   262144        0

My Challenge S only has 192MB ram

[EDIT] i have vswap off to test if an 'install CPAN' fails. Takes a while... Result is inconclusive, but i happen to forget to enable vswap after the chkconfig. The correct command sequence should be:

Code: Select all

chkconfig vswap on
/etc/init.d/swap start

I now have

Code: Select all

cyane:/etc# swap -l
lswap path         dev    pri swaplo   blocks     free  maxswap    vswap
    2 /swap/swap1
                   0,46     2      0   262144   262144   262144        0
    3 /.swap.virtual
                   0,46     2      0        0        0        0    80000
    1 /dev/swap
                   0,50     0      0   262144   246352   262144        0

More later...
:Crimson: :PI: :Indigo: :O2: :Indy: :Indigo2: :Indigo2IMP: :O200: :O2000: :Onyx2:

User avatar
josehill
Moderator
Moderator
Posts: 3250
Joined: Mon Jun 06, 2005 9:53 pm
Location: New England, USA
Contact:

Re: Perl CPAN failing to install modules

Unread postby josehill » Sat Jan 14, 2017 6:42 pm

If this is the scenario I'm thinking of, the man page for swap explains why turning on virtual swap (vswap) can work, even when adding additional swap files or actual physical memory does not help:

If the amount of private virtual space requested exceeds the available logical swap space, the system call fails with EAGAIN and an "out of logical swap space" message is logged on the console. The system does this in order to prevent memory deadlocks from occurring...

...Programs that have large address spaces and large programs that fork, may receive EAGAIN along with the "out of logical swap space" message on the console. This can also happen when debugging a large program with dbx or other debugger. There are two ways to avoid this error: adding more real swap space, or adding virtual swap space...

...(Virtual swap) increases the amount of logical swap space without using any physical disk space. This is suitable when the programs involved do not intend to use the virtual address space they allocate (i.e., when the address space is sparse or when a large program that forks intends to exec soon afterwards without modifying many pages). In these cases, physical swap space is not required and so adding virtual swap space allows the kernel to complete the logical swap space reservation and avoid the EAGAIN errors. The advantage of this approach is that it does not require any disk space, but adds the risk of encountering a memory deadlock.

User avatar
khalidschofield
Posts: 540
Joined: Thu May 06, 2004 6:18 am

Re: Perl CPAN failing to install modules

Unread postby khalidschofield » Sun Jan 15, 2017 5:12 am

I would never have guessed it needed more swap space... I really don't get why. The process didn't seem to run out of memory. The can't fork issue was so cryptic.

Anyway install CPAN worked. My SSL module won't build probably because SSL is broken on the box.

Thanks for the solution! Much appreciated
############################

Re-install with OpenBSD :)


Return to “SGI: Development”

Who is online

Users browsing this forum: No registered users and 1 guest