NetBSD-Bugs archive

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

port-macppc/47072: Broken threads in macppc



>Number:         47072
>Category:       port-macppc
>Synopsis:       Broken threads in macppc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-macppc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 14 03:10:01 +0000 2012
>Originator:     julio+host-mini-jmmv%meroh.net@localhost
>Release:        NetBSD 6.99.13 -- Sources as of 2012-10-13.
>Organization:
        
>Environment:
        
        
System: NetBSD mini.meroh.net 6.99.13 NetBSD 6.99.13 (MINI) #13: Sat Oct 13 
22:44:13 EDT 2012 
jmmv%netbsd.meroh.net@localhost:/home/jmmv/os/netbsd/macppc/obj/home/jmmv/os/netbsd/src/sys/arch/macppc/compile/MINI
 macppc
Architecture: powerpc
Machine: macppc
>Description:
        Since 2012-09-11, many applications in my NetBSD/macppc -current
        installation have started to act wierdly.

        Some of the many failures I have noticed:
        - While building emacs, the generated emacs binary either segfaults
          along the build process or enters an infinite loop (that requires
          kill -9 to erradicate).
        - mutt segfaults during email composition, right after exiting the
          editor.
        - pidgin segfaults right on startup.
        - firefox randomly locks up.
        - And the obvious: many failures in the lib/libpthread tests.

        Regarding the failures in lib/libpthread I got this data collected:

        ===> Expected failures
        t_cond:cond_timedwait_race  ->  expected_failure: PR lib/44756: 
/home/sysbuild/src/tests/lib/libpthread/t_cond.c:338: rv == ETIMEDOUT not met  
[1.419s]
        t_mutex:mutex2  ->  expected_failure: PR port-powerpc/44387  [40.009s]
        t_mutex:mutex3  ->  expected_failure: PR port-powerpc/44387  [40.009s]
        ===> Broken tests
        t_sem:before_start_no_threads  ->  broken: Premature exit: received 
signal 11 (core dumped)  [0.122s]
        t_sigmask:before_threads  ->  broken: Premature exit: received signal 
11 (core dumped)  [0.099s]
        t_sigmask:incorrect_mask_bug  ->  broken: Premature exit: received 
signal 11 (core dumped)  [2.109s]
        t_sigsuspend:sigsuspend  ->  broken: Premature exit: received signal 11 
(core dumped)  [1.098s]

        The stacktraces look like shown below; the stacktraces for the other
        programs, like pidgin, look very similar:

        t_sem:before_start_no_threads:

        0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
        0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
        0xfdeedfd4 in __errno () from /usr/lib/libc.so.12
        0xfdeedf64 in __cerror () from /usr/lib/libc.so.12
        0xfdfc4828 in sem_trywait () from /usr/lib/libpthread.so.1
        0x01801b0c in threadfunc ()
        0x01801c5c in before_start_test ()
        0xfdf77cb8 in atf_tc_run () from /usr/lib/libatf-c.so.0
        0xfdf761b0 in atf_tp_run () from /usr/lib/libatf-c.so.0
        0xfdf7589c in atf_tp_main () from /usr/lib/libatf-c.so.0
        0x01801d24 in main ()

        t_sigmask:before_threads

        0xfdfc71ac in pthread_mutex_lock () from /usr/lib/libpthread.so.1
        0xfdfc71ac in pthread_mutex_lock () from /usr/lib/libpthread.so.1
        0xfdf0d5d0 in __flockfile_internal () from /usr/lib/libc.so.12
        0xfded2b08 in puts () from /usr/lib/libc.so.12
        0x018014a0 in atfu_before_threads_body ()
        0xfdf97cb8 in atf_tc_run () from /usr/lib/libatf-c.so.0
        0xfdf961b0 in atf_tp_run () from /usr/lib/libatf-c.so.0
        0xfdf9589c in atf_tp_main () from /usr/lib/libatf-c.so.0
        0x018016f0 in main ()

        t_sigmask:incorrect_mask_bug

        0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
        0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
        0xfdf0dfd4 in __errno () from /usr/lib/libc.so.12
        0xfdf0df64 in __cerror () from /usr/lib/libc.so.12
        0xfdfc5794 in __select50 () from /usr/lib/libpthread.so.1
        0x01801068 in atfu_incorrect_mask_bug_body ()
        0xfdf97cb8 in atf_tc_run () from /usr/lib/libatf-c.so.0
        0xfdf961b0 in atf_tp_run () from /usr/lib/libatf-c.so.0
        0xfdf9589c in atf_tp_main () from /usr/lib/libatf-c.so.0
        0x018016f0 in main ()

        t_sigsuspend:sigsuspend

        0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
        0xfdfca474 in pthread__errno () from /usr/lib/libpthread.so.1
        0xfdf0dfd4 in __errno () from /usr/lib/libc.so.12
        0xfdf0df64 in __cerror () from /usr/lib/libc.so.12
        0xfdfc5924 in __sigsuspend14 () from /usr/lib/libpthread.so.1
        0x01800c18 in atfu_sigsuspend_body ()
        0xfdf97cb8 in atf_tc_run () from /usr/lib/libatf-c.so.0
        0xfdf961b0 in atf_tp_run () from /usr/lib/libatf-c.so.0
        0xfdf9589c in atf_tp_main () from /usr/lib/libatf-c.so.0
        0x01800cb4 in main ()
>How-To-Repeat:
        Update a macppc machine to a recent version.  Try to build emacs24,
        run pidgin or run the pthreads tests.
>Fix:
        I *think* this might be caused by:

        http://mail-index.netbsd.org/source-changes/2012/09/11/msg037199.html

        I took a quick look at the pthread code and added some printfs, and
        it seems that, e.g. within pthread__errno, the call to get a pointer
        to the TLS returns an invalid address (like 0x4) and that causes the
        crash.

        But no, I don't have a fix.

>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index