From: Dave Hines (vj@gserv1.dl.ac.uk)
Date: 04/29/93


From: vj@gserv1.dl.ac.uk (Dave Hines)
Subject: [Q] Possible MM/paging bug ?
Date: 29 Apr 1993 15:57:17 GMT

Hello all,
        I have a problem trying to compile xv-3.00, as it causes
processes to die with a SIG 11 / Segmentation fault.

The fault is triggered by trying to compile large statically initialised
arrays for the group 3 fax code in the tiff library. In particular trying
to compile the 58880 element array TIFFFax1DNextState will demonstrate the
problem. This causes gcc to grow to around 15Mb, and generate a large
number of page faults on my 8Mb machine before it dies.. (gcc 2.3.3 on a
Sun sparc used about 17Mb to compile the same programme).

gcc always dies with a sig 11, though once when watching the compile using
top, top died with a segmentation fault. When the system is not paging so
heavily, top does not die (for hours, if I forget & leave it running in a
VC :)

I am NOT running out of VM... I have 8Mb memory & 16Mb swap. The fault
occurs when top (proc fs version) shows around 5Mb swap unused. Adding
a second 16Mb swap partition does not help.

System:
486DX2/66, 8Mb memory, 16 or 32 Mb swap
Linux 0.99p9, gcc 2.3.3 (486 compiled version), libc 4.3.3

Problem code:
tif_fax3 module of tiff library included with xv-3.00, specifically the
array declared: u_char TIFFFax1DNextState[230][256] = {{
on line 3390 of xv-3.00/tiff/g3states.h, included by xv-3.00/tiff/tif_fax3.c

Note that g3states.h is generated by the mkg3states.c programme.
Try "make tif_fax3.o" in the tiff directory to demonstrate the problem.
It will take long enough to get yourself a coffee on an 8Mb machine :-(

Any ideas anyone ?

Thanks,
        Dave.

P.S. Eric Youngdale: If you see this, did my email messages about my
        SCSI tape drive problem reach you ? We have had a few problems
        with email, and I have no way of confirming that they got there.