Log of failed write by MS-Visio

32 views
Skip to first unread message

Georg Lehner

unread,
Mar 23, 2010, 4:54:04 PM3/23/10
to nin...@googlegroups.com
Hello!

Following you find a log from a ninefs-session, where i tried to save a diagram opened
in Microsoft-Visio to N:\usr\leg\tmp, N: beeing the mounted drive. ninefs options: -dDU

Visio fails to write the file (with something like: 'could not open the file the way i wanted').
After this, i closed Visio and unmounted N:

At a first glance it appears to me, that the |DesiredAccess and |CreationDisposition are combined
in such a way, that ninefs' _CreateFile is not interpreting as "create" but rather as "open".
The 'CreateFile status = -2' means 'ERROR_FILE_NOT_FOUND'.

Best Regards,

Jorge-Le�n

- - -
###Create 0189
open directory '\usr\leg\tmp'
###FindFiles 0189
findfiles '\usr\leg\tmp'
index from 0
STATUS_NO_SUCH_FILE
###Cleanup 0189
###Close 0189
###Create 0190
CreateDisposition 1
createfile '\usr\leg\tmp\Gateway_Router.VSD' create 3 access 120196
flags 80
open \usr\leg\tmp\Gateway_Router.VSD failed
CreateFile status = -2
###Create 0191
CreateDisposition 1
createfile '\usr\leg\tmp\Gateway_Router.VSD' create 3 access 120089
flags 80
open \usr\leg\tmp\Gateway_Router.VSD failed
CreateFile status = -2
###Create 0192
CreateDisposition 1
createfile '\usr\leg\tmp\Gateway_Router.VSD' create 3 access 80 flags 0
open \usr\leg\tmp\Gateway_Router.VSD failed
CreateFile status = -2
###Create 0193
CreateDisposition 1
createfile '\usr\leg\tmp\Gateway_Router.VSD' create 3 access 100080
flags 80
open \usr\leg\tmp\Gateway_Router.VSD failed
CreateFile status = -2
###Create 0194
CreateDisposition 1
createfile '\usr\leg\tmp\Gateway_Router.VSD' create 3 access 120089
flags 80
open \usr\leg\tmp\Gateway_Router.VSD failed
CreateFile status = -2
###Create 0195
CreateDisposition 2
createfile '\usr\leg\tmp\Gateway_Router.VSD' create 1 access 12019f
flags 80
###GetFileInfo 0195
getfileinfo '\usr\leg\tmp\Gateway_Router.VSD'
###SetFileInfo 0195
###SetFileInfo 0195
setallocationsize: 512 not, implemented
###GetFileInfo 0195
getfileinfo '\usr\leg\tmp\Gateway_Router.VSD'
###GetFileInfo 0195
getfileinfo '\usr\leg\tmp\Gateway_Router.VSD'
###Lock 0195
###Lock 0195
###Lock 0195
###Lock 0195
###Lock 0195
###Lock 0195
###Lock 0195
###Lock 0195
###Lock 0195
###Lock 0195
###Create 0196
open directory '\'
###QueryVolumeInfo 0196
###Cleanup 0196
###Close 0196
###Lock 0195
###Lock 0195
###Lock 0195
###Lock 0195
###Cleanup 0195
###Close 0195
###Create 0197
CreateDisposition 1
createfile '\usr\leg\tmp\Gateway_Router.VSD' create 3 access 10080 flags
0
###GetFileInfo 0197
getfileinfo '\usr\leg\tmp\Gateway_Router.VSD'
###SetFileInfo 0197
deletefile \usr\leg\tmp\Gateway_Router.VSD
dispositionInfo->DeleteFile = 1
###Cleanup 0197
###Close 0197
###Cleanup 0112
###Close 0112

Georg Lehner

unread,
Mar 27, 2010, 9:22:12 AM3/27/10
to nin...@googlegroups.com
Georg Lehner wrote:
> ...

