[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cthreads->pthreads

From: Barry deFreese
Subject: Re: cthreads->pthreads
Date: Mon, 15 Sep 2008 13:50:10 -0400
User-agent: Thunderbird (Windows/20080708)

Hi folks,

Darn Olaf has me digging in to this again. :)

In many cases the mutex stuff gets overriden from chtreads-compat in libpthread. However, in the startup code _hurd_preinit_hook() seems to call init() from hurdsock.c instead of init_first.c. This isn't a problem except that it does several cthreads things such as __mutex_lock. None of this fails but I'm thinking it may cause issues down the line. What is especially strange to me (that I haven't figured out yet) is that I get different code paths on the cthreads ext2fs.static than I do on the pthreads one. My pthreads calls doinit1.11759 after _startup(), while the cthread one seems to call init1().

Am I chasing a non-issue here. Should there be no cthreads calls at all (in other words, are glibc modifications going to be required)? Or is it a non-issue since it is within glibc?

Below is a backtrace of the failure. The locales thing is an issue but I'm focusing on the strange assert at the moment.



Barry deFreese

Starting program: /devel/bdefreese/hurd-pthread3/hurd/build/ext2fs/ext2fs.static

Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/operand.
0x080c8088 in __current_locale_name (category=5) at localename.c:25
25      {
(gdb) bt full
#0  0x080c8088 in __current_locale_name (category=5) at localename.c:25
No locals.
#1  0x0808b726 in __dcigettext (domainname=0x811a9ee "libc",
   msgid1=0x811837c ".\n", msgid2=0x0, plural=0, n=0, category=5)
   at dcigettext.c:473
       __old = <value optimized out>
       __len = <value optimized out>
       domain = <value optimized out>
       binding = <value optimized out>
       categoryname = <value optimized out>
       categoryvalue = <value optimized out>
       dirname = <value optimized out>
       single_locale = <value optimized out>
       retval = <value optimized out>
       retlen = <value optimized out>
       saved_errno = <value optimized out>
       msgid_len = <value optimized out>
       tree_lock = {held = 0, lock = 0, name = 0x0, queue = {head = 0x0,
   tail = 0x0}, holder = 0x0}
#2  0x0808aa0a in __dcgettext (domainname=0x811a9ee "libc",
   msgid=0x8118358 "%s%s%s:%u: %s%sAssertion `%s' failed.\n", category=5)
   at dcgettext.c:53
No locals.
---Type <return> to continue, or q <return> to quit---
#3  0x0808a7c4 in __assert_fail (assertion=0x811575c "__pthread_threads",
   file=0x8115ad8 "../../libpthread/sysdeps/generic/pt-mutex-unlock.c",
   line=37, function=0x8115e57 "__pthread_mutex_unlock") at assert.c:57
       buf = <value optimized out>
       errstr = "Unexpected error.\n"
#4  0x08070352 in __pthread_mutex_unlock (mutex=0x8165d00)
   at ../../libpthread/sysdeps/generic/pt-mutex-unlock.c:37
       thread = <value optimized out>
       __PRETTY_FUNCTION__ = "__pthread_mutex_unlock"
#5  0x080819ce in _hurd_thread_sigstate (thread=89)
   at ../mach/lock-intern.h:102
       ss = (struct hurd_sigstate *) 0x1006808
#6  0x080aba2b in __sbrk (increment=2104) at ../hurd/hurd/signal.h:185
       __hurd_critical__ = <value optimized out>
       result = <value optimized out>
#7 0x0808a2e5 in __libc_setup_tls (tcbsize=12, tcbalign=5) at libc-tls.c:147
       tlsblock = (void *) 0xffffffd8
       memsz = 40
       filesz = 16
       initimage = (void *) 0x8135000
       align = 4
       max_align = 4
       tcb_offset = 2088
---Type <return> to continue, or q <return> to quit---
       phdr = <value optimized out>
#8  0x0808a52f in __pthread_initialize_minimal () at libc-tls.c:248
No locals.
#9  0x08089c69 in doinit1.11759 ()
   at ../sysdeps/mach/hurd/i386/init-first.c:206
       _cthread_exit_routine = (void (*)(int)) 0
       __hurd_threadvar_max = 0
       __libc_enable_secure = 0
       __hurd_threadvar_stack_offset = 16780944
       __hurd_threadvar_stack_mask = 0
       __libc_multiple_libcs = 1
#10 0x08048135 in _start ()
No symbol table info available.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]