From: Benedikt Kessler (bjk++at++munich.sgi.com)
Date: 07/11/2000 01:04:12
Hi Peter!
phowe++at++csc.com wrote:
>
> Hello All,
>
> We are having some problems (i.e. bus error, seg fault) under some conditions
> when we fork a DBASE process.
>
> One lead we have had is the following warnings from Performer when running our
> application, that appear
> to be related to the call loadFile from pfTexture.
>
> 00:00:18.825: PF Warning: 152318 (Performer) Usage : pfMemory::free()
> can't free() non-pfMemory data
> 00:00:18.848: PF Warning: 152318 (Performer) Usage : pfObject::~pfObject()
> destroying object (0x5846b760) with non-zero ref count
> 00:00:24.172: PF Warning: 151482 (Performer) Usage : pfTexture::apply() -
> bad number of components 0
> 00:00:24.292: PF Warning: 151482 (Performer) Usage : pfTexture::apply() -
> bad number of components 0.
>
> After running cvd and watching the above memory address the following appears to
> be happening. See attached
> file callStacks for call stacks.
>
> 1. Load the first texture file, the piece of memory gets allocated.
>
> 2. Still loading first texture File, memory get used by a getrow function to
> store temporarily a row of texture data, I think, since after the texture
> has been
> loaded the image (part of pfTexture) occupies a different area of memory.
>
> 3. Load in another number of texture Files, same memory gets used during getrow
> call.
>
> 4. pfConfig is called, processes forked.
>
> 5. Load in another texture File which is larger in size than previous textures.
> The
> function pr_load_sgi_image appears to free this memory. I guess this is
> because
> it isn't big enough for a row? It then allocates a different region of memory
> to use
> for getrow.
>
> 6. The now free memory gets used by another object.
>
> 7. The DBASE process loads in a texture. pr_load_sgi_image function seems to
> try to free this memory again. This results in the first warning message
> above.
>
> I have the following questions to ask. Is the above a problem or are we doing
> something wrong as far
> as when we should be loading textures?
This is from the pfdLoadFile manpage:
pfdLoadFile builds in-memory data structures from an external
database
file. ...
pfdLoadFile may only be called after pfConfig.
Probably the same statement is missing in the pfTexture manpage. You
might not be allowed to load the texture before the pfconfig call. Doing
this will indeed cause the problems you mentioned above.
Internal buffers are allocated from shared memory and stored in static
variables.
When the DBASE process gets forked it inherits there variables. If you
continue to load textures from both the APP and the DBASE process, it
may happen that both processes need bigger buffers. As both processes
beleive that they own these buffers, some double pfFree call occur on
the same piece of memory.
Bye! Benedikt
-- +---------------------------------+----------------------------------+ |Benedikt J. Kessler | Silicon Graphics GmbH | |Professional Services | Am Hochacker 3 - Technopark | |SGI | 85630 Grasbrunn-Neukeferloh, FRG | | --- __o ,__o | | | ------_ \<,_ _-\_<, | Phone: (+49) 89 46108-366 or -0 | |----- (*)/ (*) (*)/'(*) | Fax: (+49) 89 46107-366 | +---------------------------------+----------------------------------+ |E-Mail: bjk++at++sgi.com Web (private): http://reality.sgi.com/bjk | | Web: http://www.sgi.de/dienstleistungen/ | +--------------------------------------------------------------------+
This archive was generated by hypermail 2b29 : Tue Jul 11 2000 - 01:04:38 PDT