http://bugs.winehq.org/show_bug.cgi?id=10249
Summary: Battlefield2/SafeDisc 4.x and Punkbuster services cause
lockup: child processes debugging misconception
Product: Wine
Version: CVS/GIT
Platform: PC
OS/Version: Linux
Status: UNCONFIRMED
Severity: major
Priority: P2
Component: wine-kernel
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: focht(a)gmx.net
Created an attachment (id=8876)
--> (http://bugs.winehq.org/attachment.cgi?id=8876)
WINEDEBUG=-all,+server,+tid,+loaddll,+seh wine ./BF2.exe +fullscreen 0 +szx 800
+szy 600 &>/tmp/debug_pipe
Hello,
while testing some PunkBuster stuff on popular games, I came across Battlefield
2 which employs SafeDisc 4.x
It seems there is a problem with debuggers in chained child processes.
Consider following scenario:
--- snip process list ---
pid threads parent executable (all id:s are in hex)
0000001b 1 00000008 'PnkBstrA.exe'
0000000c 2 00000008 'explorer.exe'
0000000a 2 00000008 '~e5.0001'
00000008 4 00000000 'BF2.exe'
--- snip process list ---
--- snip thread list ---
process tid prio (all id:s are in hex)
0000001b
0000001c 0
0000000c
00000010 0
0000000d 0
0000000a
00000012 0
0000000b 0
00000008
0000001a 1
00000014 15
00000013 0
00000009 0
--- snip thread list ---
"BF2.exe" = parent (game)
"~e5.0001" = 1st child = SafeDisc 4.x process = "debugger"
"PnkBstrA.exe" = 2nd child = PunkBuster Update Service
The 1st child acts as debugger for the parent "BF2.exe" and receives all debug
events (process, thread creation, dll load/unload...)
There are lots of breakpoint events triggered from parent.
This is part of SafeDisc 4.x and used for on-the-fly decryption of code
sections (child decrypts code of father).
When PunkBuster is initialized (loading of pbcl = client, pbag = agent), the
following services should get started: PnkBstrA.exe, PnkBstrB.exe and finally
the kmode driver PnkBstrK.exe
The service process "PnkBstrA.exe" is started from main process "BF2.exe"
(which is a debuggee itself).
No debug flags (DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS) are specified in
process creation flags.
The debugger (child of parent, receives the process creation event) does not
make debugger_attach() to the newly created child process.
The child process seems to inherit the state of being a "debuggee": wine server
-> new_process -> set_process_debugger( process, parent->debugger );
The parent got its process->debugger from debugger_attach().
This leads to a problem in child process startup code:
"dlls/kernel32/process.c:start_process()" checks the PEB->BeingDebugged field
and if set, a system breakpoint is encountered before the entry code is called.
This breakpoint results in debug event - seen by debugger.
Unfortunately this event is _not_ expected by debugger because it didn't expect
another debuggee (child) to be created.
Ok, long story short solution: If you debug a process by attaching to an
already created process, you _must_ treat default debugging flags as if the
process has been created with DEBUG_ONLY_THIS_PROCESS, meaning that all childs
created by debuggee will NOT automagically become debuggees.
Short and (hopefully) acceptable patch snippet:
--- snip ---
diff --git a/server/debugger.c b/server/debugger.c
index a64a17a..c59f3a0 100644
--- a/server/debugger.c
+++ b/server/debugger.c
@@ -444,6 +444,7 @@ static int debugger_attach( struct process *process, struct
thread *debugger )
resume_process( process );
return 0;
}
+ process->create_flags |= DEBUG_ONLY_THIS_PROCESS;
return 1;
error:
--- snip ---
And yes, the patch (snippet) works as intended (tm) ;-)
Attached for sake of completeness is relevant server trace.
Search for "001c:trace:seh:raise_exception code=80000003 flags=0
addr=0x7b870ed8 " to the point where the entry system breakpoint is triggered.
Regards
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=20230
Summary: GetThreadTimes() and the Actual and Pseudo Current
Thread Handles
Product: Wine
Version: 1.1.30
Platform: PC
URL: http://rh-software.com
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ntdll
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: ray(a)pobox.co.uk
Some time ago I had an issue with SIV being unable to read the thread CPU time
usage when using GetThreadTimes(). I tracked down to the following and then did
a work-a-round.
The "Current Thread" effectively has 2 current thread handles, these are the
actual thread handle and the ~0 pseudo handle as returned by
GetCurrentThread(). When a call is made to GetThreadTimes() this calls
NtQueryInformationThread( ThreadTimes ) which contains the test "if (handle ==
GetCurrentThread())". As a result of this when GetThreadTimes() is called with
the actual thread handle no data is returned.
\WINE-1.1.30\dlls\ntdll\thread.c(1011): if (handle == GetCurrentThread())
I suspect the code should be changed to allow both the pseudo and actual thread
handles to be used as a minimum, better still would, when possible, be to
implement this function for any thread.
While searching the source I also noticed:
NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
LPCVOID data, ULONG length )
{
NTSTATUS status;
switch(class)
{
case ThreadZeroTlsCell:
if (handle == GetCurrentThread())
And suspect that code would benefit from a similar fix.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23431
Summary: provide a stub for ntdll.NtSystemDebugControl()
(Ollydbg 2.x)
Product: Wine
Version: 1.2-rc5
Platform: x86
URL: http://www.ollydbg.de/version2.html
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: ntdll
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: focht(a)gmx.net
Hello,
a simple one...
Ollydbg 2.x uses NtSystemDebugControl( DebugSysReadVirtual, ...) to read kernel
memory (driver/OS address space) for informational purposes.
Failure to do so doesn't cause harm.
Although this approach doesn’t require any additional kernel driver (only the
SeDebugPrivilege privilege on the running process) it's only useful for Windows
XP systems. It's disallowed since Windows Vista/Windows 7.
Not really useful in Wine but it obviously needs a stub.
--- snip ---
wine: Call from 0x7bc3d2d0 to unimplemented function
ntdll.dll.NtSystemDebugControl, aborting
First chance exception: unimplemented function ntdll.dll.NtSystemDebugControl
called in 32-bit code (0x7bc3d2d0).
...
=>0 0x7bc3d2d0 __wine_spec_unimplemented_stub+0x50(module="ntdll.dll",
function="NtSystemDebugControl")
[/opt/wine/wine-build/dlls/ntdll/../../../wine-git/dlls/ntdll/exception.c:268]
in ntdll (0x00334434)
1 0x7bc1f895 __wine_stub_NtSystemDebugControl+0x28() in ntdll (0x00334434)
2 0x004467ae in ollydbg (+0x467ad) (0x00334460)
3 0x0044698b in ollydbg (+0x4698a) (0x00334484)
--- snip ---
Dump params and return STATUS_NOT_IMPLEMENTED to keep it running ;-)
Regards
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27222
Summary: dbghelp.dll.SymEnumSourceFilesW needed (ollydbg2)
Product: Wine
Version: 1.3.20
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: dbghelp
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: focht(a)gmx.net
Hello,
while attaching to a target using JIT (replacing winedbg), the following crash
occurred:
--- snip ---
wine: Call from 0x7b838aa3 to unimplemented function
dbghelp.dll.SymEnumSourceFilesW, aborting
--- snip ---
A stub keeps it from crashing (though it should not be hard to implement a wide
character version).
+tid,+dbghelp:
--- snip ---
...
fixme:dbghelp:SymEnumSourceFilesW 0x58 400000 (null) 0x4c06d8 0x400000: stub!
fixme:dbghelp:SymEnumSourceFilesW 0x58 68350000 (null) 0x4c06d8 0x68350000:
stub!
fixme:dbghelp:SymEnumSourceFilesW 0x58 68490000 (null) 0x4c06d8 0x68490000:
stub!
fixme:dbghelp:SymEnumSourceFilesW 0x58 68530000 (null) 0x4c06d8 0x68530000:
stub!
fixme:dbghelp:SymEnumSourceFilesW 0x58 68590000 (null) 0x4c06d8 0x68590000:
stub!
fixme:dbghelp:SymEnumSourceFilesW 0x58 685b0000 (null) 0x4c06d8 0x685b0000:
stub!
fixme:dbghelp:SymEnumSourceFilesW 0x58 685f0000 (null) 0x4c06d8 0x685f0000:
stub!
...
--- snip ---
Regards
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=27802
Summary: ollydbg2 crashes on unimpl
dbghelp.dll.SymEnumSourceLinesW stub
Product: Wine
Version: 1.3.24
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: dbghelp
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: focht(a)gmx.net
Hello,
ollydbg2 crashes when trying to display source:
--- snip ---
...
wine: Call from 0x7b8384bb to unimplemented function
dbghelp.dll.SymEnumSourceLinesW, aborting
--- snip ---
Stop at process main (dlls along with their debug syms loaded).
"View" -> "Source Files" -> double click any source file
$ wine --version
wine-1.3.24-174-g4b4dd30
Regards
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=28075
Summary: total commander ultima prime 5.5 does not start
Product: Wine
Version: 1.3.26
Platform: x86-64
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: -unknown
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: martin.suc(a)googlemail.com
Hi,
Total commander ultima prime version 5.5 has been installed but did not
start.
Error: The program TC UP.exe has encountered a serious problem and needs to be
close.
If you can please let me know how to investigate to give you more
information.
Kind Regards,
Martin
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=13249
Summary: Putty: Yes/No/Cancel dialog moving with keyboard arrows
Product: Wine
Version: unspecified
Platform: Other
OS/Version: other
Status: UNCONFIRMED
Severity: trivial
Priority: P2
Component: -unknown
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: munozferna(a)gmail.com
I was trying to create an automated test for putty, and I noticed that there is
a problem between the Cancel and No button on a Yes/No/Cancel dialog. There
seem to be '2' controls between them when you move through the buttons with the
keyboard arrows. This dialog appears when establishing a connection to a
server, putty asks for a confirmation to accept rsa2 keys. I also noticed that
the OK / Cancel dialog seems to have 'two' more tabs position, so instead of
going to OK when you press arrow key on Cancel, it goes 'nowhere' two times. If
you use the tab key it seems to work fine. I am currently using wine-1.0-rc1.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=16058
Summary: thumbnail view in total commander does not work
correctly
Product: Wine
Version: 0.9.46.
Platform: Other
OS/Version: other
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: -unknown
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: d-84(a)bk.ru
Created an attachment (id=17284)
--> (http://bugs.winehq.org/attachment.cgi?id=17284)
thumbnail view
thumbnail view in total commander does not work correctly
os is ubuntu 7.10,
wine is 0.9.46-0ubuntu1
total commander is 7.02a and 7.01.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=22676
Summary: The icon of some applications does not show up in the
Gnome panel (affects Total Commander 7.50a, µTorrent
2.0.1)
Product: Wine
Version: 1.1.43
Platform: x86-64
URL: http://www.ghisler.com/amazons3.php
OS/Version: Linux
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: -unknown
AssignedTo: wine-bugs(a)winehq.org
ReportedBy: alexandru.balut(a)gmail.com
Created an attachment (id=27926)
--> (http://bugs.winehq.org/attachment.cgi?id=27926)
Wine apps as they show up in Window List in the Gnome panel
Start Total Commander 7.50a, notice the application appears in the Window List
component of the Gnome panel, but it has no icon. (See screenshot). Same
happens with uTorrent 2.0.1.
Foobar2000 1.0 works fine.
Ubuntu 10.04 64 and Ubuntu 9.10 64.
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.