Path: news.mitre.org!blanket.mitre.org!philabs!newsjunkie.ans.net!newsfeeds.ans.net!streamer1.cleveland.iagnet.net!qual.net!iagnet.net!newsfeed.internetmci.com!194.162.162.196!newsfeed.nacamar.de!news.fh-hannover.de!news-han1.dfn.de!news.uni-paderborn.de!news.rwth-aachen.de!not-for-mail From: cawim@pool.informatik.rwth-aachen.de (Carsten Wimmer) Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: IOCTL problems on SMP machines Date: Sat, 17 Jan 1998 15:06:48 GMT Organization: RWTH Aachen (Germany) Lines: 42 Message-ID: <34c0c5f3.80429020@news.rwth-aachen.de> NNTP-Posting-Host: s2m235.dialup.rwth-aachen.de X-Newsreader: Forte Free Agent 1.11/32.235 Hi there! I have written an NT kernel-mode device driver which is using IOCTL, Read and Write operations without any problems. At least on a single-processor machine. On an SMP machine the whole machine crashes sooner or later. Though not in my own code, but in the NT kernel itself or in the kernel-mode driver which is communicating with me. The whole system just freezes and I can't do anything except to hit the hard-reset button.. The system can't be interrupted by a kernel debugger!! I don't know where/why exactly the thing crashes, but what happens is the following: A kernel-mode driver sends an IRP to me indicating that it wants to pick up any data. No data is available, I mark the IRP pending (with STATUS_PENDING and IoMarkIrpPending()) and return control to the system.. After a while data becomes available, and I complete the IRP (STATUS_SUCCESS and IoCompleteIrp()) after processing any system buffers etc... The other driver's IoCompletionRoutine is called and it receives data.. It also can send data to my driver, using an IOCTL... Or receive data with the above mechanism.. This works FINE for a while, but sometimes there seems to be a case (on SMP only) where this mechanism doesn't seem to work, and I don't know why.. I have protected anything by spinlocks, but it didn't really help. Does anyone have any experience with SMP programming? Any hint may help, thanks... cu, cawim PS: If you need further info, email me! -- Carsten Wimmer cawim@pool.informatik.rwth-aachen.de