public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101761] New: Random hang with 29_atomics/atomic_ref/wait_notify.cc
@ 2021-08-03 18:30 hjl.tools at gmail dot com
  2021-08-03 18:55 ` [Bug target/101761] " ubizjak at gmail dot com
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: hjl.tools at gmail dot com @ 2021-08-03 18:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101761

            Bug ID: 101761
           Summary: Random hang with 29_atomics/atomic_ref/wait_notify.cc
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: crazylht at gmail dot com, wwwhhhyyy333 at gmail dot com
  Target Milestone: ---
            Target: x86-64

29_atomics/atomic_ref/wait_notify.cc in 64-bit on Skylake server:

(gdb) bt
#0  0x00007f897288cc1d in syscall () from /lib64/libc.so.6
#1  0x00000000004018be in std::__detail::__platform_wait<int> (
    __addr=__addr@entry=0x405400
<std::__detail::__waiter_pool_base::_S_for(void const*)::__w+832>,
__val=__val@entry=3)
    at
/export/users/hjl/build/gnu/tools-build/gcc-gitlab-native/build-x86_64-linux/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/atomic_wait.h:104
#2  0x00000000004022a3 in std::__detail::__waiter_pool::_M_do_wait (__old=3, 
    __addr=0x405400 <std::__detail::__waiter_pool_base::_S_for(void
const*)::__w+832>, this=<optimized out>)
    at
/export/users/hjl/build/gnu/tools-build/gcc-gitlab-native/build-x86_64-linux/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/atomic_wait.h:261
#3  std::__detail::__waiter<std::integral_constant<bool, true>
>::_M_do_wait_v<void*, std::__atomic_impl::wait<void*>(void* const*,
std::remove_volatile<void*>::type, std::memory_order)::{lambda()#1}>(void*,
std::__atomic_impl::wait<void*>(void* const*,
std::remove_volatile<void*>::type, std::memory_order)::{lambda()#1})
(__vfn=..., __old=0x2a, this=<synthetic pointer>)
    at
/export/users/hjl/build/gnu/tools-build/gcc-gitlab-native/build-x86_64-linux/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/atomic_wait.h:400
#4  std::__atomic_wait_address_v<void*, std::__atomic_impl::wait<void*>(void*
const*, std::remove_volatile<void*>::type,
std::memory_order)::{lambda()#1}>(void* const*, void*,
std::__atomic_impl::wait<void*>(void* const*,
std::remove_volatile<void*>::type, std::memory_order)::{lambda()#1})
(__addr=<optimized out>, 
    __old=0x2a, __vfn=...)
    at
/export/users/hjl/build/gnu/tools-build/gcc-gitlab-native/build-x86_64-linux/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/atomic_wait.h:430
#5  0x0000000000402366 in std::__atomic_impl::wait<void*> (
    __m=std::memory_order::seq_cst, __old=<optimized out>, 
    __ptr=<optimized out>)
    at
/export/users/hjl/build/gnu/tools-build/gcc-gitlab-native/build-x86_64-linux/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/atomic_base.h:1018
#6  std::__atomic_ref<void*, false, false>::wait (
    __m=std::memory_order::seq_cst, __old=<optimized out>, this=0x7ffed19864e8)
    at
/export/users/hjl/build/gnu/tools-build/gcc-gitlab-native/build-x86_64-linux/x86_64-pc-linux-gnu/libstdc++-v3/include/bits/atomic_base.h:1874
#7  test<void*> (va=va@entry=0x0, vb=vb@entry=0x2a)
    at
/export/gnu/import/git/gitlab/x86-gcc/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc:44
#8  0x000000000040125b in main ()
    at
/export/gnu/import/git/gitlab/x86-gcc/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc:57
(gdb)

In 32-bit,

(gdb) bt
#0  0xf7fc655d in __kernel_vsyscall ()
#1  0xf7bac46b in syscall () from /lib/libc.so.6
#2  0x0804995d in std::__detail::__platform_wait<int> (
    __addr=0x804d680 <std::__detail::__waiter_pool_base::_S_for(void
const*)::__w+1472>, __val=3)
    at
/export/gnu/import/git/gcc-test-master-intel64-native/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/atomic_wait.h:104
#3  0x08049e3a in std::__detail::__waiter_pool::_M_do_wait (__old=3, 
    __addr=0x804d680 <std::__detail::__waiter_pool_base::_S_for(void
const*)::__w+1472>, this=<optimized out>)
    at
/export/gnu/import/git/gcc-test-master-intel64-native/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/atomic_wait.h:261
#4  std::__detail::__waiter<std::integral_constant<bool, true>
>::_M_do_wait_v<unsigned int, std::__atomic_impl::wait<unsigned int>(unsigned
int const*, std::remove_volatile<unsigned int>::type,
std::memory_order)::{lambda()#1}>(unsigned int,
std::__atomic_impl::wait<unsigned int>(unsigned int const*,
std::remove_volatile<unsigned int>::type, std::memory_order)::{lambda()#1})
(__vfn=..., 
    __old=42, this=<synthetic pointer>)
    at
/export/gnu/import/git/gcc-test-master-intel64-native/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/atomic_wait.h:400
#5  std::__atomic_wait_address_v<unsigned int,
std::__atomic_impl::wait<unsigned int>(unsigned int const*,
std::remove_volatile<unsigned int>::type,
std::memory_order)::{lambda()#1}>(unsigned int const*, unsigned int,
std::__atomic_impl::wa--Type <RET> for more, q to quit, c to continue without
paging--
it<unsigned int>(unsigned int const*, std::remove_volatile<unsigned int>::type,
std::memory_order)::{lambda()#1}) (__addr=0xffeb402c, __old=42, __vfn=...)
    at
/export/gnu/import/git/gcc-test-master-intel64-native/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/atomic_wait.h:430
#6  0x08049ef2 in std::__atomic_impl::wait<unsigned int> (
    __m=std::memory_order::seq_cst, __old=<optimized out>, 
    __ptr=<optimized out>)
    at
/export/gnu/import/git/gcc-test-master-intel64-native/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/atomic_base.h:1018
#7  std::__atomic_ref<unsigned int, true, false>::wait (
    __m=std::memory_order::seq_cst, __old=<optimized out>, this=0xffeb4034)
    at
/export/gnu/import/git/gcc-test-master-intel64-native/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/include/bits/atomic_base.h:1570
#8  test<unsigned int> (va=0, vb=42)
    at
/export/gnu/import/git/gcc-test-master-intel64-native/src-master/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc:44
#9  0x0804926b in main ()
    at
/export/gnu/import/git/gcc-test-master-intel64-native/src-master/libstdc++-v3/testsuite/29_atomics/atomic_ref/wait_notify.cc:54
(gdb) 

GCC was configured with

--with-arch=native --with-cpu=native --prefix=/usr/12.0.0 --enable-clocale=gnu
--with-system-zlib --enable-shared --enable-cet --with-demangler-in-ld
--enable-libmpx --with-multilib-list=m32,m64,mx32 --with-fpmath=sse

It happens about once a few weeks.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-12-28 20:08 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-03 18:30 [Bug target/101761] New: Random hang with 29_atomics/atomic_ref/wait_notify.cc hjl.tools at gmail dot com
2021-08-03 18:55 ` [Bug target/101761] " ubizjak at gmail dot com
2021-08-04 15:50 ` ubizjak at gmail dot com
2021-08-04 15:53 ` redi at gcc dot gnu.org
2021-09-08  1:04 ` rodgertq at gcc dot gnu.org
2021-09-15  8:56 ` fw at gcc dot gnu.org
2021-09-15 18:40 ` rodgertq at gcc dot gnu.org
2021-09-15 18:48 ` redi at gcc dot gnu.org
2021-09-15 18:50 ` fw at gcc dot gnu.org
2021-09-15 18:52 ` redi at gcc dot gnu.org
2021-09-15 18:54 ` redi at gcc dot gnu.org
2021-09-15 18:55 ` redi at gcc dot gnu.org
2021-09-15 18:56 ` rodgertq at gcc dot gnu.org
2021-09-16 19:04 ` redi at gcc dot gnu.org
2021-09-16 21:48 ` cvs-commit at gcc dot gnu.org
2021-10-06 23:41 ` hjl.tools at gmail dot com
2021-10-07  6:45 ` redi at gcc dot gnu.org
2021-10-12 10:59 ` cvs-commit at gcc dot gnu.org
2022-12-28 20:08 ` [Bug testsuite/101761] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).