> Visio fails to write the file (with something like: 'could not open
> the file the way i wanted').
> After this, i closed Visio and unmounted N:
> ...

Hello!

Today i found out, that np_rerror sometimes returns -1 when a file is
not found, where it sould
return 2 instead (NOENT). Patching the cvtError() function in ninefs.c
to return ERROR_FILE_NOT_FOUND
in both cases allows me now to create OpenOffice documents.
The np_rerrror strings differ also:
-1 .. file does not exist
2 .. file not found

I downloaded a Microsoft Visio trial version on my home computer to test
the Visio problem, and can
create visio files with it, however it chokes on some sharing
conflicts... Interestingly, when i want to copy
a 44KB Visio file from the Desktop to the ninefs drive it takes about a
minute (with otherwise very fast
access), and i get also an error message:
- - -
N:\usr\jorge\Drawing1.vsd
This file is open for modifications in another instance of Visio
- - -

A ninefs.c and its binary ninefs4.exe can be found at:

http://www.magma.com.ni/sw/ninefs/

The ninefs.c file does extensive logging in the _CreateFile() function
with the -d flag and is by
default very chatty in the cvtError() funtion.

Regards

Jorge-Le�n

Tim Newsham

unread,
Mar 27, 2010, 9:27:47 PM3/27/10
to nin...@googlegroups.com
Today i found out, that np_rerror sometimes returns -1 when a file is not found, where it sould
return 2 instead (NOENT).   Patching the cvtError() function in ninefs.c to return ERROR_FILE_NOT_FOUND
in both cases allows me now to create OpenOffice documents.

I'm not surprised. I've been putting off working through the error codes for a while
and I think I really should go and set that right.  Also I havent been using ninefs
too much, so I haven't tripped across some of these issues.  I'll try to set something
up soon to make more use of it locally.  That'll probably inspire me to look at
performance a little, too.

Thanks for the analysis and patches.

N:\usr\jorge\Drawing1.vsd
This file is open for modifications in another instance of Visio

Hmm.. Interesting.  I wonder if other common programs suffer from this as well
 
  Jorge-León

--
Tim Newsham | www.thenewsh.com/~newsham | thenewsh.blogspot.com

Georg Lehner

unread,
Apr 4, 2010, 8:07:54 AM4/4/10
to nin...@googlegroups.com
Hello!

With the new tracing facilities ninefs5.exe it is possible to look
closer at what Visio wants from "us".

I have copied a working Visio file (Drawing1.vsd) to a ninefs drive,
(re)started a ninefs5 -ddU session
and run 'N:\usr\jorge\Drawing1.vsd'. The resulting trace can be found at:

http://www.magma.com.ni/sw/ninefs/visio.log

In ninefs5.exe i allow _LockFile() and _UnlockFile() to return success
for any input parameter, since
on the contrary Visio stalls for quite some time. The _LockFile()
parameters used by Visio can be
observed in the visio.log file, they seem complete rubbish to me. Maybe
some enlightened beeing
can explain their meaning, tell me they are moot anyways, or correct my
fprintf() format string to show
what is really going on :)

Also i hope, that publishing ninefs5.exe inspires more people to run
tests of commonly used Windows
Software on ninefs. I found it useful to run the following two
commandline variations:

ninefs5 -dUp <password> -u <user> <host> <driveletter>

ninefs5 -ddUp <password> -u <user> <host> <driveletter> 2>ninefs.log

The first for a quick glance, and the second one for heavy duty tracing.

Regards,

Jorge-Le�n

> Jorge-Le�n
>
>
> --
> Tim Newsham | www.thenewsh.com/~newsham
> <http://www.thenewsh.com/%7Enewsham> | thenewsh.blogspot.com
> <http://thenewsh.blogspot.com>
>
> To unsubscribe from this group, send email to
> ninefs+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.

Reply all
Reply to author
Forward
0 new messages