http://bugs.winehq.org/show_bug.cgi?id=35061
Bug #: 35061 Summary: Expression: "&get.map.unlocked()==m" Product: Wine-gecko Version: unspecified Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: wine-gecko-unknown AssignedTo: jacek@codeweavers.com ReportedBy: marvin25@telus.net Classification: Unclassified
When trying to install goldcoin-0.7.1.7-win32-setup app the system indicates it needs Gecko and it can auto download. I download but then message is: "Assertion failed" and it shows C:\deps\boost/interprocess/detail/windows_intermodule_sin?eton.hpp Line 145 Please note the question mark above is a letter that I wrote down but can't make it out now.
It also shows Expression: "&get.map.unlocked()==m"
http://bugs.winehq.org/show_bug.cgi?id=35061
Heindrich marvin25@telus.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Expression: |Assertion Failed |"&get.map.unlocked()==m" |
http://bugs.winehq.org/show_bug.cgi?id=35061
--- Comment #1 from Heindrich marvin25@telus.net 2013-12-06 16:09:56 CST --- I did save the log file and sent it at the time of failure of the app.
http://bugs.winehq.org/show_bug.cgi?id=35061
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://gldcoin.com/download | |s/goldcoin-0.7.1.7-win32-se | |tup.exe Keywords| |download Component|wine-gecko-unknown |-unknown CC| |focht@gmx.net AssignedTo|jacek@codeweavers.com |wine-bugs@winehq.org Summary|Assertion Failed |GoldCoin 0.7.1.7 fails to | |install Product|Wine-gecko |Wine Severity|major |normal
http://bugs.winehq.org/show_bug.cgi?id=35061
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|-unknown |ntdll Version|unspecified |1.7.8 Summary|GoldCoin 0.7.1.7 fails to |GoldCoin 0.7.1.7 shows |install |assertion on startup (needs | |ntdll.NtQuerySemaphore | |implementation) Ever Confirmed|0 |1
--- Comment #2 from Anastasius Focht focht@gmx.net 2013-12-06 16:32:47 CST --- Hello folks,
confirming, the assertion is shown on startup. Installation is fine.
Relevant part of trace log:
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/GoldCoin (GLD) ... WINEDEBUG=+tid,+seh,+relay wine ./goldcoin-qt.exe >>log.txt 2>&1 ... 0024:Call KERNEL32.CreateSemaphoreA(00000000,00000000,7fffffff,05b2182c "bipc_gmap_sem_count_35_13030842308.621462") ret=007a9c4d 0024:Ret KERNEL32.CreateSemaphoreA() retval=0000038c ret=007a9c4d 0024:Call KERNEL32.GetLastError() ret=007a9c59 0024:Ret KERNEL32.GetLastError() retval=00000000 ret=007a9c59 0024:Call KERNEL32.CreateSemaphoreA(00000000,00000000,016c7cb0,05b2182c "bipc_gmap_sem_map_35_13030842308.621462") ret=007a9b46 0024:Ret KERNEL32.CreateSemaphoreA() retval=00000390 ret=007a9b46 0024:Call KERNEL32.GetLastError() ret=007a9b52 0024:Ret KERNEL32.GetLastError() retval=00000000 ret=007a9b52 0024:Call KERNEL32.InterlockedCompareExchange(00921e14,00000001,00000000) ret=007a6473 0024:Ret KERNEL32.InterlockedCompareExchange() retval=00000000 ret=007a6473 0024:Call KERNEL32.InterlockedCompareExchange(00921e04,00000001,00000000) ret=007a63bd 0024:Ret KERNEL32.InterlockedCompareExchange() retval=00000000 ret=007a63bd 0024:Call KERNEL32.GetModuleHandleA(0092353f "ntdll.dll") ret=007a63f9 0024:Ret KERNEL32.GetModuleHandleA() retval=7bc10000 ret=007a63f9 0024:Call KERNEL32.InterlockedIncrement(00921e04) ret=007a640c 0024:Ret KERNEL32.InterlockedIncrement() retval=00000002 ret=007a640c 0024:Call KERNEL32.GetProcAddress(7bc10000,009235a7 "NtQuerySemaphore") ret=007a64d9 0024:Ret KERNEL32.GetProcAddress() retval=7bc22010 ret=007a64d9 0024:Call KERNEL32.InterlockedIncrement(00921e14) ret=007a64ec 0024:Ret KERNEL32.InterlockedIncrement() retval=00000002 ret=007a64ec 0024:Call ntdll.NtQuerySemaphore(00000390,00000000,00eef4a8,00000008,00eef4bc) ret=007a9bf6 0024:fixme:ntdll:NtQuerySemaphore (0x390,0,0xeef4a8,0x00000008,0xeef4bc) stub! 0024:Ret ntdll.NtQuerySemaphore() retval=00000000 ret=007a9bf6 0024:Call msvcrt._assert(0092367f "&get_map_unlocked() == m",009235c8 "c:\deps\boost/boost/interprocess/detail/windows_intermodule_singleton.hpp",00000091) ret=007a9c28 ... 0024:Call user32.MessageBoxIndirectW(00eed3a4) ret=7ed5306a --- snip ---
BTW .. that software is ported to various OS (including Linux):
http://gldcoin.com/get-started/
Anyway, good test-case for Wine ;-)
$ sha1sum goldcoin-0.7.1.7-win32-setup.exe 9393b859bbd5b570046c6d3b10ba31c02ddc26e9 goldcoin-0.7.1.7-win32-setup.exe
$ du -sh goldcoin-0.7.1.7-win32-setup.exe 9.4M goldcoin-0.7.1.7-win32-setup.exe
$ wine --version wine-1.7.8-128-g37460b6
Regards
http://bugs.winehq.org/show_bug.cgi?id=35061
--- Comment #3 from Anastasius Focht focht@gmx.net 2013-12-06 16:52:53 CST --- Hello folks,
fortunately the assert gives some hints at the code base and how the semaphore wrapper is implemented/being used.
http://www.boost.org/doc/libs/1_55_0/boost/interprocess/detail/windows_inter...
--- snip --- ... class windows_semaphore_based_map { typedef std::map<std::string, ref_count_ptr> map_type;
public: windows_semaphore_based_map() { ... bool created = false; const permissions & perm = permissions(); std::string pid_creation_time, name; get_pid_creation_time_str(pid_creation_time); name = "bipc_gmap_sem_lock_"; name += pid_creation_time; bool success = m_mtx_lock.open_or_create(name.c_str(), perm); name = "bipc_gmap_sem_count_"; name += pid_creation_time; scoped_lock<winapi_mutex_wrapper> lck(m_mtx_lock); { success = success && m_sem_count.open_or_create ( name.c_str(), static_cast<long>(0), winapi_semaphore_wrapper::MaxCount, perm, created); name = "bipc_gmap_sem_map_"; name += pid_creation_time; success = success && m_sem_map.open_or_create (name.c_str(), initial_count, max_count, perm, created); if(!success){ delete m; //winapi_xxx wrappers do the cleanup... throw int(0); } if(!created){ delete m; } else{ BOOST_ASSERT(&get_map_unlocked() == m); } m_sem_count.post(); } } ... map_type &get_map_unlocked() { if(sizeof(void*) == sizeof(boost::uint32_t)){ union caster_union { void *addr; boost::uint32_t addr_uint32; } caster; caster.addr = 0; caster.addr_uint32 = m_sem_map.limit(); caster.addr_uint32 = caster.addr_uint32 << 2; return *static_cast<map_type*>(caster.addr); } else{ union caster_union { void *addr; boost::uint64_t addr_uint64; } caster; boost::uint32_t max_count(m_sem_map.limit()), initial_count(m_sem_map.value()); //Clear quasi-top bit max_count &= boost::uint32_t(0xBFFFFFFF); caster.addr_uint64 = max_count; caster.addr_uint64 = caster.addr_uint64 << 32; caster.addr_uint64 |= boost::uint64_t(initial_count) << 2; return *static_cast<map_type*>(caster.addr); } }
--- snip ---
http://www.boost.org/doc/libs/1_55_0/boost/interprocess/sync/windows/winapi_...
--- snip --- class winapi_semaphore_functions { ... long limit() const { long l_count, l_limit; if(!winapi::get_semaphore_info(m_sem_hnd, l_count, l_limit)) return 0; return l_limit; } ... --- snip ---
http://www.boost.org/doc/libs/1_55_0/boost/interprocess/detail/win32_api.hpp
--- snip --- inline bool get_semaphore_info(void *handle, long &count, long &limit) { winapi::interprocess_semaphore_basic_information info; winapi::NtQuerySemaphore_t pNtQuerySemaphore =
(winapi::NtQuerySemaphore_t)dll_func::get(winapi::dll_func::NtQuerySemaphore); unsigned int ret_len; long status = pNtQuerySemaphore(handle, winapi::semaphore_basic_information, &info, sizeof(info), &ret_len); count = info.count; limit = info.limit; return !status; } --- snip ---
Wine source: http://source.winehq.org/git/wine.git/blob/4af4df5af3cffd3e1b18932e4fbedbae1...
--- snip --- 214 NTSTATUS WINAPI NtQuerySemaphore( 215 HANDLE SemaphoreHandle, 216 SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass, 217 PVOID SemaphoreInformation, 218 ULONG Length, 219 PULONG ReturnLength) 220 { 221 FIXME("(%p,%d,%p,0x%08x,%p) stub!\n", 222 SemaphoreHandle, SemaphoreInformationClass, SemaphoreInformation, Length, ReturnLength); 223 return STATUS_SUCCESS; 224 } --- snip ---
Regards
http://bugs.winehq.org/show_bug.cgi?id=35061
--- Comment #4 from Dmitry Timoshkov dmitry@baikal.ru 2013-12-06 19:20:53 CST --- Created attachment 46768 --> http://bugs.winehq.org/attachment.cgi?id=46768 patch
Attached patch implements NtQuerySemaphore/SemaphoreBasicInformation.
'tools/make_requests' must be executed after the patch gets applied.
http://bugs.winehq.org/show_bug.cgi?id=35061
Dmitry Timoshkov dmitry@baikal.ru changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=35061
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |bfb4f28dc5f4ddbb4f94b33e50b | |eb7407f08f305 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commit http://source.winehq.org/git/wine.git/commitdiff/bfb4f28dc5f4ddbb4f94b33e50b...
Thanks Dmitry
Regards
https://bugs.winehq.org/show_bug.cgi?id=35061
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.10.
https://bugs.winehq.org/show_bug.cgi?id=35061
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |boissee.stephane@yahoo.fr
--- Comment #7 from Anastasius Focht focht@gmx.net --- *** Bug 44056 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=35061
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL|http://gldcoin.com/download |https://web.archive.org/web |s/goldcoin-0.7.1.7-win32-se |/20140403064912/http://gldc |tup.exe |oin.com/downloads/goldcoin- | |0.7.1.7-win32-setup.exe