Panda 1.6.2 crashing with bad threads.

Panda 1.6.2 running on 64 bit Kubuntu Hardy seg faults at start up.
pro and I traced it down to a threading problem. Here is our chat.

[16:54:12] <Douglas_E> pro-rsoft: 0 threads made it work.
[16:54:24] Douglas_E, cool.
[16:54:36] Douglas_E, since we’ve isolated the problem to be threading-related, you should really talk to David about the problem
[16:54:56] david is the weird-problems-with-threading specialist.
[16:55:16] <Douglas_E> anything else I can do?
[16:55:50] Douglas_E, well, you could see if the traceback has more info with libc6-dbg installed
[16:55:58] otherwise ask at forums / david
[16:56:14] <Douglas_E> I installed it.

[19:48:21] <Douglas_E> pro-rsoft: seg fault with threading and the dbg for that c lib installed but I see nothing new. ubuntu.pastebin.com/d2cd8dbf9

Looks messy all right. What evidence leads you to believe a threading problem?

For more debugging, I’d try first disabling audio to prove it’s not related to the audio subsystem:

audio-library-name null

And to get more information about Panda’s threading, try:

notify-level-thread spam

David

[16:46:08] Douglas_E, try putting this in Config.prc:
[16:46:11] “support-threads 0”

This made the error go away. It was pro-soft that came up with it. Ask him.

OK. What happens when you try the two Config.prc changes I suggested?

David

I had to go to sleep.

my config and then the gdb
I turned on threading and added your 2 things.

###########################################################

Panda3D Configuration File - User-Editable Portion

###########################################################

Uncomment one of the following lines to choose whether you should

run using OpenGL or DirectX rendering.

direct-gui-edit #t
load-display pandagl
#support-threads 0

These control the placement and size of the default rendering window.

audio-library-name null
notify-level-thread spam
win-origin 0 0
win-size 800 600

Uncomment this line if you want to run Panda fullscreen instead of

in a window.

fullscreen #f

The framebuffer-hardware flag forces it to use an accelerated driver.

The framebuffer-software flag forces it to use a software renderer.

If you don’t set either, it will use whatever’s available.

framebuffer-hardware #t
framebuffer-software #f
sync-video #f

These set the minimum requirements for the framebuffer.

depth-bits 16
color-bits 16
alpha-bits 0
stencil-bits 0
multisamples 0

These control the amount of output Panda gives for some various

categories. The severity levels, in order, are “spam”, “debug”,

“info”, “warning”, and “error”; the default is “info”. Uncomment

one (or define a new one for the particular category you wish to

change) to control this output.

notify-level warning
default-directnotify-level warning

These specify where model files may be loaded from. You probably

want to set this to a sensible path for yourself. $THIS_PRC_DIR is

a special variable that indicates the same directory as this

particular Config.prc file.

model-path $MAIN_DIR
model-path /usr/share/panda3d
model-path /usr/share/panda3d/models

This enable the automatic creation of a TK window when running

Direct.

want-directtools #f
want-tk #f

Enable/disable performance profiling tool and frame-rate meter

want-pstats #t
show-frame-rate-meter #t

Enable audio using the FMOD audio library by default:

####################3:audio-library-name p3fmod_audio

Enable the use of the new movietexture class.

use-movietexture #t

The new version of panda supports hardware vertex animation, but it’s not quite ready

hardware-animated-vertices 0

Enable the model-cache, but only for models, not textures.

model-cache-dir /usr/share/panda3d/modelcache

model-cache-textures #f

Limit the use of advanced shader profiles.

Currently, advanced profiles are not reliable under Cg.

basic-shaders-only #t

(gdb) run First_Contact_Client_OtherKey.py
Starting program: /usr/bin/python First_Contact_Client_OtherKey.py
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
DirectStart: Starting the game.
[New Thread 0x7f09a45816e0 (LWP 9138)]
Known pipe types:
glxGraphicsPipe
(all display modules loaded.)
:thread(debug): Starting Thread WriterThread
:thread(debug): MainThread Main ran for 2.24718 s of 0 requested.
:thread(debug): MainThread Main accrued 2.24718 s of 2.24718; budget is 1.12359.
:thread(debug): Exceeded budget.
:thread(debug): Thread WriterThread accrued 0 s of 2.24718; budget is 1.12359.
:thread(debug): Switching to Thread WriterThread for 0.025 s (1 + 0 + 0 other threads ready, 0 blocked, 0 sleeping)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f09a45816e0 (LWP 9138)]
0xffffffff9fca4ef0 in ?? ()
(gdb) bt full
#0 0xffffffff9fca4ef0 in ?? ()
No symbol table info available.
#1 0x00007f09a37cfc20 in ?? () from /lib/libc.so.6
No symbol table info available.
#2 0x0000000000000000 in ?? ()
No symbol table info available.
(gdb)

Hmm, did you build Panda yourself, or is it the official build provided on this website?

In order to debug this, I may need access to a 64-bit Ubuntu Hardy machine like yours. Would it be possible to temporarily provide ssh access to me on your machine for the purposes of researching this problem?

David

yes, I can do that. Email me magick.crow@gmail.com