After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 573882 - ekiga crashes on startup
ekiga crashes on startup
Status: RESOLVED NOTGNOME
Product: ekiga
Classification: Applications
Component: general
3.2.x
Other Linux
: Normal critical
: ---
Assigned To: Ekiga maintainers
Ekiga maintainers
Depends on:
Blocks:
 
 
Reported: 2009-03-03 09:11 UTC by Götz Waschk
Modified: 2009-03-24 12:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Götz Waschk 2009-03-03 09:11:45 UTC
This is on Mandriva Cooker with ekiga 3.1.2:
GNU gdb 6.8-5mdv2009.1 (Mandriva Linux release 2009.1)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-mandriva-linux-gnu"...
(gdb) run
Starting program: /usr/bin/ekiga 
[Thread debugging using libthread_db enabled]
Detaching after fork from child process 31865.
[New Thread 0xb5324990 (LWP 31862)]

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb) thread apply all bt full

Thread 1 (Thread 0xb5324990 (LWP 31862))

  • #0 ??
  • #1 FFMPEGLibrary::Load
    at ../common/dyna.cxx line 304
  • #2 OpalCodecPlugin_GetCodecs
    at mpeg4.cxx line 1976
  • #3 OpalPluginCodecManager::OnLoadPlugin
    at /usr/src/debug/opal-3.6.0/src/codec/opalpluginmgr.cxx line 1360
  • #4 PPluginModuleManager::OnLoadModule
    at ptlib/common/pluginmgr.cxx line 470
  • #5 PPluginModuleManager::OnLoadModule_PNotifier::Call
    at /usr/include/multiarch-i386-linux/ptlib/pluginmgr.h line 159
  • #6 PNotifier::operator()
  • #7 PPluginManager::CallNotifier
    at ptlib/common/pluginmgr.cxx line 437
  • #8 PPluginManager::LoadPlugin
    at ptlib/common/pluginmgr.cxx line 177
  • #9 PPluginManager::LoadPluginDirectory
    at ptlib/common/pluginmgr.cxx line 108
  • #10 PPluginManager::LoadPluginDirectory
    at ptlib/common/pluginmgr.cxx line 101
  • #11 PPluginManager::LoadPluginDirectory
    at ptlib/common/pluginmgr.cxx line 101
  • #12 PPluginManager::LoadPluginDirectory
    at ptlib/common/pluginmgr.cxx line 86
  • #13 PluginLoaderStartup::OnStartup
    at ptlib/common/pluginmgr.cxx line 483
  • #14 PProcess
    at ptlib/common/osutils.cxx line 1620
  • #15 GnomeMeeting
    at ekiga.cpp line 68
  • #16 main
    at gui/main.cpp line 4453

Comment 1 Götz Waschk 2009-03-03 10:14:16 UTC
This is with libavcodec from subversion r17730.
Comment 2 Damien Sandras 2009-03-03 13:32:04 UTC
Which versions of OPAL/PTLIB?
Comment 3 Götz Waschk 2009-03-03 13:42:38 UTC
This is with ekiga 3.1.2, so it uses ptlib 2.6.0 and opal 3.6.0 as required.
Comment 4 Damien Sandras 2009-03-06 08:53:11 UTC
Can you try to find out the cause?

To put it simply, Craig is the only one to be able to fix that. However, he does not answer to e-mails anymore. So if nobody fixes it, either we release it broken, or we don't release.
Comment 5 Götz Waschk 2009-03-06 08:55:33 UTC
How, can you give me a hint on debugging this?
Comment 6 Damien Sandras 2009-03-07 11:47:45 UTC
I'll upgrade to libavcodec52 3:20090222-0.0 and see how it works here.
Comment 7 Eugen Dedu 2009-03-07 11:50:48 UTC
Note: some codecs do not yet compile with newest ffmpeg: http://www.nabble.com/Can't-compile-opal-with-avcodec-td21097280.html
Comment 8 Damien Sandras 2009-03-07 12:02:02 UTC
It works with the above version. (20090222).
Götz are you sure you run it with the same version of ffmpeg than you compiled it with?
Comment 9 Götz Waschk 2009-03-08 17:41:35 UTC
Yes, I'm absolutely sure.
Comment 10 Damien Sandras 2009-03-08 18:54:59 UTC
Then you will have to use gdb to see where it crashes. It will give a hint to Robert and Craig for debugging this.
Comment 11 Götz Waschk 2009-03-08 19:02:27 UTC
I have aleady posted the backtrace, what else do you want me to do?
Comment 12 Damien Sandras 2009-03-08 19:05:07 UTC
Help determining where it comes from the best you can. None of us can reproduce your issue.
Comment 13 Götz Waschk 2009-03-08 19:45:27 UTC
Could you please give me a step by step instruction?

BTW Might this be related to the stackalign option for libavcodec? Should I try to enable that one?
Comment 14 Damien Sandras 2009-03-08 20:44:18 UTC
Perhaps you could try the stackalign thing.

It is very hard to give a step by step guide :-/
Comment 15 Götz Waschk 2009-03-12 07:02:06 UTC
The stackalign option does not help. Same crash with ffmpeg 0.5 compiled like this:
./configure --enable-shared --enable-postproc --enable-gpl --enable-pthreads --enable-libtheora --enable-libvorbis --enable-x11grab --enable-swscale --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libx264
Comment 16 Götz Waschk 2009-03-17 09:26:26 UTC
With ffmpeg 0.5 it crashes on i586 with or without stackalign hack. On x86_64, it crashes with the stackalign hack but it does work without it.
Comment 17 Götz Waschk 2009-03-17 09:48:02 UTC
Here's the backtrace on x86_64 with the stack align hack enabled:

