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 618531 - Process terminating with default action of signal 11 (SIGSEGV)
Process terminating with default action of signal 11 (SIGSEGV)
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: Widget: Other
2.20.x
Other Linux
: Normal normal
: ---
Assigned To: ORBit maintainers
ORBit maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-13 11:43 UTC by m4paul
Modified: 2010-07-10 01:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
basic valgrind output from a segv (17.09 KB, text/plain)
2010-05-13 11:44 UTC, m4paul
Details

Description m4paul 2010-05-13 11:43:12 UTC
Ubuntu 10.04
Linux     2.6.32-22-generic #33-Ubuntu SMP i686 GNU/Linux
VLC media player 1.0.6
liborbit2 2.14.18-0.1
libc6     2.11.1-0ubuntu7

When closing vlc normally it exits with segv.

Does this happen every time?
Yes. (And also after a reboot)

Other information:
Valgrind output attached. Any more can be provided on request as this is easy to reproduce on my system.

See also:
https://trac.videolan.org/vlc/ticket/3619
Comment 1 m4paul 2010-05-13 11:44:35 UTC
Created attachment 160968 [details]
basic valgrind output from a segv
Comment 2 Michael Meeks 2010-05-13 14:31:03 UTC
This is really odd:

==13219== Invalid read of size 2
==13219==    at 0x417F914: getenv (getenv.c:84)
==13219==    by 0x7661B46: g_get_charset (in /lib/libglib-2.0.so.0.2400.0)
==13219==    by 0x7639759: g_log_default_handler (in /lib/libglib-2.0.so.0.2400.0)
==13219==    by 0x7639BE9: g_logv (in /lib/libglib-2.0.so.0.2400.0)

Caused by:

static gboolean
g_utf8_get_charset_internal (const char  *raw_data,
			     const char **a)
{
  const char *charset = getenv("CHARSET");


Seems -really- hard to fault ;-)

Of course, there are some simple ways to screw over glibc.

First your app can use 'putenv(foo);' and then free foo ;-) [ which becomes part of the env ] - that might cause this.

Or - second, you could just corrupt the heap nicely (perhaps less likely).

Either way - certainly not an ORBit2 bug - sorry :-)

check your app.
Comment 3 m4paul 2010-05-13 14:48:31 UTC
Well "my app" is the current official "stable" VLC version as released for ubuntu 10.04 LTS.

The reason for ending up on this bugtracker is because people from the vlc bugtracker have read the valgrind dump and adviced me to go to the orbit bugtracker, as you can see here https://trac.videolan.org/vlc/ticket/3619

Are you saying it should be fixed by a vlc developer? If your answer is yes we are in a deadlock for this bug...

Please clarify your finding. :-)
Comment 4 m4paul 2010-05-15 10:25:16 UTC
VLC does not use ORBit2. The VLC Qt4 UI loads some GNOME/GTK plugin(s) that then uses ORBit2. A plugin simply MUST NOT register exit handlers, which is what happens here.

Either way, ORBit2, or the GNOME/GTK plugins for Qt4, it's a GNOME bug.
Comment 5 Tor Lillqvist 2010-05-16 04:55:32 UTC
Ah yes, atexit(). (Here, actually g_atexit().) Such a good idea in the 70s, such a horrible and ill-defined idea in any modern OS.

The g_atexit() use in ORBit2 caused some fun already back when porting ORBit2 to Windows, and I decided to just don't even try it on Windows. Should it be dropped on all platforms?
Comment 6 Michael Meeks 2010-05-17 10:09:51 UTC
Oh - hmm; well - here is the problem.
ORBit2 creates named sockets in /tmp/linc-$USER
The atexit handler unlinks them.

If you don't unlink them sometime, your machine will slowly slow to a crawl as that directory fills up with unique files ;-) That is not good.

If VLC cleans up it's plugins as it shuts down [ as presumably it should ] then if it calls:

CORBA_ORB_shutdown();

or perhaps more simply:

bonobo_debug_shutdown();

Then - hopefully the atexit handler will do next to nothing, and all will be well.

Failing that of course, we have a long term non-completed wish to implement anonymous sockets - which would also solve the problem, and get auto-cleaned by the kernel.

HTH.
Comment 7 Matthias Clasen 2010-07-10 01:29:08 UTC
Not sure how this ended up in GTK+.