pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS

Difference between
modified post 7d685af2 by Anonymous on Wed 18th Dec 2024 14:37
original post 3c3a49 by Anonymous on Wed 18th Dec 2024 14:36
Download diff
Show old version | new version | both versions

    
1-
Patch (intended to be a workaround for the Windows tar issue, which causes some block to be written as blocks of zeros if it unpacks a bzip2-compressed archive):
1+
Patch for https://github.com/kofemann/ms-nfs41-client.git commit id #046f5de27df3ae1852ced7da5001c5a0a1582287 (intended to be a workaround for the Windows tar issue, which causes some block to be written as blocks of zeros if it unpacks a bzip2-compressed archive):
22
---- snip ----
33
diff --git a/sys/nfs41sys_driver.h b/sys/nfs41sys_driver.h
44
index 1c39ab6..0e0107c 100644
55
--- a/sys/nfs41sys_driver.h
66
+++ b/sys/nfs41sys_driver.h
77
@@ -48,8 +48,10 @@
88
     (POOL_FLAG_UNINITIALIZED|POOL_FLAG_CACHE_ALIGNED)
99
1010
 #define RxAllocatePoolWithTag(rxallocpool, numbytes, tag) \
1111
-    ExAllocatePool2(((((rxallocpool) == NonPagedPoolNx)? \
1212
-            POOL_FLAG_NON_PAGED:POOL_FLAG_NON_PAGED_EXECUTE) | \
1313
+    ExAllocatePool2((( \
1414
+            ((rxallocpool) == PagedPool)?POOL_FLAG_PAGED: \
1515
+                (((rxallocpool) == NonPagedPoolNx)? \
1616
+                    POOL_FLAG_NON_PAGED:POOL_FLAG_NON_PAGED_EXECUTE)) | \
1717
             RXALLOCATEPOOL_DEFAULT_ALLOCATEPOOL2FLAGS), \
1818
         (numbytes), (tag))
1919
 #endif /* EXALLOCATEPOOLWITHTAG_DEPRECATED */
2020
diff --git a/sys/nfs41sys_readwrite.c b/sys/nfs41sys_readwrite.c
2121
index 050819c..c39a506 100644
2222
--- a/sys/nfs41sys_readwrite.c
2323
+++ b/sys/nfs41sys_readwrite.c
2424
@@ -58,6 +58,7 @@
2525
 #include <winerror.h>
2626
2727
 #include <Ntstrsafe.h>
2828
+#include <stdbool.h>
2929
3030
 #include "nfs41sys_buildconfig.h"
3131
3232
@@ -333,7 +334,7 @@ NTSTATUS nfs41_Write(
3333
     IN OUT PRX_CONTEXT RxContext)
3434
 {
3535
     NTSTATUS status = STATUS_INSUFFICIENT_RESOURCES;
3636
-    nfs41_updowncall_entry *entry;
3737
+    nfs41_updowncall_entry *entry = NULL;
3838
     BOOLEAN async = FALSE;
3939
     PLOWIO_CONTEXT LowIoContext  = &RxContext->LowIoContext;
4040
     __notnull PMRX_SRV_OPEN SrvOpen = RxContext->pRelevantSrvOpen;
4141
@@ -344,6 +345,10 @@ NTSTATUS nfs41_Write(
4242
     __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(RxContext->pFcb);
4343
     __notnull PNFS41_FOBX nfs41_fobx = NFS41GetFobxExtension(RxContext->pFobx);
4444
     DWORD io_delay;
4545
+#if 1
4646
+    void *userbuffer_mem = NULL;
4747
+    PMDL userbuffer_mdl = NULL;
4848
+#endif
4949
 #ifdef ENABLE_TIMINGS
5050
     LARGE_INTEGER t1, t2;
5151
     t1 = KeQueryPerformanceCounter(NULL);
5252
@@ -362,9 +367,91 @@ NTSTATUS nfs41_Write(
5353
         pNetRootContext->nfs41d_version, SrvOpen->pAlreadyPrefixedName, &entry);
5454
     if (status) goto out;
5555
5656
+#if 1
5757
+    ULONG padded_readwrite_bytecount = LowIoContext->ParamsFor.ReadWrite.ByteCount + (256) /* 256==debug padding */;
5858
+
5959
+    userbuffer_mem = ExAllocatePool2(POOL_FLAG_NON_PAGED, padded_readwrite_bytecount, 'ioio');
6060
+    if (userbuffer_mem == NULL) {
6161
+        status = STATUS_NO_MEMORY;
6262
+        goto out;
6363
+    }
6464
+
6565
+    RtlZeroMemory(userbuffer_mem, padded_readwrite_bytecount);
6666
+
6767
+    userbuffer_mdl = IoAllocateMdl(userbuffer_mem,
6868
+        padded_readwrite_bytecount,
6969
+        FALSE, FALSE, NULL);
7070
+    if (userbuffer_mdl == NULL) {
7171
+        status = STATUS_NO_MEMORY;
7272
+        goto out;
7373
+    }
7474
+
7575
+#pragma warning( push )
7676
+/*
7777
+ * C28145: "The opaque MDL structure should not be modified by a
7878
+ * driver.", |MDL_MAPPING_CAN_FAIL| is the exception
7979
+ */
8080
+#pragma warning (disable : 28145)
8181
+        userbuffer_mdl->MdlFlags |= MDL_MAPPING_CAN_FAIL;
8282
+#pragma warning( pop )
8383
+    MmProbeAndLockPages(userbuffer_mdl, KernelMode, IoModifyAccess);
8484
+
8585
+    PVOID Src;
8686
+    if ((Src = MmGetSystemAddressForMdlSafe(
8787
+            LowIoContext->ParamsFor.ReadWrite.Buffer,
8888
+            NormalPagePriority)) == NULL) {
8989
+        status = STATUS_INSUFFICIENT_RESOURCES;
9090
+        goto out;
9191
+    }
9292
+
9393
+    ULONG mdl_bytecount = MmGetMdlByteCount(LowIoContext->ParamsFor.ReadWrite.Buffer);
9494
+
9595
+    if (mdl_bytecount < LowIoContext->ParamsFor.ReadWrite.ByteCount) {
9696
+        DbgP("#### ERROR: mdl_bytecount(=%lld) < LowIoContext->ParamsFor.ReadWrite.ByteCount(=%lld)\n",
9797
+            (long long)mdl_bytecount,
9898
+            (long long)LowIoContext->ParamsFor.ReadWrite.ByteCount);
9999
+        DbgP("ReadWrite.Buffer=(Next=0x%p, Size=%ld, MdlFlags=0x%lx, "
100100
+            "Process=0x%p, MappedSystemVa=0x%p, StartVa=0x%p, "
101101
+            "ByteCount=%ld, ByteOffset=%ld)\n",
102102
+            (void *)LowIoContext->ParamsFor.ReadWrite.Buffer->Next,
103103
+            (long)LowIoContext->ParamsFor.ReadWrite.Buffer->Size,
104104
+            (long)LowIoContext->ParamsFor.ReadWrite.Buffer->MdlFlags,
105105
+            (void *)LowIoContext->ParamsFor.ReadWrite.Buffer->Process,
106106
+            (void *)LowIoContext->ParamsFor.ReadWrite.Buffer->MappedSystemVa,
107107
+            (void *)LowIoContext->ParamsFor.ReadWrite.Buffer->StartVa,
108108
+            (long)LowIoContext->ParamsFor.ReadWrite.Buffer->ByteCount,
109109
+            (long)LowIoContext->ParamsFor.ReadWrite.Buffer->ByteOffset);
110110
+        status = STATUS_INTERNAL_ERROR;
111111
+        goto out;
112112
+    }
113113
+
114114
+#if 1
115115
+    volatile char *cp_dest = userbuffer_mem;
116116
+    volatile char *cp_src = ((char *)Src)+LowIoContext->ParamsFor.ReadWrite.ByteOffset;
117117
+    volatile char tmpbyte;
118118
+
119119
+    long long cp_i;
120120
+
121121
+    long long cp_max = LowIoContext->ParamsFor.ReadWrite.ByteCount;
122122
+
123123
+    for (cp_i = 0 ; cp_i < cp_max ; cp_i++) {
124124
+        tmpbyte = *cp_src++;
125125
+
126126
+        *cp_dest++ = tmpbyte;
127127
+    }
128128
+#else
129129
+    (void)RtlCopyMemory(userbuffer_mem,
130130
+        ((char *)Src)+LowIoContext->ParamsFor.ReadWrite.ByteOffset,
131131
+        LowIoContext->ParamsFor.ReadWrite.ByteCount);
132132
+#endif
133133
+    entry->u.ReadWrite.MdlAddress = userbuffer_mdl;
134134
+    entry->buf_len = LowIoContext->ParamsFor.ReadWrite.ByteCount;
135135
+    entry->u.ReadWrite.offset = 0;
136136
+#else
137137
     entry->u.ReadWrite.MdlAddress = LowIoContext->ParamsFor.ReadWrite.Buffer;
138138
     entry->buf_len = LowIoContext->ParamsFor.ReadWrite.ByteCount;
139139
     entry->u.ReadWrite.offset = LowIoContext->ParamsFor.ReadWrite.ByteOffset;
140140
+#endif
141141
142142
     if (FlagOn(RxContext->CurrentIrpSp->FileObject->Flags,
143143
             FO_SYNCHRONOUS_IO) == FALSE) {
144144
@@ -420,6 +507,17 @@ NTSTATUS nfs41_Write(
145145
     }
146146
     nfs41_UpcallDestroy(entry);
147147
 out:
148148
+#if 1
149149
+    if (!async) {
150150
+        if (userbuffer_mdl) {
151151
+            IoFreeMdl(userbuffer_mdl);
152152
+        }
153153
+        if (userbuffer_mem) {
154154
+            RxFreePool(userbuffer_mem);
155155
+        }
156156
+    }
157157
+#endif
158158
+
159159
 #ifdef ENABLE_TIMINGS
160160
     t2 = KeQueryPerformanceCounter(NULL);
161161
     InterlockedIncrement(&write.tops);
162162
---- snip ----
163163
164164
165165
This crashes when using $ git clone git://repo.or.cz/bash.git # in Cygwin with "Page Fault in non-paged area" like this:
166166
************* Preparing the environment for Debugger Extensions Gallery repositories **************
167167
   ExtensionRepository : Implicit
168168
   UseExperimentalFeatureForNugetShare : true
169169
   AllowNugetExeUpdate : true
170170
   NonInteractiveNuget : true
171171
   AllowNugetMSCredentialProviderInstall : true
172172
   AllowParallelInitializationOfLocalRepositories : true
173173
   EnableRedirectToChakraJsProvider : false
174174
175175
   -- Configuring repositories
176176
      ----> Repository : LocalInstalled, Enabled: true
177177
      ----> Repository : UserExtensions, Enabled: true
178178
179179
>>>>>>>>>>>>> Preparing the environment for Debugger Extensions Gallery repositories completed, duration 0.000 seconds
180180
181181
************* Waiting for Debugger Extensions Gallery to Initialize **************
182182
183183
>>>>>>>>>>>>> Waiting for Debugger Extensions Gallery to Initialize completed, duration 0.532 seconds
184184
   ----> Repository : UserExtensions, Enabled: true, Packages count: 0
185185
   ----> Repository : LocalInstalled, Enabled: true, Packages count: 42
186186
187187
Microsoft (R) Windows Debugger Version 10.0.27725.1000 AMD64
188188
Copyright (c) Microsoft Corporation. All rights reserved.
189189
190190
191191
Loading Dump File [C:\Windows\MEMORY.DMP]
192192
Kernel Bitmap Dump File: Kernel address space is available, User address space may not be available.
193193
194194
195195
************* Path validation summary **************
196196
Response                         Time (ms)     Location
197197
Deferred                                       srv*
198198
OK                                             C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\destdir\cygdrive\c\cygwin64\sbin
199199
OK                                             C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\build.vc19\x64\Debug\nfs41_driver
200200
Symbol search path is: srv*;C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\destdir\cygdrive\c\cygwin64\sbin;C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\build.vc19\x64\Debug\nfs41_driver
201201
Executable search path is:
202202
Windows 10 Kernel Version 19041 MP (8 procs) Free x64
203203
Product: WinNt, suite: TerminalServer SingleUserTS
204204
Edition build lab: 19041.1.amd64fre.vb_release.191206-1406
205205
Kernel base = 0xfffff806`19400000 PsLoadedModuleList = 0xfffff806`1a02a3e0
206206
Debug session time: Wed Dec 18 11:50:41.555 2024 (UTC + 1:00)
207207
System Uptime: 0 days 0:09:39.323
208208
Loading Kernel Symbols
209209
...............................................................
210210
...........Page de19 not present in the dump file. Type ".hh dbgerr004" for details
211211
.....................................................
212212
................................................................
213213
......
214214
Loading User Symbols
215215
216216
Loading unloaded module list
217217
......
218218
For analysis of this file, run !analyze -v
219219
nt!KeBugCheckEx:
220220
fffff806`197fe8f0 48894c2408      mov     qword ptr [rsp+8],rcx ss:0018:ffff9582`32c5a910=0000000000000050
221221
1: kd> !analyze -v
222222
*******************************************************************************
223223
*                                                                             *
224224
*                        Bugcheck Analysis                                    *
225225
*                                                                             *
226226
*******************************************************************************
227227
228228
PAGE_FAULT_IN_NONPAGED_AREA (50)
229229
Invalid system memory was referenced.  This cannot be protected by try-except.
230230
Typically the address is just plain bad or it is pointing at freed memory.
231231
Arguments:
232232
Arg1: ffffc90145a8d000, memory referenced.
233233
Arg2: 0000000000000000, X64: bit 0 set if the fault was due to a not-present PTE.
234234
	bit 1 is set if the fault was due to a write, clear if a read.
235235
	bit 3 is set if the processor decided the fault was due to a corrupted PTE.
236236
	bit 4 is set if the fault was due to attempted execute of a no-execute PTE.
237237
	- ARM64: bit 1 is set if the fault was due to a write, clear if a read.
238238
	bit 3 is set if the fault was due to attempted execute of a no-execute PTE.
239239
Arg3: fffff8061ed3361d, If non-zero, the instruction address which referenced the bad memory
240240
	address.
241241
Arg4: 0000000000000000, (reserved)
242242
243243
Debugging Details:
244244
------------------
245245
246246
247247
KEY_VALUES_STRING: 1
248248
249249
    Key  : AV.Type
250250
    Value: Read
251251
252252
    Key  : Analysis.CPU.mSec
253253
    Value: 2453
254254
255255
    Key  : Analysis.Elapsed.mSec
256256
    Value: 4796
257257
258258
    Key  : Analysis.IO.Other.Mb
259259
    Value: 0
260260
261261
    Key  : Analysis.IO.Read.Mb
262262
    Value: 3
263263
264264
    Key  : Analysis.IO.Write.Mb
265265
    Value: 2
266266
267267
    Key  : Analysis.Init.CPU.mSec
268268
    Value: 781
269269
270270
    Key  : Analysis.Init.Elapsed.mSec
271271
    Value: 5718
272272
273273
    Key  : Analysis.Memory.CommitPeak.Mb
274274
    Value: 99
275275
276276
    Key  : Analysis.Version.DbgEng
277277
    Value: 10.0.27725.1000
278278
279279
    Key  : Analysis.Version.Description
280280
    Value: 10.2408.27.01 amd64fre
281281
282282
    Key  : Analysis.Version.Ext
283283
    Value: 1.2408.27.1
284284
285285
    Key  : Bugcheck.Code.KiBugCheckData
286286
    Value: 0x50
287287
288288
    Key  : Bugcheck.Code.LegacyAPI
289289
    Value: 0x50
290290
291291
    Key  : Bugcheck.Code.TargetModel
292292
    Value: 0x50
293293
294294
    Key  : Failure.Bucket
295295
    Value: AV_R_(null)_nfs41_driver!nfs41_Write
296296
297297
    Key  : Failure.Hash
298298
    Value: {be85c6e9-381a-fb84-c448-edc4d53cac46}
299299
300300
    Key  : Hypervisor.Enlightenments.Value
301301
    Value: 12576
302302
303303
    Key  : Hypervisor.Enlightenments.ValueHex
304304
    Value: 3120
305305
306306
    Key  : Hypervisor.Flags.AnyHypervisorPresent
307307
    Value: 1
308308
309309
    Key  : Hypervisor.Flags.ApicEnlightened
310310
    Value: 0
311311
312312
    Key  : Hypervisor.Flags.ApicVirtualizationAvailable
313313
    Value: 0
314314
315315
    Key  : Hypervisor.Flags.AsyncMemoryHint
316316
    Value: 0
317317
318318
    Key  : Hypervisor.Flags.CoreSchedulerRequested
319319
    Value: 0
320320
321321
    Key  : Hypervisor.Flags.CpuManager
322322
    Value: 0
323323
324324
    Key  : Hypervisor.Flags.DeprecateAutoEoi
325325
    Value: 1
326326
327327
    Key  : Hypervisor.Flags.DynamicCpuDisabled
328328
    Value: 0
329329
330330
    Key  : Hypervisor.Flags.Epf
331331
    Value: 0
332332
333333
    Key  : Hypervisor.Flags.ExtendedProcessorMasks
334334
    Value: 0
335335
336336
    Key  : Hypervisor.Flags.HardwareMbecAvailable
337337
    Value: 0
338338
339339
    Key  : Hypervisor.Flags.MaxBankNumber
340340
    Value: 0
341341
342342
    Key  : Hypervisor.Flags.MemoryZeroingControl
343343
    Value: 0
344344
345345
    Key  : Hypervisor.Flags.NoExtendedRangeFlush
346346
    Value: 1
347347
348348
    Key  : Hypervisor.Flags.NoNonArchCoreSharing
349349
    Value: 0
350350
351351
    Key  : Hypervisor.Flags.Phase0InitDone
352352
    Value: 1
353353
354354
    Key  : Hypervisor.Flags.PowerSchedulerQos
355355
    Value: 0
356356
357357
    Key  : Hypervisor.Flags.RootScheduler
358358
    Value: 0
359359
360360
    Key  : Hypervisor.Flags.SynicAvailable
361361
    Value: 1
362362
363363
    Key  : Hypervisor.Flags.UseQpcBias
364364
    Value: 0
365365
366366
    Key  : Hypervisor.Flags.Value
367367
    Value: 536632
368368
369369
    Key  : Hypervisor.Flags.ValueHex
370370
    Value: 83038
371371
372372
    Key  : Hypervisor.Flags.VpAssistPage
373373
    Value: 1
374374
375375
    Key  : Hypervisor.Flags.VsmAvailable
376376
    Value: 0
377377
378378
    Key  : Hypervisor.RootFlags.AccessStats
379379
    Value: 0
380380
381381
    Key  : Hypervisor.RootFlags.CrashdumpEnlightened
382382
    Value: 0
383383
384384
    Key  : Hypervisor.RootFlags.CreateVirtualProcessor
385385
    Value: 0
386386
387387
    Key  : Hypervisor.RootFlags.DisableHyperthreading
388388
    Value: 0
389389
390390
    Key  : Hypervisor.RootFlags.HostTimelineSync
391391
    Value: 0
392392
393393
    Key  : Hypervisor.RootFlags.HypervisorDebuggingEnabled
394394
    Value: 0
395395
396396
    Key  : Hypervisor.RootFlags.IsHyperV
397397
    Value: 0
398398
399399
    Key  : Hypervisor.RootFlags.LivedumpEnlightened
400400
    Value: 0
401401
402402
    Key  : Hypervisor.RootFlags.MapDeviceInterrupt
403403
    Value: 0
404404
405405
    Key  : Hypervisor.RootFlags.MceEnlightened
406406
    Value: 0
407407
408408
    Key  : Hypervisor.RootFlags.Nested
409409
    Value: 0
410410
411411
    Key  : Hypervisor.RootFlags.StartLogicalProcessor
412412
    Value: 0
413413
414414
    Key  : Hypervisor.RootFlags.Value
415415
    Value: 0
416416
417417
    Key  : Hypervisor.RootFlags.ValueHex
418418
    Value: 0
419419
420420
    Key  : SecureKernel.HalpHvciEnabled
421421
    Value: 0
422422
423423
    Key  : WER.OS.Branch
424424
    Value: vb_release
425425
426426
    Key  : WER.OS.Version
427427
    Value: 10.0.19041.1
428428
429429
430430
BUGCHECK_CODE:  50
431431
432432
BUGCHECK_P1: ffffc90145a8d000
433433
434434
BUGCHECK_P2: 0
435435
436436
BUGCHECK_P3: fffff8061ed3361d
437437
438438
BUGCHECK_P4: 0
439439
440440
FILE_IN_CAB:  MEMORY.DMP
441441
442442
FAULTING_THREAD:  ffff9d89a3815080
443443
444444
READ_ADDRESS: unable to get nt!PspSessionIdBitmap
445445
 ffffc90145a8d000
446446
447447
MM_INTERNAL_CODE:  0
448448
449449
IMAGE_NAME:  nfs41_driver.sys
450450
451451
MODULE_NAME: nfs41_driver
452452
453453
FAULTING_MODULE: fffff8061ed20000 nfs41_driver
454454
455455
BLACKBOXBSD: 1 (!blackboxbsd)
456456
457457
458458
BLACKBOXNTFS: 1 (!blackboxntfs)
459459
460460
461461
BLACKBOXWINLOGON: 1
462462
463463
PROCESS_NAME:  System
464464
465465
TRAP_FRAME:  ffff958232c5abb0 -- (.trap 0xffff958232c5abb0)
466466
NOTE: The trap frame does not contain all registers.
467467
Some register values may be zeroed or incorrect.
468468
rax=ffffc90145a8d000 rbx=0000000000000000 rcx=00000000000000f1
469469
rdx=0000000000000010 rsi=0000000000000000 rdi=0000000000000000
470470
rip=fffff8061ed3361d rsp=ffff958232c5ad40 rbp=ffff9d89a64b6aa0
471471
 r8=cfffffffffffffff  r9=fffff57aa7626910 r10=fffff8061a04f5c0
472472
r11=fffff57abd5eafff r12=0000000000000000 r13=0000000000000000
473473
r14=0000000000000000 r15=0000000000000000
474474
iopl=0         nv up ei ng nz na po cy
475475
nfs41_driver!nfs41_Write+0x46d:
476476
fffff806`1ed3361d 0fb600          movzx   eax,byte ptr [rax] ds:ffffc901`45a8d000=??
477477
Resetting default scope
478478
479479
STACK_TEXT:
480480
ffff9582`32c5a908 fffff806`19846095     : 00000000`00000050 ffffc901`45a8d000 00000000`00000000 ffff9582`32c5abb0 : nt!KeBugCheckEx
481481
ffff9582`32c5a910 fffff806`19638cd0     : ffff9d89`a3815080 00000000`00000000 ffff9582`32c5ac30 00000000`00000000 : nt!MiSystemFault+0x1ce5f5
482482
ffff9582`32c5aa10 fffff806`1980ea6d     : ffff9d89`aa48d010 0000000f`ffffffff ffff9582`32c5aca9 00000000`00000000 : nt!MmAccessFault+0x400
483483
ffff9582`32c5abb0 fffff806`1ed3361d     : ffff9d89`a9105aa0 ffffae0e`00000010 0000021d`52627400 ffff9d89`aa48d010 : nt!KiPageFault+0x36d
484484
ffff9582`32c5ad40 fffff806`1ed53844     : ffff9d89`aa48d010 ffff9d89`00000000 ffff9d89`00000000 00000000`00000001 : nfs41_driver!nfs41_Write+0x46d [C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\sys\nfs41sys_readwrite.c @ 438]
485485
ffff9582`32c5ae70 fffff806`1ed5ee3a     : ffffae0e`fa405660 ffff9d89`a64b6aa0 ffff9d89`a64b6aa0 fffff806`1ed3b3bd : nfs41_driver!RxLowIoSubmit+0x2d4 [base\fs\rdr2\rxce\lowio.c @ 805]
486486
ffff9582`32c5aed0 fffff806`1ed5e8af     : ffff9d89`aa48d010 ffff9d89`a64b6aa0 ffff9d89`a64b6aa0 00000000`00000004 : nfs41_driver!RxLowIoWriteShell+0x9a [base\fs\rdr2\rdbss\write.c @ 2095]
487487
ffff9582`32c5af20 fffff806`1ed3b262     : ffff9d89`aa48d010 ffff9d89`a64b6aa0 ffff9d89`a61e0000 00000000`00000001 : nfs41_driver!RxCommonWrite+0x1a2f [base\fs\rdr2\rdbss\write.c @ 1508]
488488
ffff9582`32c5b0f0 fffff806`1ed5696d     : fffff806`1ed49160 00000000`00000000 00000000`00000000 ffff9d89`a61e0060 : nfs41_driver!RxFsdCommonDispatch+0x442 [base\fs\rdr2\rdbss\ntfsd.c @ 848]
489489
ffff9582`32c5b1f0 fffff806`1ed28077     : ffff9d89`a36c5b00 ffff9d89`a33f6160 ffff9d89`a9d94ba0 ffff9d89`a9d94ca8 : nfs41_driver!RxFsdDispatch+0xfd [base\fs\rdr2\rdbss\ntfsd.c @ 442]
490490
ffff9582`32c5b220 fffff806`1964a295     : ffff9d89`a61e0060 ffff9d89`a64b6aa0 ffff9d89`a38156d0 fffff806`19659bbb : nfs41_driver!nfs41_FsdDispatch+0x67 [C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\sys\nfs41sys_driver.c @ 962]
491491
ffff9582`32c5b260 fffff806`1cd7f248     : fffff806`1cd78000 00000000`00000000 ffff9d89`a3f53910 ffff9d89`aa45faa8 : nt!IofCallDriver+0x55
492492
ffff9582`32c5b2a0 fffff806`1cd7ed99     : ffffae0e`f455d420 ffff9d89`a390e4c0 fffff806`1cd78000 00000000`00000000 : mup!MupiCallUncProvider+0xb8
493493
ffff9582`32c5b310 fffff806`1cd7ecce     : ffff9d89`a64b6aa0 ffff9d89`aa45faa0 ffff9d89`abd0e5b0 00000000`00000000 : mup!MupStateMachine+0x59
494494
ffff9582`32c5b340 fffff806`1964a295     : 00000000`00000000 00000000`00000000 ffff9d89`a36c5b00 fffff806`16085021 : mup!MupFsdIrpPassThrough+0x17e
495495
ffff9582`32c5b3b0 fffff806`1608710f     : 00000000`00000006 00000000`00000000 ffff9d89`a9d83b50 fffff806`1964ec5c : nt!IofCallDriver+0x55
496496
ffff9582`32c5b3f0 fffff806`16084a43     : ffff9582`32c5b480 ffff9d89`a9105aa0 00000000`00000140 ffff9d89`a384bb40 : FLTMGR!FltpLegacyProcessingAfterPreCallbacksCompleted+0x28f
497497
ffff9582`32c5b460 fffff806`1964a295     : ffff9d89`a64b6aa0 fffff806`1964a2d7 00000000`00000004 00000000`00000004 : FLTMGR!FltpDispatch+0xa3
498498
ffff9582`32c5b4c0 fffff806`196b68e3     : ffff9d89`a9105aa0 ffff9d89`a64b6aa0 ffff9d89`abd0e5b0 ffff9582`32c5b580 : nt!IofCallDriver+0x55
499499
ffff9582`32c5b500 fffff806`19741dc8     : 00000000`00000000 ffff9582`32c5b5a0 ffff9d89`abd0e5b0 fffff806`19676175 : nt!IoSynchronousPageWriteEx+0x13b
500500
ffff9582`32c5b540 fffff806`19646312     : 00000000`00000011 ffffae0f`00ea3018 00000000`00001000 00000000`00000000 : nt!MiIssueSynchronousFlush+0x70
501501
ffff9582`32c5b5c0 fffff806`197034a9     : ffff9582`33053a88 00000000`00000000 00000000`00000000 00000000`00000000 : nt!MiFlushSectionInternal+0x862
502502
ffff9582`32c5b890 fffff806`19675a8d     : 00000000`00000001 ffff9d89`a3815080 00000000`0008d000 00000000`00001000 : nt!MmFlushSection+0xbd
503503
ffff9582`32c5b940 fffff806`19674bd4     : ffff9d89`a1cf4148 00000000`00000000 ffff9d89`00000001 00000000`00000000 : nt!CcFlushCachePriv+0x6cd
504504
ffff9582`32c5ba90 fffff806`196171c5     : ffff9d89`abe45880 fffff806`196fdc00 ffff9d89`a1a5ac01 00000000`00000000 : nt!CcWriteBehindInternal+0x1f4
505505
ffff9582`32c5bb70 fffff806`1975a165     : ffff9d89`a3815080 00000000`00000080 ffff9d89`a1a87080 00078404`ad9b3dfe : nt!ExpWorkerThread+0x105
506506
ffff9582`32c5bc10 fffff806`198078f8     : ffffc901`38fe3180 ffff9d89`a3815080 fffff806`1975a110 00000000`00000000 : nt!PspSystemThreadStartup+0x55
507507
ffff9582`32c5bc60 00000000`00000000     : ffff9582`32c5c000 ffff9582`32c56000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x28
508508
509509
510510
FAULTING_SOURCE_LINE:  C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\sys\nfs41sys_readwrite.c
511511
512512
FAULTING_SOURCE_FILE:  C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\sys\nfs41sys_readwrite.c
513513
514514
FAULTING_SOURCE_LINE_NUMBER:  438
515515
516516
FAULTING_SOURCE_CODE:
517517
   434:
518518
   435:     long long cp_max = LowIoContext->ParamsFor.ReadWrite.ByteCount;
519519
   436:
520520
   437:     for (cp_i = 0 ; cp_i < cp_max ; cp_i++) {
521521
>  438:         tmpbyte = *cp_src++;
522522
   439:
523523
   440:         *cp_dest++ = tmpbyte;
524524
   441:     }
525525
   442: #else
526526
   443:     (void)RtlCopyMemory(userbuffer_mem,
527527
528528
529529
SYMBOL_NAME:  nfs41_driver!nfs41_Write+46d
530530
531531
STACK_COMMAND:  .process /r /p 0xffff9d89a1a87080; .thread 0xffff9d89a3815080 ; kb
532532
533533
BUCKET_ID_FUNC_OFFSET:  46d
534534
535535
FAILURE_BUCKET_ID:  AV_R_(null)_nfs41_driver!nfs41_Write
536536
537537
OS_VERSION:  10.0.19041.1
538538
539539
BUILDLAB_STR:  vb_release
540540
541541
OSPLATFORM_TYPE:  x64
542542
543543
OSNAME:  Windows 10
544544
545545
FAILURE_ID_HASH:  {be85c6e9-381a-fb84-c448-edc4d53cac46}
546546
547547
Followup:     MachineOwner
548548
---------
549549
550550
1: kd> kp
551551
 # Child-SP          RetAddr               Call Site
552552
00 ffff9582`32c5a908 fffff806`19846095     nt!KeBugCheckEx
553553
01 ffff9582`32c5a910 fffff806`19638cd0     nt!MiSystemFault+0x1ce5f5
554554
02 ffff9582`32c5aa10 fffff806`1980ea6d     nt!MmAccessFault+0x400
555555
03 ffff9582`32c5abb0 fffff806`1ed3361d     nt!KiPageFault+0x36d
556556
04 ffff9582`32c5ad40 fffff806`1ed53844     nfs41_driver!nfs41_Write(struct _RX_CONTEXT * RxContext = 0xffff9d89`aa48d010)+0x46d [C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\sys\nfs41sys_readwrite.c @ 438]
557557
05 ffff9582`32c5ae70 fffff806`1ed5ee3a     nfs41_driver!RxLowIoSubmit(struct _RX_CONTEXT * RxContext = 0xffff9d89`aa48d010, struct _IRP * Irp = 0xffff9d89`a64b6aa0, struct _FCB * Fcb = 0xffffae0e`fa405660, <function> * CompletionRoutine = 0xfffff57a`a7626910)+0x2d4 [base\fs\rdr2\rxce\lowio.c @ 805]
558558
06 ffff9582`32c5aed0 fffff806`1ed5e8af     nfs41_driver!RxLowIoWriteShell(struct _RX_CONTEXT * RxContext = 0xffff9d89`aa48d010, struct _IRP * Irp = 0xffff9d89`a64b6aa0, struct _FCB * Fcb = 0xffffae0e`fa405660)+0x9a [base\fs\rdr2\rdbss\write.c @ 2095]
559559
07 ffff9582`32c5af20 fffff806`1ed3b262     nfs41_driver!RxCommonWrite(struct _RX_CONTEXT * RxContext = 0xffff9d89`aa48d010, struct _IRP * Irp = 0xffff9d89`a64b6aa0)+0x1a2f [base\fs\rdr2\rdbss\write.c @ 1508]
560560
08 ffff9582`32c5b0f0 fffff806`1ed5696d     nfs41_driver!RxFsdCommonDispatch(struct _RX_FSD_DISPATCH_VECTOR * DispatchVector = 0xfffff806`1ed49160, struct _IRP * Irp = 0xffff9d89`a64b6aa0, struct _FILE_OBJECT * FileObject = 0x00000000`00000000, struct _RDBSS_DEVICE_OBJECT * RxDeviceObject = 0xffff9d89`a61e0060)+0x442 [base\fs\rdr2\rdbss\ntfsd.c @ 848]
561561
09 ffff9582`32c5b1f0 fffff806`1ed28077     nfs41_driver!RxFsdDispatch(struct _RDBSS_DEVICE_OBJECT * RxDeviceObject = <Value unavailable error>, struct _IRP * Irp = <Value unavailable error>)+0xfd [base\fs\rdr2\rdbss\ntfsd.c @ 442]
562562
0a ffff9582`32c5b220 fffff806`1964a295     nfs41_driver!nfs41_FsdDispatch(struct _DEVICE_OBJECT * dev = 0xffff9d89`a61e0060 Device for "\FileSystem\nfs41_driver", struct _IRP * Irp = 0xffff9d89`a64b6aa0)+0x67 [C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\sys\nfs41sys_driver.c @ 962]
563563
0b ffff9582`32c5b260 fffff806`1cd7f248     nt!IofCallDriver+0x55
564564
0c ffff9582`32c5b2a0 fffff806`1cd7ed99     mup!MupiCallUncProvider+0xb8
565565
0d ffff9582`32c5b310 fffff806`1cd7ecce     mup!MupStateMachine+0x59
566566
0e ffff9582`32c5b340 fffff806`1964a295     mup!MupFsdIrpPassThrough+0x17e
567567
0f ffff9582`32c5b3b0 fffff806`1608710f     nt!IofCallDriver+0x55
568568
10 ffff9582`32c5b3f0 fffff806`16084a43     FLTMGR!FltpLegacyProcessingAfterPreCallbacksCompleted+0x28f
569569
11 ffff9582`32c5b460 fffff806`1964a295     FLTMGR!FltpDispatch+0xa3
570570
12 ffff9582`32c5b4c0 fffff806`196b68e3     nt!IofCallDriver+0x55
571571
13 ffff9582`32c5b500 fffff806`19741dc8     nt!IoSynchronousPageWriteEx+0x13b
572572
14 ffff9582`32c5b540 fffff806`19646312     nt!MiIssueSynchronousFlush+0x70
573573
15 ffff9582`32c5b5c0 fffff806`197034a9     nt!MiFlushSectionInternal+0x862
574574
16 ffff9582`32c5b890 fffff806`19675a8d     nt!MmFlushSection+0xbd
575575
17 ffff9582`32c5b940 fffff806`19674bd4     nt!CcFlushCachePriv+0x6cd
576576
18 ffff9582`32c5ba90 fffff806`196171c5     nt!CcWriteBehindInternal+0x1f4
577577
19 ffff9582`32c5bb70 fffff806`1975a165     nt!ExpWorkerThread+0x105
578578
1a ffff9582`32c5bc10 fffff806`198078f8     nt!PspSystemThreadStartup+0x55
579579
1b ffff9582`32c5bc60 00000000`00000000     nt!KiStartSystemThread+0x28
580580
1: kd> .frame 0n4;dv /t /v
581581
04 ffff9582`32c5ad40 fffff806`1ed53844     nfs41_driver!nfs41_Write+0x46d [C:\cygwin64\home\roland_mainz\work\msnfs41_uidmapping\ms-nfs41-client\sys\nfs41sys_readwrite.c @ 438]
582582
ffff9582`32c5ae70 struct _RX_CONTEXT * RxContext = 0xffff9d89`aa48d010
583583
ffff9582`32c5add8 struct _NFS41_FOBX * nfs41_fobx = 0xffffae0e`fa405b30
584584
ffff9582`32c5ade8 struct _NFS41_V_NET_ROOT_EXTENSION * pVNetRootContext = 0xffff9d89`a9d527b0
585585
ffff9582`32c5ae10 struct _NFS41_FCB * nfs41_fcb = 0xffffae0e`fa405900
586586
ffff9582`32c5adc0 struct _MDL * userbuffer_mdl = 0xffff9d89`a9566010
587587
ffff9582`32c5ae40 struct _NFS41_NETROOT_EXTENSION * pNetRootContext = 0xffff9d89`a9de43d0
588588
ffff9582`32c5ae08 char * cp_dest = 0xffff9d89`a44fc000 ""
589589
ffff9582`32c5ae50 int64 cp_max = 0n577536
590590
ffff9582`32c5ada8 struct _updowncall_entry * entry = 0xffff9d89`a8ee2e50
591591
ffff9582`32c5ade0 unsigned long mdl_bytecount = 0x8d000
592592
ffff9582`32c5ada0 struct _LOWIO_CONTEXT * LowIoContext = 0xffff9d89`aa48d1a8
593593
ffff9582`32c5ae38 void * Src = 0xffffc901`45a00000
594594
ffff9582`32c5adb8 struct _MRX_SRV_OPEN_ * SrvOpen = 0xffffae0e`fa405960
595595
ffff9582`32c5adb0 char tmpbyte = 0n-15 ''
596596
ffff9582`32c5ad94 long status = 0n0
597597
ffff9582`32c5adc8 unsigned long padded_readwrite_bytecount = 0x8d100
598598
ffff9582`32c5ad90 unsigned char async = 0x00 ''
599599
ffff9582`32c5adf0 unsigned long io_delay = 0
600600
ffff9582`32c5add0 void * userbuffer_mem = 0xffff9d89`a4470000
601601
ffff9582`32c5adf8 int64 cp_i = 0n573440
602602
ffff9582`32c5ae00 char * cp_src = 0xffffc901`45a8d000 "--- memory read error at address 0xffffc901`45a8d000 ---"
603603
1: kd> dt -r LowIoContext
604604
Local var @ 0xffff958232c5ada0 Type _LOWIO_CONTEXT*
605605
0xffff9d89`aa48d1a8
606606
   +0x000 Operation        : 1
607607
   +0x002 Flags            : 0
608608
   +0x008 CompletionRoutine : 0xfffff806`1ed5eeb0     long  nfs41_driver!RxLowIoWriteShellCompletion+0
609609
   +0x010 Resource         : 0xffff9d89`a1cf41c8 _ERESOURCE
610610
      +0x000 SystemResourcesList : _LIST_ENTRY [ 0xffff9d89`a1cf42b0 - 0xffff9d89`a1cf4160 ]
611611
         +0x000 Flink            : 0xffff9d89`a1cf42b0 _LIST_ENTRY [ 0xffff9d89`a8fe2690 - 0xffff9d89`a1cf41c8 ]
612612
         +0x008 Blink            : 0xffff9d89`a1cf4160 _LIST_ENTRY [ 0xffff9d89`a1cf41c8 - 0xffff9d89`a7dcb750 ]
613613
      +0x010 OwnerTable       : (null)
614614
      +0x018 ActiveCount      : 0n1
615615
      +0x01a Flag             : 0
616616
      +0x01a ReservedLowFlags : 0 ''
617617
      +0x01b WaiterPriority   : 0 ''
618618
      +0x020 SharedWaiters    : (null)
619619
      +0x028 ExclusiveWaiters : (null)
620620
      +0x030 OwnerEntry       : _OWNER_ENTRY
621621
         +0x000 OwnerThread      : 0xffff9d89`a3815080
622622
         +0x008 IoPriorityBoosted : 0y0
623623
         +0x008 OwnerReferenced  : 0y0
624624
         +0x008 IoQoSPriorityBoosted : 0y0
625625
         +0x008 OwnerCount       : 0y00000000000000000000000000010 (0x2)
626626
         +0x008 TableSize        : 0x10
627627
      +0x040 ActiveEntries    : 1
628628
      +0x044 ContentionCount  : 0
629629
      +0x048 NumberOfSharedWaiters : 0
630630
      +0x04c NumberOfExclusiveWaiters : 0
631631
      +0x050 Reserved2        : (null)
632632
      +0x058 Address          : (null)
633633
      +0x058 CreatorBackTraceIndex : 0
634634
      +0x060 SpinLock         : 0
635635
   +0x018 ResourceThreadId : 0xffff9d89`a3815080
636636
   +0x020 ParamsFor        : <anonymous-tag>
637637
      +0x000 ReadWrite        : <anonymous-tag>
638638
         +0x000 Flags            : 1
639639
         +0x008 Buffer           : 0xffff9d89`a9105aa0 _MDL
640640
         +0x010 ByteOffset       : 0n4096
641641
         +0x018 ByteCount        : 0x8d000
642642
         +0x01c Key              : 0
643643
         +0x020 NonPagedFcb      : (null)
644644
      +0x000 Locks            : <anonymous-tag>
645645
         +0x000 LockList         : 0x00000000`00000001 _LOWIO_LOCK_LIST
646646
         +0x000 Length           : 0n1
647647
         +0x008 Flags            : 0xa9105aa0
648648
         +0x010 ByteOffset       : 0n4096
649649
         +0x018 Key              : 0x8d000
650650
      +0x000 FsCtl            : _XXCTL_LOWIO_COMPONENT
651651
         +0x000 Flags            : 1
652652
         +0x004 FsControlCode    : 0
653653
         +0x004 IoControlCode    : 0
654654
         +0x008 InputBufferLength : 0xa9105aa0
655655
         +0x010 pInputBuffer     : 0x00000000`00001000 Void
656656
         +0x018 OutputBufferLength : 0x8d000
657657
         +0x020 pOutputBuffer    : (null)
658658
         +0x028 MinorFunction    : 0 ''
659659
      +0x000 IoCtl            : _XXCTL_LOWIO_COMPONENT
660660
         +0x000 Flags            : 1
661661
         +0x004 FsControlCode    : 0
662662
         +0x004 IoControlCode    : 0
663663
         +0x008 InputBufferLength : 0xa9105aa0
664664
         +0x010 pInputBuffer     : 0x00000000`00001000 Void
665665
         +0x018 OutputBufferLength : 0x8d000
666666
         +0x020 pOutputBuffer    : (null)
667667
         +0x028 MinorFunction    : 0 ''
668668
      +0x000 NotifyChangeDirectory : <anonymous-tag>
669669
         +0x000 WatchTree        : 0x1 ''
670670
         +0x004 CompletionFilter : 0
671671
         +0x008 NotificationBufferLength : 0xa9105aa0
672672
         +0x010 pNotificationBuffer : 0x00000000`00001000 Void
673673
1: kd> dx -id 0,0,ffff9d89a1a87080 -r1 ((nfs41_driver!_MDL *)0xffff9d89a9105aa0)
674674
((nfs41_driver!_MDL *)0xffff9d89a9105aa0)                 : 0xffff9d89a9105aa0 [Type: _MDL *]
675675
    [+0x000] Next             : 0x0 [Type: _MDL *]
676676
    [+0x008] Size             : 1176 [Type: short]
677677
    [+0x00a] MdlFlags         : 3 [Type: short]
678678
    [+0x010] Process          : 0x0 [Type: _EPROCESS *]
679679
    [+0x018] MappedSystemVa   : 0xffffc90145a00000 [Type: void *]
680680
    [+0x020] StartVa          : 0x0 [Type: void *]
681681
    [+0x028] ByteCount        : 0x8d000 [Type: unsigned long]
682682
    [+0x02c] ByteOffset       : 0x0 [Type: unsigned long]
683683

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at