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.
https://bugs.winehq.org/show_bug.cgi?id=48407
Bug ID: 48407
Summary: OllyDbg 2.x segfaults the process after attaching to
it
Product: Wine
Version: 5.0-rc3
Hardware: x86
URL: http://www.ollydbg.de/odbg201.zip
OS: Linux
Status: NEW
Keywords: regression
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs(a)winehq.org
Reporter: gabrielopcode(a)gmail.com
CC: jacek(a)codeweavers.com
Regression SHA1: 4ee629a3bafb1408a4e567908fef949837a39f10
Distribution: ---
Since commit 4ee629a3bafb1408a4e567908fef949837a39f10, OllyDbg will hang after
attaching to a process while the process itself will crash, and the message
`Segmentation fault' is printed in the terminal where the process is launched
from (not OllyDbg).
How to reproduce after downloading OllyDbg (link provided in report) using a
32-bit prefix:
1) Launch a simple window app, such as `winemine'
2) From another terminal, launch OllyDbg in same prefix.
Optionally: To speed up the attaching in OllyDbg, go to
Options->Options->Analysis. In `Automatic Module Analysis' set it to `Off'.
3) In OllyDbg, go to File->Attach and select the process (winemine). Wait a few
seconds until modules are processed, then the process will segfault and OllyDbg
will hang.
I tried to debug this to no avail, it's very unfamiliar territory for me, so
it's a bit over my head.
Reverting that commit on current wine git is not easy and I don't know how to
do it, since the break_process and related functions have been removed from the
wineserver at some point. So unfortunately I don't know where to start to fix
this regression.
--
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.
https://bugs.winehq.org/show_bug.cgi?id=39672
Bug ID: 39672
Summary: Folder names not clickable
Product: Wine
Version: 1.7.55
Hardware: x86-64
OS: Linux
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: -unknown
Assignee: wine-bugs(a)winehq.org
Reporter: strife(a)home.se
Distribution: ---
Created attachment 52892
--> https://bugs.winehq.org/attachment.cgi?id=52892
clicking multiple folder texts
When opening a file, in Rhino3d, nothing happens when you click the names of
the folders, no files shown or updated.
In order to show files you must click the folder icon for anything to update.
Worked in 1.7.4
--
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.
https://bugs.winehq.org/show_bug.cgi?id=39635
Bug ID: 39635
Summary: Hungarian Excel Viewer 2007: "Open" dialog on Win8
does not refresh correctly
Product: Wine
Version: 1.8-rc1
Hardware: x86
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: -unknown
Assignee: wine-bugs(a)winehq.org
Reporter: wylda(a)volny.cz
Distribution: ---
Continuation of bug 33736.
When you set Win version to 8 and then you want to open an XLS file in a
folder, you notice, that the existing file (C:\Users\text.xls) is not listed,
so there is nothing to open.
The problem is, that the folder content does not refresh, even if you right
click and select refresh from context menu.
The trick is, that in File dialog you can't click on "User" link, but you have
to click on the folder-icon standing on the left.
It has nothing to do, with filtering (*.xls etc.). For example you can click on
_icon_ of "Program files", then all the folders are listed. When you then click
on "Users" _link_, it still shows content of "Program Files" instead of
"Users".
--
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.