[eq-dev] Avoiding eq::Client?

1 view
Skip to first unread message

Martin Lambers

unread,
Sep 4, 2009, 7:47:14 AM9/4/09
to eq-...@equalizergraphics.com
Hello!

In my application, I do not use eq::Client. Instead, I just use the
following:

for initialization:

EqNodeFactory eq_node_factory;
eq::init(argc, argv, &eq_node_factory));
EqConfig *eq_config = static_cast<EqConfig *>(eq::getConfig(argc, argv));
// The following code is only executed on the application node because
// eq::getConfig() does not return on other nodes
...

for deinitialization:

eq_config->exit();
eq::releaseConfig(eq_config);
eq::exit();

and in the loop:
...
eq_config->startFrame();
eq_config->finishFrame();
...


This worked with version 0.6, but with 0.9, I get segmentation faults
during eqConfig::exit().

What do I need to change?

Regards,
Martin
--
Computer Graphics and Multimedia Systems Group
University of Siegen, Germany
http://www.cg.informatik.uni-siegen.de/

_______________________________________________
eq-dev mailing list
eq-...@equalizergraphics.com
http://www.equalizergraphics.com/cgi-bin/mailman/listinfo/eq-dev
http://www.equalizergraphics.com

Stefan Eilemann

unread,
Sep 7, 2009, 3:13:50 AM9/7/09
to Equalizer Developer List
On Fri, Sep 4, 2009 at 1:47 PM, Martin
Lambers<lam...@fb12.uni-siegen.de> wrote:
> Hello!
>
> In my application, I do not use eq::Client. Instead, I just use the
> following:

[eqHello-like code]

> This worked with version 0.6, but with 0.9, I get segmentation faults
> during eqConfig::exit().
>
> What do I need to change?

Supposedly nothing.

I can't reproduce it with eqHello - can you? Which OS are you using?
Can you send a stack trace and relevant debug log output of the
segmentation fault?


Cheers,

Stefan.

Martin Lambers

unread,
Sep 7, 2009, 6:13:58 AM9/7/09
to eq-...@equalizergraphics.com
On Mon, Sep 07, 2009 at 09:13:50AM +0200, Stefan Eilemann wrote:
> > In my application, I do not use eq::Client. Instead, I just use the
> > following:
>
> [eqHello-like code]
>
> > This worked with version 0.6, but with 0.9, I get segmentation faults
> > during eqConfig::exit().
> >
> > What do I need to change?
>
> Supposedly nothing.

OK - I thought maybe I missed something obvious.

> I can't reproduce it with eqHello - can you?

No, not the segfault, but eqHello does not always exits cleanly when
pressing Escape. It sometimes just hangs forever.

> Which OS are you using?

Debian GNU/Linux lenny amd64.

> Can you send a stack trace and relevant debug log output of the
> segmentation fault?

Backtrace:

main/app [0x4f8c69]
/lib/libc.so.6 [0x7f1a3e01ef60]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::Window::_cmdDestroyChannel(eq::net::Command&)+0x154) [0x7f1a3ff3d55c]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::net::CommandFunc<eq::net::Dispatcher>::operator()(eq::net::Command&)+0x74) [0x7f1a3fe49a8c]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::net::Dispatcher::invokeCommand(eq::net::Command&)+0x12d) [0x7f1a3fe49133]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::net::Session::_invokeObjectCommand(eq::net::Command&)+0x471) [0x7f1a3fe9475d]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::net::Session::invokeCommand(eq::net::Command&)+0x14c) [0x7f1a3fe9701e]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::Pipe::_runThread()+0x410) [0x7f1a3ff139d4]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::Pipe::PipeThread::run()+0x19) [0x7f1a3ff1df8b]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::base::Thread::_runChild()+0x159) [0x7f1a3fe40b65]
/home/lambers/install/Linux-x86_64/equalizer-0.9/lib/libeq.so(eq::base::Thread::runChild(void*)+0x1d) [0x7f1a3fe40ca7]
/lib/libpthread.so.0 [0x7f1a3fabbfc7]
/lib/libc.so.6(clone+0x6d) [0x7f1a3e0bc5ad]

The log (produced with EQ_LOG_LEVEL=ALL) is attached.

log.txt.bz2

Stefan Eilemann

unread,
Sep 7, 2009, 10:25:53 AM9/7/09
to Equalizer Developer List
On Mon, Sep 7, 2009 at 12:13 PM, Martin
Lambers<lam...@fb12.uni-siegen.de> wrote:

> No, not the segfault, but eqHello does not always exits cleanly when
> pressing Escape. It sometimes just hangs forever.

Yes, I've seen this one as well. The reply that the server has shut
down never reaches the app, which waits forever on it. I guess
SO_LINGER will help, but I didn't want to change it before the 0.9
release.

>> Can you send a stack trace and relevant debug log output of the
>> segmentation fault?
>
> Backtrace:

[snip]

Mhh, that doesn't help much. It looks like a release build - can you
send me a debug backtrace, or a simple reproducer?

There is not terribly much happening in Window::_cmdDestroyChannel,
and from the debug output it seems that the crash happens in
NodeFactory::releaseChannel, which looks like an issue in the
destruction of EqChannel.

Martin Lambers

unread,
Sep 8, 2009, 3:46:55 AM9/8/09
to eq-...@equalizergraphics.com
On Mon, Sep 07, 2009 at 04:25:53PM +0200, Stefan Eilemann wrote:
> Mhh, that doesn't help much. It looks like a release build - can you
> send me a debug backtrace, or a simple reproducer?

I get different results each time, and sometimes SIGILL instead of
SIGSEGV. It seems that lib/net/commandFunc.h:50 jumps to an invalid
pointer. But I don't know why.

Unfortunately I did not manage to write a small example that shows the
same behaviour. Instead, I get the same behaviour as eqHello (sometimes
it works fine, sometimes it hangs).

There's probably some subtle bug in one of my classes, but I cannot
narrow it down.

Martin
--
Computer Graphics and Multimedia Systems Group
University of Siegen, Germany
http://www.cg.informatik.uni-siegen.de/

_______________________________________________

Stefan Eilemann

unread,
Sep 9, 2009, 3:35:51 AM9/9/09
to Equalizer Developer List

On 8. Sep 2009, at 9:46, Martin Lambers wrote:

> There's probably some subtle bug in one of my classes, but I cannot
> narrow it down.

Try valgrind - see README.valgrind for the command I'm using for
memory leak checks.

You'll see plenty of harmless uninitialized reads in Connection::write
and memory leaks in X11/GLX.

HTH,

Stefan.
--
http://www.eyescale.ch
http://www.equalizergraphics.com
http://www.linkedin.com/in/eilemann

Reply all
Reply to author
Forward
0 new messages