Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
--with-arch=pentium4 --with-tune=core-avx-i I only use it for some popurse or perf. (Some lto needs -msse2, or will cause compiler ICE.) --enable-cxx-flags='-fno-function-sections -fno-data-sections' At present, MinGW target linker can't support --gc-sections, so -fno-function-sections -fno-data-sections is not effective, and will increase code size. Kai has a patch to solve it, but after my test, something is wrong with gcc4.7, I will check it again some time. Ruben has explained other options. And I don't know where is your problem, can you try my built : http://pcxprj.googlecode.com/files/MinGW64CRT_gcc4.7.3release_sse2static_win32.7z On Fri, May 3, 2013 at 1:53 AM, LRN lrn1...@gmail.com wrote: On 01.05.2013 18:56, xunxun wrote: 于 2013/5/1 星期三 21:15, LRN 写道: On 01.05.2013 10:32, xunxun wrote: On Wed, May 1, 2013 at 3:13 AM, LRN lrn1...@gmail.com wrote: On 30.04.2013 19:18, xunxun wrote: 于 2013/4/24 星期三 19:12, LRN 写道: msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? He pastebinned that patch at 2013-04-22 15:24:19 (that pastebin is no longer alive, so i've attached the copy that i've got back then). And what's your gettext configure option? I don't know whether gettext has one option which can only use pthread lib but not use openmp. - --prefix=${prefix} \ - --enable-shared --enable-static --enable-silent-rules \ - --enable-threads=win32 \ - --with-included-gettext --with-included-glib --with-included-libcroco \ - --with-included-unistring --with-included-libxml \ - --disable-rpath \ - --without-emacs --disable-native-java --disable-curses \ and i've added --disable-openmp for now, to work around this problem. Now that you've mentioned it, maybe i should use --enable-threads=posix with openmp? Maybe using posix thread is right. And I use my built gettext, but can't reproduce the issue (when running msgmerge.exe --update -q nul nul) I use static winpthread and static posix gcc 4.7.3. My gettext configure option is : ./configure --prefix=/mingw/gettext \ --disable-shared --enable-static \ --enable-threads=posix \ --with-included-gettext --with-included-glib --with-included-libcroco \ --with-included-unistring --with-included-libxml \ --disable-rpath --disable-nls \ --without-emacs --disable-native-java --disable-curses \ --enable-relocate My winpthread configure option is : ./configure --prefix=/mingw --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --enable-static --disable-shared My gcc configure option is : ../gcc-4.7.3/configure --prefix=/mingw \ --with-arch=pentium4 --with-tune=core-avx-i \ --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 \ --with-lto-plugin --with-host-libstdcxx=-lstdc++ --disable-bootstrap --disable-werror \ --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=posix --enable-libstdcxx-threads --enable-libstdcxx-time --enable-lto --with-system-zlib --with-libiconv \ --enable-version-specific-runtime-libs --enable-fully-dynamic-string --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-graphite \ --disable-sjlj-exceptions --with-dwarf2 --disable-symvers --enable-checking=release --enable-cxx-flags='-fno-function-sections -fno-data-sections' \ --enable-cloog-backend=isl --disable-shared --enable-static --disable-win32-registry --disable-rpath --enable-plugins \ --enable-libquadmath-support --enable-libquadmath --disable-multilib --disable-ppl-version-check --disable-cloog-version-check --with-gnu-as --with-gnu-ld \ --disable-nls
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04.05.2013 06:39, xunxun wrote: And I don't know where is your problem, can you try my built : http://pcxprj.googlecode.com/files /MinGW64CRT_gcc4.7.3release_sse2static_win32.7z I'm gearing towards 4.8.0, and shared. 4.8.0 is not really a requirement (new version has some nice properties, but i can live with 4.7.x as well), but shared is. - -- O ascii ribbon - stop html email! - www.asciiribbon.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (MingW32) iQEcBAEBAgAGBQJRhHlpAAoJEOs4Jb6SI2CwoHAH/3IuAc8NTfV3QUJ9Gc31D2TY qbBB8oz/5hMkYHdGNd5IkUriwdRLs49GGGnYvp5GLiLQhQ/iDB57KVZknwZ63w7g JTgFyiTbySHvPvDMAlVEMTLIAH5idubRCpRjCxRn5C94UVKdUUx4af2Qd92caIgK 4Z3Lg5csmhc90BcQc7m+aJ9EPz4OF2sNW2CDHOFEyCu5xw2xk55WO90CrxdBFPlj 8LF4jzxgilnKHDCn+xu6Inp2TkOdGU+C/smu/FLqn9kxdn1riAfoGe+EeJXoeAMt OOIAiCRsnScMb5uDRqd/bpFMqTNCieCgq6bUFjrEGFl7M5L/JyHO1svGxKZQi48= =HRmu -END PGP SIGNATURE- -- Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
On 01.05.2013 18:56, xunxun wrote: 于 2013/5/1 星期三 21:15, LRN 写道: On 01.05.2013 10:32, xunxun wrote: On Wed, May 1, 2013 at 3:13 AM, LRN lrn1...@gmail.com wrote: On 30.04.2013 19:18, xunxun wrote: 于 2013/4/24 星期三 19:12, LRN 写道: msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? He pastebinned that patch at 2013-04-22 15:24:19 (that pastebin is no longer alive, so i've attached the copy that i've got back then). And what's your gettext configure option? I don't know whether gettext has one option which can only use pthread lib but not use openmp. - --prefix=${prefix} \ - --enable-shared --enable-static --enable-silent-rules \ - --enable-threads=win32 \ - --with-included-gettext --with-included-glib --with-included-libcroco \ - --with-included-unistring --with-included-libxml \ - --disable-rpath \ - --without-emacs --disable-native-java --disable-curses \ and i've added --disable-openmp for now, to work around this problem. Now that you've mentioned it, maybe i should use --enable-threads=posix with openmp? Maybe using posix thread is right. And I use my built gettext, but can't reproduce the issue (when running msgmerge.exe --update -q nul nul) I use static winpthread and static posix gcc 4.7.3. My gettext configure option is : ./configure --prefix=/mingw/gettext \ --disable-shared --enable-static \ --enable-threads=posix \ --with-included-gettext --with-included-glib --with-included-libcroco \ --with-included-unistring --with-included-libxml \ --disable-rpath --disable-nls \ --without-emacs --disable-native-java --disable-curses \ --enable-relocate My winpthread configure option is : ./configure --prefix=/mingw --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --enable-static --disable-shared My gcc configure option is : ../gcc-4.7.3/configure --prefix=/mingw \ --with-arch=pentium4 --with-tune=core-avx-i \ --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 \ --with-lto-plugin --with-host-libstdcxx=-lstdc++ --disable-bootstrap --disable-werror \ --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=posix --enable-libstdcxx-threads --enable-libstdcxx-time --enable-lto --with-system-zlib --with-libiconv \ --enable-version-specific-runtime-libs --enable-fully-dynamic-string --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-graphite \ --disable-sjlj-exceptions --with-dwarf2 --disable-symvers --enable-checking=release --enable-cxx-flags='-fno-function-sections -fno-data-sections' \ --enable-cloog-backend=isl --disable-shared --enable-static --disable-win32-registry --disable-rpath --enable-plugins \ --enable-libquadmath-support --enable-libquadmath --disable-multilib --disable-ppl-version-check --disable-cloog-version-check --with-gnu-as --with-gnu-ld \ --disable-nls --with-pkgversion=pcx32 I don't know where is your problem, but you can try --enable-threads=posix to build gettext first. ( Maybe static winpthread is better? ) Tried building gcc (well, libgcc) posix thread support (surprisingly, it worked - i've built all prerequisites (mingw-w64-headers and crt, binutils, gmp, cloog, etc; and winpthreads) with rubenvb's compiler, then built gcc itself practically in one go!) AND building gettext with openmp threads=posix. The problem with msgmerge remains :( I'm looking at your gcc configure, and things that caught my attention are: --with-arch=pentium4 --with-tune=core-avx-i Can it influence the code generation? I have no arch or tune options (so i guess a default is chosen; what is the default here?) --with-host-libstdcxx=-lstdc++ I've used it before,
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
2013/5/2 LRN lrn1...@gmail.com On 01.05.2013 18:56, xunxun wrote: 于 2013/5/1 星期三 21:15, LRN 写道: On 01.05.2013 10:32, xunxun wrote: On Wed, May 1, 2013 at 3:13 AM, LRN lrn1...@gmail.com wrote: On 30.04.2013 19:18, xunxun wrote: 于 2013/4/24 星期三 19:12, LRN 写道: msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? He pastebinned that patch at 2013-04-22 15:24:19 (that pastebin is no longer alive, so i've attached the copy that i've got back then). And what's your gettext configure option? I don't know whether gettext has one option which can only use pthread lib but not use openmp. - --prefix=${prefix} \ - --enable-shared --enable-static --enable-silent-rules \ - --enable-threads=win32 \ - --with-included-gettext --with-included-glib --with-included-libcroco \ - --with-included-unistring --with-included-libxml \ - --disable-rpath \ - --without-emacs --disable-native-java --disable-curses \ and i've added --disable-openmp for now, to work around this problem. Now that you've mentioned it, maybe i should use --enable-threads=posix with openmp? Maybe using posix thread is right. And I use my built gettext, but can't reproduce the issue (when running msgmerge.exe --update -q nul nul) I use static winpthread and static posix gcc 4.7.3. My gettext configure option is : ./configure --prefix=/mingw/gettext \ --disable-shared --enable-static \ --enable-threads=posix \ --with-included-gettext --with-included-glib --with-included-libcroco \ --with-included-unistring --with-included-libxml \ --disable-rpath --disable-nls \ --without-emacs --disable-native-java --disable-curses \ --enable-relocate My winpthread configure option is : ./configure --prefix=/mingw --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --enable-static --disable-shared My gcc configure option is : ../gcc-4.7.3/configure --prefix=/mingw \ --with-arch=pentium4 --with-tune=core-avx-i \ --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 \ --with-lto-plugin --with-host-libstdcxx=-lstdc++ --disable-bootstrap --disable-werror \ --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=posix --enable-libstdcxx-threads --enable-libstdcxx-time --enable-lto --with-system-zlib --with-libiconv \ --enable-version-specific-runtime-libs --enable-fully-dynamic-string --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-graphite \ --disable-sjlj-exceptions --with-dwarf2 --disable-symvers --enable-checking=release --enable-cxx-flags='-fno-function-sections -fno-data-sections' \ --enable-cloog-backend=isl --disable-shared --enable-static --disable-win32-registry --disable-rpath --enable-plugins \ --enable-libquadmath-support --enable-libquadmath --disable-multilib --disable-ppl-version-check --disable-cloog-version-check --with-gnu-as --with-gnu-ld \ --disable-nls --with-pkgversion=pcx32 I don't know where is your problem, but you can try --enable-threads=posix to build gettext first. ( Maybe static winpthread is better? ) Tried building gcc (well, libgcc) posix thread support (surprisingly, it worked - i've built all prerequisites (mingw-w64-headers and crt, binutils, gmp, cloog, etc; and winpthreads) with rubenvb's compiler, then built gcc itself practically in one go!) AND building gettext with openmp threads=posix. The problem with msgmerge remains :( I'm looking at your gcc configure, and things that caught my attention are: --with-arch=pentium4 --with-tune=core-avx-i Can it influence the code generation? I
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02.05.2013 22:08, Ruben Van Boxem wrote: 2013/5/2 LRN lrn1...@gmail.com I'm looking at your gcc configure, and things that caught my attention are: --disable-sjlj-exceptions I'm enabling them instead. My gcc uses sjlj instead of dw Don't do this for x64 GCC 4.8. It has a fancy new seh implementation which beats both alternatives in speed and compatibility. We're discussing i686 here, so it's either sjlj or dw2 (unless ktietz impelemts SEH for i686...) - -- O ascii ribbon - stop html email! - www.asciiribbon.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (MingW32) iQEcBAEBAgAGBQJRgt7tAAoJEOs4Jb6SI2CwtHwIAI4SeY1XkNyjBBXSnkGomt5d r5kCGcAesjlwrx4LtlZAENPZftHmGvEksGRY6ZZ6BEAW39adyBSV7Mp6LDDm2Cku ikftpCwAfAvBQkc/zMJOtwTuuAICgc6RDJMTfdmkv5t9B2aTQ/9lLgOpYm5cQ5ge ONYSgWY1K+jH75u7TSEPhi0gmOl0fOlfl6+yC48AoW7Q+7w/ViSppvek//rluGB+ YbpR50acL/6BkI2WA26Hnjd9ARzg9Ta7CBnQ6w17OtBg4FL2NqXqPf9udbj5UJ7S opQINKwCBy5X0xMfHEBsf6hl2o+vHa0LnCLQyuK6sBZjQkCMFbociMaC+iyE/kE= =OxIO -END PGP SIGNATURE- -- Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
And what's your gettext configure option? I don't know whether gettext has one option which can only use pthread lib but not use openmp. On Wed, May 1, 2013 at 3:13 AM, LRN lrn1...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30.04.2013 19:18, xunxun wrote: 于 2013/4/24 星期三 19:12, LRN 写道: msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? He pastebinned that patch at 2013-04-22 15:24:19 (that pastebin is no longer alive, so i've attached the copy that i've got back then). -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (MingW32) iQEcBAEBAgAGBQJRgBe8AAoJEOs4Jb6SI2Cw5JkH/iXMAh3sNF/xo5em8WcnjAMz Ew+ABAu53BBnw4Bxwvmyt/5tm7f6REhtxMPqwO8JcWDYtO05cWx7lV7VV+aTeldi BNvbQMqwrvdr17VKVrTPkq1sTGTDpnB+rPs8eUfPy+B4bACvbj20x9cZMqbJY1ih LZEeKWTvBgQ9DLb63BmKejem5XD34iITBmi5Vqh5+d8X/Knhnrb/Tk5XY2L0znI0 oMUL6ACblH2EI5uuCGNrL71oO9E2ysBJwtYYAa7UnNoma+2FZWdDdDH8Vf46Ed4g HJc70GGp09sMi+vabVwUAI2/09J7a8NAF/WXTQ8NIJkpvhGvINIwpg9hrVUlze8= =g7W6 -END PGP SIGNATURE- -- Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with 2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- Best Regards, xunxun -- Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with 2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01.05.2013 10:32, xunxun wrote: On Wed, May 1, 2013 at 3:13 AM, LRN lrn1...@gmail.com wrote: On 30.04.2013 19:18, xunxun wrote: 于 2013/4/24 星期三 19:12, LRN 写道: msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? He pastebinned that patch at 2013-04-22 15:24:19 (that pastebin is no longer alive, so i've attached the copy that i've got back then). And what's your gettext configure option? I don't know whether gettext has one option which can only use pthread lib but not use openmp. - --prefix=${prefix} \ - --enable-shared --enable-static --enable-silent-rules \ - --enable-threads=win32 \ - --with-included-gettext --with-included-glib --with-included-libcroco \ - --with-included-unistring --with-included-libxml \ - --disable-rpath \ - --without-emacs --disable-native-java --disable-curses \ and i've added --disable-openmp for now, to work around this problem. Now that you've mentioned it, maybe i should use --enable-threads=posix with openmp? - -- O ascii ribbon - stop html email! - www.asciiribbon.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (MingW32) iQEcBAEBAgAGBQJRgRV9AAoJEOs4Jb6SI2CwZUMIAJHXbx5pZMjmwXZsJD4Z1V4R h/tbQd/Ihd/NsT9/1syt5o/PwrtfX72oIPx1vPQvbnNTG2chOJL77QbtjcmatBUE pWqxIJJeq18WydCvtONz/o+VBdrZ1zdWNosaGlygw7PZmLWcLNV+sDwJQhxqRrcs szgnyODBP/VVn9ADuZydfsBz0VfnvS3E/LyIEloLV43Xnzr5hgIXLVFGMVKQXr0E maRZaLygplLbuj2A4EBgcb/xMWKNtEWX2hoUHIk0KAL8pxOe1NI6bSOils4PidIK itYFHTcx24Zrg4Jw8IxMExqf9N4YfEgb6Ggm7yS2OCkXNCbL7MB5eWIs1+hEPkE= =9NRU -END PGP SIGNATURE- -- Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with 2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
于 2013/5/1 星期三 21:15, LRN 写道: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01.05.2013 10:32, xunxun wrote: On Wed, May 1, 2013 at 3:13 AM, LRN lrn1...@gmail.com wrote: On 30.04.2013 19:18, xunxun wrote: 于 2013/4/24 星期三 19:12, LRN 写道: msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? He pastebinned that patch at 2013-04-22 15:24:19 (that pastebin is no longer alive, so i've attached the copy that i've got back then). And what's your gettext configure option? I don't know whether gettext has one option which can only use pthread lib but not use openmp. - --prefix=${prefix} \ - --enable-shared --enable-static --enable-silent-rules \ - --enable-threads=win32 \ - --with-included-gettext --with-included-glib --with-included-libcroco \ - --with-included-unistring --with-included-libxml \ - --disable-rpath \ - --without-emacs --disable-native-java --disable-curses \ and i've added --disable-openmp for now, to work around this problem. Now that you've mentioned it, maybe i should use --enable-threads=posix with openmp? Maybe using posix thread is right. And I use my built gettext, but can't reproduce the issue (when running msgmerge.exe --update -q nul nul) I use static winpthread and static posix gcc 4.7.3. My gettext configure option is : ./configure --prefix=/mingw/gettext \ --disable-shared --enable-static \ --enable-threads=posix \ --with-included-gettext --with-included-glib --with-included-libcroco \ --with-included-unistring --with-included-libxml \ --disable-rpath --disable-nls \ --without-emacs --disable-native-java --disable-curses \ --enable-relocate My winpthread configure option is : ./configure --prefix=/mingw --host=i686-w64-mingw32 --build=i686-w64-mingw32 --target=i686-w64-mingw32 --enable-static --disable-shared My gcc configure option is : ../gcc-4.7.3/configure --prefix=/mingw \ --with-arch=pentium4 --with-tune=core-avx-i \ --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 \ --with-lto-plugin --with-host-libstdcxx=-lstdc++ --disable-bootstrap --disable-werror \ --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=posix --enable-libstdcxx-threads --enable-libstdcxx-time --enable-lto --with-system-zlib --with-libiconv \ --enable-version-specific-runtime-libs --enable-fully-dynamic-string --disable-libstdcxx-pch --disable-libstdcxx-debug --enable-graphite \ --disable-sjlj-exceptions --with-dwarf2 --disable-symvers --enable-checking=release --enable-cxx-flags='-fno-function-sections -fno-data-sections' \ --enable-cloog-backend=isl --disable-shared --enable-static --disable-win32-registry --disable-rpath --enable-plugins \ --enable-libquadmath-support --enable-libquadmath --disable-multilib --disable-ppl-version-check --disable-cloog-version-check --with-gnu-as --with-gnu-ld \ --disable-nls --with-pkgversion=pcx32 I don't know where is your problem, but you can try --enable-threads=posix to build gettext first. ( Maybe static winpthread is better? ) - -- O ascii ribbon - stop html email! - www.asciiribbon.org -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (MingW32) iQEcBAEBAgAGBQJRgRV9AAoJEOs4Jb6SI2CwZUMIAJHXbx5pZMjmwXZsJD4Z1V4R h/tbQd/Ihd/NsT9/1syt5o/PwrtfX72oIPx1vPQvbnNTG2chOJL77QbtjcmatBUE pWqxIJJeq18WydCvtONz/o+VBdrZ1zdWNosaGlygw7PZmLWcLNV+sDwJQhxqRrcs szgnyODBP/VVn9ADuZydfsBz0VfnvS3E/LyIEloLV43Xnzr5hgIXLVFGMVKQXr0E maRZaLygplLbuj2A4EBgcb/xMWKNtEWX2hoUHIk0KAL8pxOe1NI6bSOils4PidIK itYFHTcx24Zrg4Jw8IxMExqf9N4YfEgb6Ggm7yS2OCkXNCbL7MB5eWIs1+hEPkE= =9NRU -END PGP SIGNATURE- -- Introducing AppDynamics Lite, a
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
于 2013/4/24 星期三 19:12, LRN 写道: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? This hangup happened twice already. Once when i was building gdb (at configure time, when it was creating po/Makefile), another - when i was building gstreamer-1.0-1.0.6 (at configure time, while checking for msgmerge...). Command line in both cases was msgmerge.exe --update -q nul nul or something similar. The code that spins is: while (tmp l-cur) Sleep (0); tmp is a small integer (9 and 37 in two cases i observed), l-cur is a large integer (all 4 bytes are non-zero). -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRd740AAoJEOs4Jb6SI2Cw22EIANMAaktyUjq9EjYysmFX7R6Q Dir0haQ1BivbOsRQnR493ciJWRhbZCVynl3zze06N5oSB1Rb2FT95wOvzfHwvGeN 9/FBCDABOhHgATlA6Xkfj+UCL+g9Wfi6AGbXb69Vwz8FUz4JPPFcysDVNLclg/Vq lACg0XgUZ3JoC8NXKBECPhGZcbLJI8iecS63pN7q9Vg9B4y9aSr6789i/6eslppV gP0iYbwTa4cmyWM6U82iOKkK9lThjzlzV0FeMfHIsqTa9jP+T3SwD5TiyBmpbB0q mpePhFy3VhSJh2gKHWeQWM9Ya2SG+o9UNpBlwqDBgKjmBSjRov8fulPi7cOlffY= =nYi+ -END PGP SIGNATURE- -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- Best Regards, xunxun -- Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with 2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
于 2013/4/30 星期二 23:18, xunxun 写道: I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? And I remembered Kai recommended to change libgomp team.c team = gomp_malloc (size) to team = gomp_malloc_cleared (size) ago. -- Best Regards, xunxun -- Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with 2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] OpenMP-related hangup with winpthreads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 30.04.2013 19:18, xunxun wrote: 于 2013/4/24 星期三 19:12, LRN 写道: msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. Where is the libgomp patches? He pastebinned that patch at 2013-04-22 15:24:19 (that pastebin is no longer alive, so i've attached the copy that i've got back then). -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (MingW32) iQEcBAEBAgAGBQJRgBe8AAoJEOs4Jb6SI2Cw5JkH/iXMAh3sNF/xo5em8WcnjAMz Ew+ABAu53BBnw4Bxwvmyt/5tm7f6REhtxMPqwO8JcWDYtO05cWx7lV7VV+aTeldi BNvbQMqwrvdr17VKVrTPkq1sTGTDpnB+rPs8eUfPy+B4bACvbj20x9cZMqbJY1ih LZEeKWTvBgQ9DLb63BmKejem5XD34iITBmi5Vqh5+d8X/Knhnrb/Tk5XY2L0znI0 oMUL6ACblH2EI5uuCGNrL71oO9E2ysBJwtYYAa7UnNoma+2FZWdDdDH8Vf46Ed4g HJc70GGp09sMi+vabVwUAI2/09J7a8NAF/WXTQ8NIJkpvhGvINIwpg9hrVUlze8= =g7W6 -END PGP SIGNATURE- Index: libgomp.h === --- a/libgomp/libgomp.h (Revision 198124) +++ b/libgomp/libgomp.h (Arbeitskopie) @@ -378,9 +378,20 @@ static inline struct gomp_thread *gomp_thread (voi } #else extern pthread_key_t gomp_tls_key; +extern void initialize_team (void); +extern void gomp_fatal (const char *, ...) + __attribute__((noreturn, format (printf, 1, 2))); static inline struct gomp_thread *gomp_thread (void) { - return pthread_getspecific (gomp_tls_key); + struct gomp_thread* GompThread = pthread_getspecific (gomp_tls_key); + if (!GompThread) { +initialize_team(); +GompThread = pthread_getspecific (gomp_tls_key); +if (!GompThread) { + gomp_fatal(Uncorrectable NULL gomp_thread()); +} + } + return GompThread; } #endif Index: team.c === --- a/libgomp/team.c (Revision 198124) +++ b/libgomp/team.c (Arbeitskopie) @@ -72,9 +72,12 @@ gomp_thread_start (void *xdata) #ifdef HAVE_TLS thr = gomp_tls_data; #else - struct gomp_thread local_thr; - thr = local_thr; - pthread_setspecific (gomp_tls_key, thr); + struct gomp_thread *Ptr_initial_thread_tls_data; + Ptr_initial_thread_tls_data = +(struct gomp_thread*) calloc(1,sizeof(struct gomp_thread)); + + if (!KeysCreated) pthread_key_create (gomp_tls_key, NULL); + pthread_setspecific (gomp_tls_key, Ptr_initial_thread_tls_data); #endif gomp_sem_init (thr-release, 0); @@ -253,6 +256,9 @@ gomp_free_thread (void *arg __attribute__((unused) gomp_end_task (); free (task); } +#ifndef HAVE_TLS + free(pthread_getspecific (gomp_tls_key)); +#endif } /* Launch a team. */ @@ -529,25 +535,32 @@ gomp_team_end (void) /* Constructors for this file. */ -static void __attribute__((constructor)) +static short KeysCreated = 0; + +void __attribute__((constructor)) initialize_team (void) { struct gomp_thread *thr; #ifndef HAVE_TLS - static struct gomp_thread initial_thread_tls_data; + struct gomp_thread *Ptr_initial_thread_tls_data; + Ptr_initial_thread_tls_data = +(struct gomp_thread*) calloc(1,sizeof(struct gomp_thread)); - pthread_key_create (gomp_tls_key, NULL); - pthread_setspecific (gomp_tls_key, initial_thread_tls_data); + if (!KeysCreated) pthread_key_create (gomp_tls_key, NULL); + pthread_setspecific (gomp_tls_key, Ptr_initial_thread_tls_data); #endif - if (pthread_key_create (gomp_thread_destructor, gomp_free_thread) != 0) -gomp_fatal (could not create thread pool destructor.); + if (!KeysCreated + pthread_key_create (gomp_thread_destructor, gomp_free_thread) != 0) + gomp_fatal (could not create thread pool destructor.); + KeysCreated = 1; + #ifdef HAVE_TLS thr = gomp_tls_data; #else - thr = initial_thread_tls_data; + thr = Ptr_initial_thread_tls_data; #endif gomp_sem_init (thr-release, 0); } Index: testsuite/config/default.exp
[Mingw-w64-public] OpenMP-related hangup with winpthreads
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 msgmerge.exe (from gettext, i guess) hangs up, consuming 100% of a CPU core, this is the backtrace: #0 0x74d53b64 in SleepEx () from C:\Windows\syswow64\KernelBase.dll #1 0x74d54498 in Sleep () from C:\Windows\syswow64\KernelBase.dll #2 0x6494406b in _spin_lite_lock (l=0x64943003 mutex_ref+19) at ../winpthreads-svn-r5792/src/spinlock.c:256 #3 0x0001 in ?? () #4 0x64943003 in mutex_ref (m=0x11, m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:60 #5 0x6494317f in pthread_mutex_lock_intern (timeout=4294967295, m=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:236 #6 pthread_mutex_lock (m=m@entry=0x534fb4) at ../winpthreads-svn-r5792/src/mutex.c:223 #7 0x64943482 in rwlock_gain_both_locks (rwlock=rwlock@entry=0x534fa0) at ../winpthreads-svn-r5792/src/rwlock.c:107 #8 0x64943b5e in pthread_rwlock_wrlock (rwlock_=rwlock_@entry=0x6494f08c) at ../winpthreads-svn-r5792/src/rwlock.c:430 #9 0x64944f26 in pthread_key_delete (key=0) at ../winpthreads-svn-r5792/src/thread.c:739 #10 0x6360da61 in team_destructor () from f:\s31\mingw\bin\libgomp-1.dll #11 0x in ?? () I'm using an svn-r5792 version of winpthreads + libgomp patches from ktietz. This hangup happened twice already. Once when i was building gdb (at configure time, when it was creating po/Makefile), another - when i was building gstreamer-1.0-1.0.6 (at configure time, while checking for msgmerge...). Command line in both cases was msgmerge.exe --update -q nul nul or something similar. The code that spins is: while (tmp l-cur) Sleep (0); tmp is a small integer (9 and 37 in two cases i observed), l-cur is a large integer (all 4 bytes are non-zero). -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRd740AAoJEOs4Jb6SI2Cw22EIANMAaktyUjq9EjYysmFX7R6Q Dir0haQ1BivbOsRQnR493ciJWRhbZCVynl3zze06N5oSB1Rb2FT95wOvzfHwvGeN 9/FBCDABOhHgATlA6Xkfj+UCL+g9Wfi6AGbXb69Vwz8FUz4JPPFcysDVNLclg/Vq lACg0XgUZ3JoC8NXKBECPhGZcbLJI8iecS63pN7q9Vg9B4y9aSr6789i/6eslppV gP0iYbwTa4cmyWM6U82iOKkK9lThjzlzV0FeMfHIsqTa9jP+T3SwD5TiyBmpbB0q mpePhFy3VhSJh2gKHWeQWM9Ya2SG+o9UNpBlwqDBgKjmBSjRov8fulPi7cOlffY= =nYi+ -END PGP SIGNATURE- -- Try New Relic Now We'll Send You this Cool Shirt New Relic is the only SaaS-based application performance monitoring service that delivers powerful full stack analytics. Optimize and monitor your browser, app, servers with just a few lines of code. Try New Relic and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public