navaraf@svn.reactos.com wrote:
Fix mutex unlocking in NpfsWaiterThread and add ASSERT.
Updated files: trunk/reactos/drivers/fs/np/rw.c
Ros-svn mailing list Ros-svn@reactos.com http://reactos.com:8080/mailman/listinfo/ros-svn
Something is wrong with this change or r17157. Compiling ros on ros reports hundreds of errors if pipes are enabled. Reverting npfs to r17153 does fix this problem.
- Hartmut
Hartmut Birr wrote:
navaraf@svn.reactos.com wrote:
Fix mutex unlocking in NpfsWaiterThread and add ASSERT.
Updated files: trunk/reactos/drivers/fs/np/rw.c
Ros-svn mailing list Ros-svn@reactos.com http://reactos.com:8080/mailman/listinfo/ros-svn
Something is wrong with this change or r17157. Compiling ros on ros reports hundreds of errors if pipes are enabled. Reverting npfs to r17153 does fix this problem.
- Hartmut
Does the attached patch make any difference (it just reverts most of the changes to rw.c)?
- Filip
Filip Navara wrote:
Does the attached patch make any difference (it just reverts most of the changes to rw.c)?
- Filip
Index: rw.c
--- rw.c (revision 17183) +++ rw.c (revision 17155) @@ -398,25 +398,23 @@ { if (Fcb->ReadDataAvailable == 0) {
if (Fcb->PipeState == FILE_PIPE_CONNECTED_STATE){ASSERT(Fcb->OtherSide != NULL);KeSetEvent(&Fcb->OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);}if (Information > 0 &&(Fcb->Pipe->ReadMode != FILE_PIPE_BYTE_STREAM_MODE ||Fcb->PipeState != FILE_PIPE_CONNECTED_STATE)){break;} if (Fcb->PipeState != FILE_PIPE_CONNECTED_STATE) { DPRINT("PipeState: %x\n", Fcb->PipeState);
if (Fcb->PipeState == FILE_PIPE_LISTENING_STATE)Status = STATUS_PIPE_LISTENING;elseStatus = STATUS_PIPE_DISCONNECTED;
Status = STATUS_PIPE_BROKEN; break; }
ASSERT(Fcb->OtherSide != NULL);KeSetEvent(&Fcb->OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);if (Information > 0 &&Fcb->Pipe->ReadMode != FILE_PIPE_BYTE_STREAM_MODE){break;}ExReleaseFastMutex(&Fcb->DataListLock); if (IoIsOperationSynchronous(Irp)) {
The patch does fix my problem. Compiling Ros on Ros works again.
- Hartmut
Hartmut, what version of ros are you building on, and what version are you building? I'm trying to build with 17198, and I am building a exported working copy from a few weeks ago. It always hangs detecting pipe support. Included is a screenshot of what happens and here is a piece of the log:
(drivers/fs/np/(drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 26 Buffer 8cebe6c8 Offset 0 --------------- 09 2E 66 69 6C 65 09 22 70 69 70 65 5F 64 65 74 ..file."pipe_det 65 63 74 69 6F 6E 2E 63 22 0A rw.c:310) NpfsRead(DeviceObject 8089ea90, Irp 80e0ab78) ection.c". --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001) (drivers/fs/np/rw.c:429) Finished waiting (\Win32Pipes.0000013c.00000001)! Status: 0 (drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 40 Buffer 8cec06c8 Offset 0 --------------- 09 2E 64 65 66 09 5F 5F 5F 6D 61 69 6E 3B 09 2E ..def.___main;.. 73 63 6C 09 32 3B 09 2E 74 79 70 65 09 33 32 3B scl.2;..type.32; 09 2E 65 6E 64 65 66 0A ..endef. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:429) Finished waiting (\Win32Pipes.0000013c.00000001)! Status: 0 (drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 7 Buffer 8cec06c8 Offset 0 --------------- 09 2E 74 65 78 74 0A ..text. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 13 Buffer 8cec06c8 Offset 0 --------------- 2E 67 6C 6F 62 6C 20 (drivers/fs/np/rw.c:429) Finished waiting (\Win32Pipes.0000013c.00000001)! Status: 0 5F 6D 61 69 6E 0A .globl _main. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 38 Buffer 8cec06c8 Offset 0 --------------- 09 2E 64 65 66 09 5F 6D 61 69 6E 3B 09 2E 73 63 ..def._main;..sc 6C 09 32 3B 09 2E 74 79 70 65 09 33 32 3B 09 2E l.2;..type.32;.. 65 6E 64 65 66 0A endef. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 7 Buffer 8cec06c8 Offset 0 --------------- 5F 6D 61 69 6E 3A 0A _main:. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 12 Buffer 8cec06c8 Offset 0 --------------- 09 70 75 73 68 6C 09 25 65 62 70 0A .pushl.%ebp. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 17 Buffer 8cec06c8 Offset 0 --------------- 09 6D 6F 76 6C 09 25 65 73 70 2C 20 25 65 62 70 .movl.%esp, %ebp 0A . --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 15 Buffer 8cec06c8 Offset 0 --------------- 09 73 75 62 6C 09 24 38 2C 20 25 65 73 70 0A .subl.$8, %esp. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 17 Buffer 8cec06c8 Offset 0 --------------- 09 61 6E 64 6C 09 24 2D 31 36 2C 20 25 65 73 70 .andl.$-16, %esp 0A . --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 15 Buffer 8cec06c8 Offset 0 --------------- 09 6D 6F 76 6C 09 24 30 2C 20 25 65 61 78 0A .movl.$0, %eax. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 16 Buffer 8cec06c8 Offset 0 --------------- 09 61 64 64 6C 09 24 31 35 2C 20 25 65 61 78 0A .addl.$15, %eax. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (d(drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001) (drivers/fs/np/rw.c:429) Finished waiting (\Win32Pipes.0000013c.00000001)! Status: 0 (drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001) rivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 16 Buffer 8cec06c8 Offset 0 --------------- 09 61 64 64 6C 09 24 31 35 2C 20 25 65 61 78 0A .addl.$15, %eax. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 1(drivers/fs/np/rw.c:429) Finished waiting (\Win32Pipes.0000013c.00000001)! Status: 0 5 Buffer 8cec06c8 Offset 0 --------------- 09 73 68 72 6C 09 24 34 2C 20 25 65 61 78 0A .shrl.$4, %eax. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 15 Buffer 8cec06c8 Offset 0 --------------- 09 73 61 6C 6C 09 24 34 2C 20 25 65 61 78 0A .sall.$4, %eax. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 21 Buffer 8cec06c8 Offset 0 --------------- 09 6D 6F 76 6C 09 25 65 61 78 2C 20 2D 34 28 25 .movl.%eax, -4(% 65 62 70 29 0A ebp). --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 21 Buffer 8cec06c8 Offset 0 --------------- 09 6D 6F 76 6C 09 2D 34 28 25 65 62 70 29 2C 20 .movl.-4(%ebp), 25 65 61 78 0A %eax. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c(drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001) (drivers/fs/np/rw.c:429) Finished waiting (\Win32Pipes.0000013c.00000001)! Status: 0 (drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001) .00000001 (drivers/fs/np/rw.c:653) Length 15 Buffer 8cec06c8 Offset 0 --------------- 09 63 61 6C 6C 09 5F 5F 61 6C 6C 6F 63 61 0A .call.__alloca. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 14 Buffer 8cec06c8 Offset 0 --------------- 09 63 61 6C 6C 09 5F 5F 5F 6D 61 69 6E 0A .call.___main. --------------- (drivers/fs/np/rw.c:694) Byte stream mo(drivers/fs/np/rw.c:429) Finished waiting (\Win32Pipes.0000013c.00000001)! Status: 0 de (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 15 Buffer 8cec06c8 Offset 0 --------------- 09 6D 6F 76 6C 09 24 30 2C 20 25 65 61 78 0A .movl.$0, %eax. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 7 Buffer 8cec06c8 Offset 0 --------------- 09 6C 65 61 76 65 0A .leave. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:604) NpfsWrite() (drivers/fs/np/rw.c:608) FileObject 80f35a68 (drivers/fs/np/rw.c:609) Pipe name \Win32Pipes.0000013c.00000001 (drivers/fs/np/rw.c:653) Length 5 Buffer 8cec06c8 Offset 0 --------------- 09 72 65 74 0A .ret. --------------- (drivers/fs/np/rw.c:694) Byte stream mode (drivers/fs/np/rw.c:760) NpfsWrite done (Status 0) (drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001) (drivers/fs/np/rw.c:429) Finished waiting (\Win32Pipes.0000013c.00000001)! Status: 0 (drivers/fs/np/rw.c:449) Byte stream mode (drivers/fs/np/rw.c:423) Waiting for readable data (\Win32Pipes.0000013c.00000001)
and it hangs there.. Any ideas? This bug did not happen a few weeks ago. On 8/7/05, Hartmut Birr hartmut.birr@gmx.de wrote:
The patch does fix my problem. Compiling Ros on Ros works again.
- Hartmut
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
WaxDragon wrote:
Hartmut, what version of ros are you building on, and what version are you building? I'm trying to build with 17198, and I am building a exported working copy from a few weeks ago. It always hangs detecting pipe support. Included is a screenshot of what happens and here is a piece of the log:
Hi,
I'm using r17154 and I'm trying to build an old version from 28.12.2004. It's one of the last revisions from old cvs. It has failed while compiling something. The error messages was from gas, something like 'cannot read from standard input'. There was an other bug, which is fixed by r17193. All programs which are using msvcrt and which didn't close file handles explicitly, may have lost data because msvcrt wasn't called with DLL_PROCESS_DETACH. The internal file caching from msvcrt wasn't flush to disk. Depend.exe from the old build system was a candidate which didn't close its file handles.
- Hartmut
WaxDragon wrote:
Hartmut, what version of ros are you building on, and what version are you building? I'm trying to build with 17198, and I am building a exported working copy from a few weeks ago. It always hangs detecting pipe support. Included is a screenshot of what happens and here is a piece of the log:
I get the same with the new build system. I will revert r17156 and 17157 and test it again.
- Hartmut
Hartmut Birr wrote:
WaxDragon wrote:
Hartmut, what version of ros are you building on, and what version are you building? I'm trying to build with 17198, and I am building a exported working copy from a few weeks ago. It always hangs detecting pipe support. Included is a screenshot of what happens and here is a piece of the log:
I get the same with the new build system. I will revert r17156 and 17157 and test it again.
Hi,
I think the problem has nothing to do with Filip's npfs changes. Rbuild hangs after calling system('gcc -pipe -c tools\rbuild\backend\mingw\pipe_detection.c -o tools\rbuild\backend\mingw\pipe_detection.o'). It works as a command on the prompt and it works without the '-pipe' switch.
- Hartmut
Hartmut Birr wrote:
Hartmut Birr wrote:
WaxDragon wrote:
Hartmut, what version of ros are you building on, and what version are you building? I'm trying to build with 17198, and I am building a exported working copy from a few weeks ago. It always hangs detecting pipe support. Included is a screenshot of what happens and here is a piece of the log:
I get the same with the new build system. I will revert r17156 and 17157 and test it again.
Hi,
I think the problem has nothing to do with Filip's npfs changes. Rbuild hangs after calling system('gcc -pipe -c tools\rbuild\backend\mingw\pipe_detection.c -o tools\rbuild\backend\mingw\pipe_detection.o'). It works as a command on the prompt and it works without the '-pipe' switch.
- Hartmut
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Hi,
I've written a little test program (see below). If I compile it as c program, it works . If I compile it as c++ program, it hangs. Any ideas? Both versions work on WinXP.
- Hartmut
#include <stdlib.h> #include <stdio.h> #include <windows.h>
int main(int argc, char* argv[]) { int result;
printf("system\n");
result = system("gcc -pipe -c tools\rbuild\backend\mingw\pipe_detection.c -o tools\rbuild\backend\mingw\pipe_detection.o 1>NUL 2>NUL");
printf("done (%d)\n", result); return 0; }
Hartmut Birr wrote:
Hi,
I've written a little test program (see below). If I compile it as c program, it works . If I compile it as c++ program, it hangs. Any ideas? Both versions work on WinXP.
Oops, this was wrong. The c version didn't contain the redirection to NUL. The real problem was, that file objects from devices like the nul device wasn't inheritable.
- Hartmut
Thank you for looking into this, Hartmut. Are you able to fix this, or do I need to file a bug to have someone else look at it?
On 8/9/05, Hartmut Birr hartmut.birr@gmx.de wrote:
Hartmut Birr wrote:
Hi,
I've written a little test program (see below). If I compile it as c program, it works . If I compile it as c++ program, it hangs. Any ideas? Both versions work on WinXP.
Oops, this was wrong. The c version didn't contain the redirection to NUL. The real problem was, that file objects from devices like the nul device wasn't inheritable.
- Hartmut
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
[For those who always wanted to blame for top-posing, here's your chance.]
Revison 17248 should fix it. - Filip
WaxDragon wrote:
Thank you for looking into this, Hartmut. Are you able to fix this, or do I need to file a bug to have someone else look at it?
On 8/9/05, Hartmut Birr hartmut.birr@gmx.de wrote:
Hartmut Birr wrote:
Hi,
I've written a little test program (see below). If I compile it as c program, it works . If I compile it as c++ program, it hangs. Any ideas? Both versions work on WinXP.
Oops, this was wrong. The c version didn't contain the redirection to NUL. The real problem was, that file objects from devices like the nul device wasn't inheritable.
- Hartmut
WaxDragon wrote:
Thank you for looking into this, Hartmut. Are you able to fix this, or do I need to file a bug to have someone else look at it?
r17248 should fix this problem. For compiling ros on ros you should als revert or fix r17218.
- Hartmut
Thanks for the heads up, I have Brandon looking at fixing 17218.
On 8/9/05, Hartmut Birr hartmut.birr@gmx.de wrote:
WaxDragon wrote:
Thank you for looking into this, Hartmut. Are you able to fix this, or do I need to file a bug to have someone else look at it?
r17248 should fix this problem. For compiling ros on ros you should als revert or fix r17218.
- Hartmut
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
No need to revert 17218... it is fixed with 17250.
Let me know if that did not fix it.
Brandon
Hartmut Birr wrote:
WaxDragon wrote:
Thank you for looking into this, Hartmut. Are you able to fix this, or do I need to file a bug to have someone else look at it?
r17248 should fix this problem. For compiling ros on ros you should als revert or fix r17218.
- Hartmut
Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev