Author Topic: psclient memory usage (was: Nvidia Cg toolkit a definitive requirement?)  (Read 1705 times)

Tulkhan

  • Guest
Hi all,

 I've been using the official Linux release packages on a FreeBSD box, since PS 0.3.016, without
any trouble so far.  However, the .020 release is very unstable for me, probably related to CS
lighter2 usage? I'm frequently crashing on the lighter2 maps with errors like this:

*** glibc detected *** ./psc: double free or corruption (!prev): 0x08d50ef8
***
======= Backtrace: =========
/lib/obsolete/linuxthreads/libc.so.6[0x29164200]
/lib/obsolete/linuxthreads/libc.so.6(__libc_free+0x63)[0x2916472f]
libs/libstdc++.so.6(_ZdlPv+0x21)[0x290c31b1]
libs/libstdc++.so.6(_ZdaPv+0x1d)[0x290c320d]
./psc[0x868e72d]
======= Memory map: ========

So I tried building a native client on FreeBSD, which went pretty well.  Unfortunately, the Nvidia Cg
toolkit isn't available for FreeBSD, which PlaneShift now seems to require.  Is there a way to disable this?
I could live with less fancy graphics.  With --fullbright, I can load the non-lighter2 maps, but no success
with Hydlaa plaza et al.

Cheers,
-tulkhan
« Last Edit: November 13, 2007, 06:51:49 pm by Tulkhan »

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Nvidia Cg toolkit a definitive requirement?
« Reply #1 on: November 11, 2007, 05:13:41 pm »
you mean a tar.gz that can work on any linux distro does not work for you?

http://developer.nvidia.com/object/cg_toolkit.html

Tulkhan

  • Guest
Re: Nvidia Cg toolkit a definitive requirement?
« Reply #2 on: November 11, 2007, 05:21:48 pm »
you mean a tar.gz that can work on any linux distro does not work for you?

 No, FreeBSD isn't a Linux distro  ;)

 There is an ABI layer (called the "Linuxolator") to run Linux binaries, but it's not possible
to have native FreeBSD programs loading Linux libraries.

ThomPhoenix

  • Testers
  • Forum Addict
  • *
  • Posts: 2678
  • A Phoenix, what'd you expect?
    • View Profile
Re: Nvidia Cg toolkit a definitive requirement?
« Reply #3 on: November 12, 2007, 12:07:47 am »
Perhaps someone can help you on the Crystal Space front.
We're not evil. We're simply amazing.

Tulkhan

  • Guest
Re: Nvidia Cg toolkit a definitive requirement?
« Reply #4 on: November 12, 2007, 10:19:26 am »
Perhaps someone can help you on the Crystal Space front.

Ok, thanks, will try that.

Cheers,
-tulkhan

Tulkhan

  • Guest
psclient memory usage
« Reply #5 on: November 13, 2007, 06:50:47 pm »
With the help of a CS developer I've been able to track down the problem.  The Cg shaders aren't the issue at all;
CS will fall back to other shaders if Cg isn't available.

Instead, my problem is/was with RAM usage.  FreeBSD imposes, per default, a per process data size limit of 512M.
With this in place, psclient crashes upon loading world with a GCC exception (bad_alloc), which is thrown if new()
fails to allocate memory for some reason.

If I raise the data size limit to 768M (I have "only" 1G RAM), I can login fine, but only on the "old" maps that are
not lighter2-lit.  Even on the old plaza map (from .019) psclient consumes 576M, and if I try logging in on the new
lighter2 map, memory usage grows to over 770M until it eventually crashes again.

Is there something fishy going on with my CS/Planeshift build that makes it consume that much memory or does
Planeshift really need that much memory with the CS 1.2 engine now in place?

BTW, the Linux client uses 660M on the plaza map, with the old plaza map from .019 it's only 448M, which would
be a possible explanation for my instability problems with .020 (see first post).

« Last Edit: November 13, 2007, 06:53:02 pm by Tulkhan »

Vornne

  • Testers
  • Hydlaa Resident
  • *
  • Posts: 189
    • View Profile
Re: psclient memory usage (was: Nvidia Cg toolkit a definitive requirement?)
« Reply #6 on: November 14, 2007, 07:43:13 am »
Just to confirm the previous post, I run 64 bit linux with 1GB memory, and from my testing of the .020 release, lighter2 maps take up around 200 more MB of RAM than the old type.

Induane

  • Veteran
  • *
  • Posts: 1287
  • What should I put here?
    • View Profile
    • Vaalnor Inc.
Re: psclient memory usage (was: Nvidia Cg toolkit a definitive requirement?)
« Reply #7 on: November 18, 2007, 05:12:08 am »
Yes its due to the lightmaps being stored as png images, I wonder if lighter2 could handle converting those to .dds fies at some point. That might help.

Xordan

  • Crystal Space Developer
  • Forum Addict
  • *
  • Posts: 3845
  • For God and the Empire
    • View Profile
Re: psclient memory usage (was: Nvidia Cg toolkit a definitive requirement?)
« Reply #8 on: November 18, 2007, 07:54:47 am »
I'm currently working on some memory problems in CS, hopefully we'll be able to cut down the average memory usage a fair bit.

Tulkhan

  • Guest
Re: psclient memory usage (was: Nvidia Cg toolkit a definitive requirement?)
« Reply #9 on: November 18, 2007, 04:03:26 pm »
I'm currently working on some memory problems in CS, hopefully we'll be able to cut down the average memory usage a fair bit.

That's good to know. And thanks for your work Xordan!