[GRASS-dev] Win32 DBMI lockups: change to nonblocking pipes?

Benjamin Ducke benjamin.ducke at ufg.uni-kiel.de
Tue Jul 10 10:57:23 EDT 2007


After doing some more testing (QGIS and GRASS on Linux,
GRASS native w/o QGIS from http://qgis.org/uploadfiles/testbuilds/),
I still think that possible pipe blocking is the hottest lead so far.

There are some comments (maybe written by Radim Blazek?) in start.c
which suggest the same:

    /* I have seen problems with pipes on NT 5.1 probably related
     * to buffer size (psize, originaly 512 bytes).
     * But I am not sure, some problems were fixed by bigger
     * buffer but others remain.
     * Simple test which failed on NT 5.1 worked on NT 5.2
     * But there are probably other factors.

I would like to change the pipes in lib/db/dbmi_client/start.c to
nonblocking I/O. If those hints are right, then this should fix the
problem, I guess.
However, as always with Windows, things are more frustrating then they
should be.

I have been digging into Win32 internals and it seems that you cannot
open anonymous pipes (which is what start.c does) in nonblocking mode
on Win32 (on Linux you can use fctl for this):

	http://en.wikipedia.org/wiki/Anonymous_pipe

What puzzles me is this comment in start.c:

   /* More info about pipes from MSDN:
       - Anonymous pipes are implemented using a named pipe
         with a unique name.

So there must be a way to open pipes "p1" and "p2" in nonblocking mode!?
If not: is there a way to switch to a named pipe for the DBMI driver?

If there are any Windows hackers here that would like to give it a try
but don't want to invest the time setting up a compile and test
environment: let me know and I'll upload the complete toolset  and
sample data.

Thanks for any help,

Benjamin


-- 
Benjamin Ducke, M.A.
Archäoinformatik
(Archaeoinformation Science)
Institut für Ur- und Frühgeschichte
(Inst. of Prehistoric and Historic Archaeology)
Christian-Albrechts-Universität zu Kiel
Johanna-Mestorf-Straße 2-6
D 24098 Kiel
Germany

Tel.: ++49 (0)431 880-3378 / -3379
Fax : ++49 (0)431 880-7300
www.uni-kiel.de/ufg




More information about the grass-dev mailing list