[?1034hGNU gdb 6.8-5mdv2009.1 (Mandriva Linux release 2009.1)
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-mandriva-linux-gnu"...
[Thread debugging using libthread_db enabled]
[New Thread 0x2ab1d960ff30 (LWP 18149)]

Program received signal SIGSEGV, Segmentation fault.
0x00002ab1dc1aed7f in DynaLink::InternalOpen (this=0x2ab1dc3b3620, dir=0x2ab1dc1b1172 "", name=0x2ab1dc1b0a90 "libavcodec.so.52") at ../common/dyna.cxx:90
90	  WITH_ALIGNED_STACK({  // must be called before using avcodec lib

Thread 1 (Thread 0x2ab1d960ff30 (LWP 18149))

  • #0 DynaLink::InternalOpen
    at ../common/dyna.cxx line 90
  • #1 DynaLink::Open
    at ../common/dyna.cxx line 49
  • #2 FFMPEGLibrary::Load
    at ../common/dyna.cxx line 172
  • #3 OpalCodecPlugin_GetCodecs
    at mpeg4.cxx line 1976
  • #4 OpalPluginCodecManager::OnLoadPlugin
    at /usr/src/debug/opal-3.6.0/src/codec/opalpluginmgr.cxx line 1360
  • #5 PPluginModuleManager::OnLoadModule
    at ptlib/common/pluginmgr.cxx line 470
  • #6 PPluginManager::CallNotifier
    at ptlib/common/pluginmgr.cxx line 437
  • #7 PPluginManager::LoadPlugin
    at ptlib/common/pluginmgr.cxx line 177
  • #8 PPluginManager::LoadPluginDirectory
    at ptlib/common/pluginmgr.cxx line 108
  • #9 PPluginManager::LoadPluginDirectory
    at ptlib/common/pluginmgr.cxx line 101
  • #10 PPluginManager::LoadPluginDirectory
    at ptlib/common/pluginmgr.cxx line 101
  • #11 PPluginManager::LoadPluginDirectory
    at ptlib/common/pluginmgr.cxx line 86
  • #12 PluginLoaderStartup::OnStartup
    at ptlib/common/pluginmgr.cxx line 483
  • #13 PProcess
    at ptlib/common/osutils.cxx line 1620
  • #14 GnomeMeeting
    at ekiga.cpp line 68
  • #15 main
    at gui/main.cpp line 4453

Comment 18 Götz Waschk 2009-03-18 12:32:32 UTC
Still happens in ekiga 3.2.0 with ptlib 2.6.1 and opal 3.6.1.
Comment 19 Götz Waschk 2009-03-18 13:09:09 UTC
I think I have found the problem, it was caused by Mandriva's default optimization flags:
-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables
Comment 20 Snark 2009-03-18 13:53:01 UTC
Which one of them was the problem?
Comment 21 Götz Waschk 2009-03-18 15:13:17 UTC
The combination -O2 -Wp,-D_FORTIFY_SOURCE=2 breaks the build.
-O2 or -Wp,-D_FORTIFY_SOURCE=2 alone do no harm, only the combination.



This is with Mandriva's gcc 4.3.2.
Comment 22 Damien Sandras 2009-03-18 15:20:15 UTC
And is it supposed to be a bug on our side or in ffmpeg itself?
Comment 23 Götz Waschk 2009-03-18 15:22:49 UTC
Fortify is supposed to detect buffer overflows. So I guess there's a buffer overflow in opal.
Comment 24 Pascal Terjan 2009-03-18 15:42:38 UTC
Not related to the crash but I had a look at that part of the code (DynaLink::InternalOpen) and I think the code is wrong:

=====
  char path[1024];
  memset(path, 0, sizeof(path));

  // Copy the directory to "path" and add a separator if necessary
  if (strlen(path) > 0) {
=====

Last line should probably be:

  if (dir && strlen(dir) > 0) {
Comment 25 Snark 2009-03-18 15:58:19 UTC
The last line you quote is correct, and your fix doesn't seem to be :
- 'path' can't be null since it's declared as "char path[1024];" ;
- your fix uses 'dir' when the line is about 'path'.
Comment 26 Pascal Terjan 2009-03-18 20:26:19 UTC
strlen(path) can never be > 0 because of the memset, so the test is always false and dir is currently always ignored.
I use dir instead of path because I think that the test should be on dir and not on path (The code is there to add "dir/" before "name" when dir is not empty)
Comment 27 Snark 2009-03-19 05:52:16 UTC
Indeed ; I should probably read the full code.
Comment 28 Eugen Dedu 2009-03-23 22:46:40 UTC
Closing, since this was reported upstream (https://sourceforge.net/tracker/?func=detail&aid=2689828&group_id=204472&atid=989748).
Comment 29 Eugen Dedu 2009-03-24 12:06:10 UTC
For info, comment #24 was fixed upstream:

2009-03-24 04:16  rjongbloed

        * plugins/video/common/dyna.cxx: Added fix for video plug in shared
          library loading, current code would not look anywhere but default
          path. Thanks various people at
          http://bugzilla.gnome.org/show_bug.cgi?id=573882#c24