Re: [info-performer] perf 3.0.2 RedHat 9 crash

Date view Thread view Subject view Author view

From: John DeWeese (deweese++at++ict.usc.edu)
Date: 09/08/2003 11:41:53


You are my hero. This one is totally lost on me... never seen anything
like it. So, reduced down to bare bones, to make things not crash on
pfInit using Redhat 9 and a super-simple test case, do this:

int main (int argc, char * argv[]) {
   static int ignore = 0;
   if (ignore) { FILE * fp = fopen("", "r"); }

   pfInit();

   ...
}

But why does this work, since it doesn't even do anything? Perhaps it
has something to do with some static initialization or linking issue
between Performer & libc. Performer developers at SGI... might want to
look into this.

Repeated low-bowing while backing toward an exit...
   - John DeWeese

On Sunday, September 7, 2003, at 05:34 PM, Benjamin Chang wrote:

> I had the same experience, Performer 3.0.2 on Redhat 9, gcc3.2.2-5,
> glibc-2.3.2-5.
>
> perfly and other larger apps build and run fine, but smaller programs
> segfault
> at pfInit(). this includes pfconv and most of the samples in
> pguide/libpf, for
> instance hello.c.
>
> i can't figure out why either, but just for kicks try this - it worked
> for me:
>
> insert the following code anywhere in your main() function:
> (from pguide/libpf/C/complex.c, one of the few sample programs that
> didn't bomb)
>
> /*****************************/
> if (WriteScene)
> {
> FILE *fp;
> if (fp = fopen("scene.out", "w"))
> {
> //pfPrint(scene, PFTRAV_SELF|PFTRAV_DESCEND, PFPRINT_VB_DEBUG, fp);
> //fclose(fp);
> }
> else
> pfNotify(PFNFY_WARN, PFNFY_RESOURCE,
> "Could not open scene.out for debug printing.");
> }
> /*******************************/
>
> and declare WriteScene as
>
> static int WriteScene = 0;
>
>
> this may seem like a fairly pointless code snippet, but it does seem
> to do the
> trick. you'll notice that it will never execute and is also mostly
> commented
> out. more magic.
>
> ---------
> Ben Chang
> Assistant Professor, Art and Technology Studies
> School of the Art Institute of Chicago
> 112 S. Michigan, Chicago IL 60603
> 312.345.3561
> bchang++at++artic.edu
>
>
> Quoting info-performer Mailing List <info-performer++at++sgi.com>:
>> From: John DeWeese <deweese++at++ict.usc.edu>
>> Date: Fri, 5 Sep 2003 18:39:03 -0700
>> Subject: [info-performer] perf 3.0.2 RedHat 9 crash
>>
>> I'm having a very odd problem with Performer 3.0.2 installed on RedHat
>> 9, gcc3.2.3. I'm almost at my wit's end, so perhaps someone could
>> help.
>> The machine is a dual P4, though SMP is disabled in the kernel. The
>> problem is that a simple C program that contains essentially "main()
>> {pfInit();}" crashes inside pfInit! See Appendix A for a gdb stack
>> trace :) Looks like it's inside the license manager. And yep, I
>> have
>> a working demo license.
>
>
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Sep 08 2003 - 11:45:34 PDT