Opened 11 years ago

Closed 7 years ago

#6425 closed Bugs (wontfix)

Regression test: prg_exec_fail2 process runs away, mgw64 gcc 4.4, 4.5

Reported by: Jim Bell <jim@…> Owned by: Gennadiy Rozental
Milestone: Boost 1.59.0 Component: test
Version: Boost 1.48.0 Severity: Regression
Keywords: mingw64 gcc4.4 Cc: jim@…

Description

prg_exec_fail2.exe runs away, hogging the CPU. This is part of boost's regression test.

It happens only under MinGW-64, gcc-4.4. (gcc 4.5, 4.6, 4.7 all work). This is likely a problem with the MinGW-64 library, but reported here as it affects boost.test.

Connecting to the runaway-process with gdb, here's what I see.

Trunk regression test...

Reading symbols from G:\boost\GCC\trunk\results\boost\bin.v2\libs\test\test\prg_
exec_fail2.test\gcc-mingw-4.4.7\debug\prg_exec_fail2.exe...done.
[Switching to Thread 2044.0x13b4]
(gdb) bt
#0  0x00000000772c0531 in ntdll!DbgUiContinue ()
   from C:\Windows\SYSTEM32\ntdll.dll
#1  0x0000000077367ef8 in ntdll!EtwEventActivityIdControl ()
   from C:\Windows\SYSTEM32\ntdll.dll
#2  0x0000000000000000 in ?? ()
(gdb) info thread
  Id   Target Id         Frame
* 2    Thread 2044.0x13b4 0x00000000772c0531 in ntdll!DbgUiContinue ()
   from C:\Windows\SYSTEM32\ntdll.dll
  1    Thread 2044.0x1488 0x0000000000401700 in cpp_main ()
    at ..\libs\test\test\prg_exec_fail2.cpp:37
(gdb) thread 1
[Switching to thread 1 (Thread 2044.0x1488)]
#0  0x0000000000401700 in cpp_main ()
    at ..\libs\test\test\prg_exec_fail2.cpp:37
37          return 10 / div;
(gdb) bt
#0  0x0000000000401700 in cpp_main ()
    at ..\libs\test\test\prg_exec_fail2.cpp:37
#1  0x000000000040176f in (anonymous namespace)::cpp_main_caller::operator() (
    this=0x22fd08) at ../boost/test/impl/cpp_main.ipp:49
#2  0x0000000000401f91 in boost::detail::function::function_obj_invoker0<<unname
d>::cpp_main_caller, int>::invoke(boost::detail::function::function_buffer &)
    (function_obj_ptr=...) at ../boost/function/function_template.hpp:132
#3  0x00000000004192ac in boost::function0<int>::operator() (this=0x22fd00)
    at ../boost/function/function_template.hpp:760
#4  0x0000000000414d8a in boost::detail::do_invoke<boost::detail::translator_hol
der_base_ptr, boost::function<int()> >(const boost::detail::translator_holder_ba
se_ptr &, const boost::function<int()> &) (tr=..., F=...)
    at ../boost/test/impl/execution_monitor.ipp:256
#5  0x00000000004025e2 in boost::execution_monitor::catch_signals(const boost::f
unction<int()> &) (this=0x22fcb0, F=...)
    at ../boost/test/impl/execution_monitor.ipp:1152
#6  0x000000000040282d in boost::execution_monitor::execute(const boost::functio
n<int()> &) (this=0x22fcb0, F=...)
    at ../boost/test/impl/execution_monitor.ipp:1183
#7  0x000000000040191b in boost::prg_exec_monitor_main (
    cpp_main=0x4016e0 <cpp_main(int, char**)>, argc=1, argv=0x88ff90)
    at ../boost/test/impl/cpp_main.ipp:77
#8  0x0000000000401e10 in main (argc=1, argv=0x88ff90)
    at ../boost/test/impl/cpp_main.ipp:127

And the release-branch regression test...

Attaching to process 6024
[New Thread 6024.0x1218]
[New Thread 6024.0xba4]
Reading symbols from G:\boost\GCC\release\results\boost\bin.v2\libs\test\test\pr
g_exec_fail2.test\gcc-mingw-4.4.7\debug\prg_exec_fail2.exe...done.
[Switching to Thread 6024.0xba4]
(gdb) bt
#0  0x00000000772c0531 in ntdll!DbgUiContinue ()
   from C:\Windows\SYSTEM32\ntdll.dll
#1  0x0000000077367ef8 in ntdll!EtwEventActivityIdControl ()
   from C:\Windows\SYSTEM32\ntdll.dll
#2  0x0000000000000000 in ?? ()
(gdb) info threads
  Id   Target Id         Frame
* 2    Thread 6024.0xba4 0x00000000772c0531 in ntdll!DbgUiContinue ()
   from C:\Windows\SYSTEM32\ntdll.dll
  1    Thread 6024.0x1218 0x000007fefde1167c in signal ()
   from C:\Windows\system32\msvcrt.dll
(gdb) thread 1
[Switching to thread 1 (Thread 6024.0x1218)]
#0  0x000007fefde1167c in signal () from C:\Windows\system32\msvcrt.dll
(gdb) bt
#0  0x000007fefde1167c in signal () from C:\Windows\system32\msvcrt.dll
#1  0x000000000040925a in __mingw_SEH_error_handler (
    ExceptionRecord=<optimized out>, EstablisherFrame=<optimized out>,
    ContextRecord=0x22ef40, DispatcherContext=0x22e8f0)
    at ../mingw-w64-crt/crt/crt_handler.c:154
#2  0x0000000077299d0d in ntdll!RtlDeleteBarrier ()
   from C:\Windows\SYSTEM32\ntdll.dll
#3  0x0000000000401700 in cpp_main ()
    at ..\libs\test\test\prg_exec_fail2.cpp:37
#4  0x000000000022f750 in ?? ()
#5  0x000000000022f6b0 in ?? ()
#6  0x000000000040176f in (anonymous namespace)::cpp_main_caller::operator() (
    this=0x0) at ../boost/test/impl/cpp_main.ipp:49
#7  0x0000000000050008 in ?? ()
#8  0x0000000000000000 in ?? ()
(gdb)

Change History (2)

comment:1 by Jim Bell <jim@…>, 11 years ago

Summary: Regression test: prg_exec_fail2 process runs away, mgw64 gcc4.4Regression test: prg_exec_fail2 process runs away, mgw64 gcc 4.4, 4.5

Update: this same problem occurs with MinGW-64 gcc 4.5. Both trunk and release test programs seem to remain compute-bound indefinitely (i.e., hog a CPU). Both, when attached with gdb, show a stack-trace just like the above trunk trace.

Note also that the regression test has moved on and didn't kill this task as it should have. (Is that the crux of the issue?)

comment:2 by Gennadiy Rozental, 7 years ago

Milestone: To Be DeterminedBoost 1.59.0
Resolution: wontfix
Status: newclosed

I am not sure if we can do anything about this. If you have specific patch in mind please submit. Otherwise this is either compiler or platform or build system issue

Note: See TracTickets for help on using tickets.