libthr or libgthread (devel/glib20) bug?

Jeremy Messenger mezz7 at cox.net
Wed Jun 4 19:57:30 PDT 2003


On Wed, 4 Jun 2003 17:14:22 -0700 (PDT), Julian Elischer 
<julian at elischer.org> wrote:

> You may have said so already, but what happens with libkse?

What do you mean by I might have already said so? :-)

Anyway, I forgot to input about libkse.. It doesn't crash with libkse, 
which it will if it's with libthr... ggv and gst-register work perfect with 
libkse.

Cheers,
Mezz

> On Wed, 4 Jun 2003, Jeremy Messenger wrote:
>
>> Any apps that are depending on libgthread-2.0.so.200 always will crash 
>> if it's linking to libthr (using libmap.conf). My previous email about 
>> gst-register, it will not crash anymore if I set libgthread links to 
>> libc_r instead libthr. All ports that I have installed have been 
>> compiled with the debug (-g). Anyway, here's gdb info of ggv:
>>
>> ===============================
>> % gdb ggv
>> (gdb) r
>> Starting program: /usr/X11R6/bin/ggv
>> GThread-ERROR **: file gthread-posix.c: line 135 (): error 'Invalid 
>> argument' during 'pthread_getschedparam (pthread_self(), &policy, 
>> &sched)'
>> aborting...
>> Program received signal SIGABRT, Aborted.
>> 0x28ab3313 in kill () at {standard input}:15
>> 15      {standard input}: No such file or directory.
>> in {standard input}
>> Current language:  auto; currently asm
>> (gdb) bt
>> #0  0x28ab3313 in kill () at {standard input}:15
>> #1  0x28b1eecc in abort () at /usr/src/lib/libc/stdlib/abort.c:72
>> #2  0x288824fb in g_logv (log_domain=0x288571c1 "GThread",
>> log_level=G_LOG_LEVEL_ERROR, format=0x0, args1=0x0) at gmessages.c:508
>> #3  0x288825c4 in g_log (log_domain=0x0, log_level=0, format=0x0)
>> at gmessages.c:527
>> #4  0x2885542e in g_thread_impl_init () at gthread-posix.c:135
>> #5  0x28856692 in g_thread_init (init=0x0) at gthread-impl.c:330
>> #6  0x282b382b in bonobo_activation_pre_args_parse (program=0x0, 
>> mod_info=0x0)
>> at gnome-init.c:117
>> #7  0x282af903 in gnome_program_preinit (program=0x8057af0,
>> app_id=0x8057be4 "", app_version=0x0, argc=1, argv=0xbfbffbc4)
>> at gnome-program.c:1322
>> #8  0x282b0698 in gnome_program_initv (type=134595648, app_id=0x0,
>> app_version=0x0, module_info=0x8057af0, argc=1, argv=0xbfbffbc4,
>> first_property_name=0x0, args=0x0) at gnome-program.c:1871
>> #9  0x282b031a in gnome_program_init (
>> app_id=0x2f6 <Error reading address 0x2f6: Bad address>,
>> app_version=0x2f6 <Error reading address 0x2f6: Bad address>,
>> module_info=0x2f6, argc=758, argv=0x2f6,
>> first_property_name=0x2f6 <Error reading address 0x2f6: Bad address>)
>> at gnome-program.c:1679
>> #10 0x0804f9e7 in main (argc=1, argv=0xbfbffbc4) at main.c:202
>> ---Type <return> to continue, or q <return> to quit---
>> #11 0x0804c979 in _start ()
>> ===============================
>>
>> Here's gthread-posix.c source codes look like.. I don't know if it 
>> helps, but at least I am trying..
>>
>> 100 to 146 line:
>> ===============================
>> #if defined (POSIX_MIN_PRIORITY) && defined (POSIX_MAX_PRIORITY)
>> # define HAVE_PRIORITIES 1
>> static gint priority_normal_value;
>> # ifdef __FreeBSD__
>> /* FreeBSD threads use different priority values from the POSIX_
>> * defines so we just set them here. The corresponding macros
>> * PTHREAD_MIN_PRIORITY and PTHREAD_MAX_PRIORITY are implied to be
>> * exported by the docs, but they aren't.
>> */
>> #  define PRIORITY_LOW_VALUE      0
>> #  define PRIORITY_URGENT_VALUE   31
>> # else /* !__FreeBSD__ */
>> #  define PRIORITY_LOW_VALUE      POSIX_MIN_PRIORITY
>> #  define PRIORITY_URGENT_VALUE   POSIX_MAX_PRIORITY
>> # endif /* !__FreeBSD__ */
>> # define PRIORITY_NORMAL_VALUE    priority_normal_value
>> #endif /* POSIX_MIN_PRIORITY && POSIX_MAX_PRIORITY */
>>
>> static gulong g_thread_min_stack_size = 0;
>> #define G_MUTEX_SIZE (sizeof (pthread_mutex_t))
>> #if defined(_SC_THREAD_STACK_MIN) || defined (HAVE_PRIORITIES)
>> #define HAVE_G_THREAD_IMPL_INIT
>> static void
>> g_thread_impl_init()
>> {
>> #ifdef _SC_THREAD_STACK_MIN
>> g_thread_min_stack_size = MAX (sysconf (_SC_THREAD_STACK_MIN), 0);
>> #endif /* _SC_THREAD_STACK_MIN */
>> #ifdef HAVE_PRIORITIES
>> # ifdef G_THREADS_IMPL_POSIX
>> {
>> struct sched_param sched;
>> int policy;
>> posix_check_cmd (pthread_getschedparam (pthread_self(), &policy, &sched)) 
>>
>>
>> ; <-- 135 line
>> priority_normal_value = sched.sched_priority;
>> }
>> # else /* G_THREADS_IMPL_DCE */
>> posix_check_cmd (priority_normal_value =
>> 		  pthread_getprio (*(pthread_t*)thread,
>> 				   g_thread_priority_map [priority]));
>> # endif
>> #endif /* HAVE_PRIORITIES */
>> }
>> #endif /* _SC_THREAD_STACK_MIN || HAVE_PRIORITIES */
>> ===============================
>>
>> CVSup'ed around 30 - 45 minutes ago and buildworld/recompile kernel..
>> ===============================
>> # uname -a
>> FreeBSD personal.mezzweb.com 5.1-CURRENT FreeBSD 5.1-CURRENT #0: Wed Jun 
>> 4 18:30:22 CDT 2003     
>> mezz at personal.mezzweb.com:/usr/obj/usr/src/sys/BSDRULZ  i386
>> ===============================
>>
>> Cheers,
>> Mezz
>>
>>
>> -- bsdforums.org 's moderator, mezz.
>> _______________________________________________
>> freebsd-threads at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-threads
>> To unsubscribe, send any mail to "freebsd-threads- 
>> unsubscribe at freebsd.org"
>>
>
>



-- 
bsdforums.org 's moderator, mezz.


More information about the freebsd-threads mailing list