.NET File Access, Process Monitor, and Continental Airlines
(Surprisingly, this is not a post about associative memory and how apparently disconnected things appear to be inter-related after all.) I'm writing this from my plane back home from the US, where I had the pleasure of teaching a Windows Internals course on Sela's behalf. As part of the course, I demonstrate various debugging and investigation tools that can be used in the Windows ecosystem, including Sysinternals' excellent Process Monitor. For those of you unfamiliar with the tool, I strongly recommend it - it's the Swiss Army knife for analyzing file system and registry activity on a machine. Combined with a powerful set of filters, it can tell you what each individual process is doing from these aspects. Combined with additional tools such as Logger or APIMon, you have the entire picture of what's going on inside the process, without the burden of a debugger attach and in terms that an IT admin can understand.
What I was trying to do is create a simple scenario for students to practice the usage of this kind of tool. So what I need was a simple application that performed some invalid file system or registry access. I wrote a "Notepad Replacement" application which simulated a Notepad, but its Save function would randomly fail by trying to write to an invalid path, an invalid volume or otherwise distorting the actual save activity. Since it was a simple UI, I wrote in using .NET WinForms, and regretted every second of it later. Students were simply unable to find the error in Process Monitor! No matter what kind of error, it was being swallowed by .NET's file and file security abstraction before it could ever reach Process Monitor's driver. The following table summarizes what happens from Process Monitor's perspective with every kind of injected fault that I was trying to simulate, in a .NET application as opposed to a native Win32 application:
Fault Type / Environment
|Accessing an invalid path (e.g. "C:\?.txt") ||The access fails and goes through Process Monitor on the failure path (see Fig. 1) ||The access fails with a .NET exception, doesn't go through Process Monitor|
|Accessing an invalid network path (e.g. "\\someserver\someshare\1.txt") ||The access fails and goes through Process Monitor on the failure path (see Fig. 2) ||The access fails with a .NET exception, (almost) doesn't go through Process Monitor (see Fig. 4)|
|Accessing an invalid redirected path (e.g. "Z:\1.txt") ||The access fails and doesn't go through Process Monitor ||The access fails with a .NET exception, and doesn't go through Process Monitor|
|Accessing an invalid local redirected path (e.g. "Y:\1.txt" where Y: is a local subst folder) ||The access fails and goes through Process Monitor on the failure path, but doesn't show the original path requested (see Fig. 3) ||Same as Win32|
Figure 1 - accessing an invalid file (Win32)
Figure 2 - accessing an invalid network path (Win32)
Figure 3 - accessing an invalid local redirected path (Win32)
In my case, I had Y: redirected to D:\Temp, so Process Monitor dutifully shows D:\Temp. This does make sense, because it operates at a lower level than the symbolic link parsing subst creates.
Figure 4 - accessing an invalid network path (.NET)
Now, what does all of this have to do with Continental Airlines anyway? Well, my flight to the US (Continental from Tel-Aviv to Newark, and then jetBlue from JFK to Sacramento) went as smooth as a flight can go. Furthermore, the jetBlue flight back was also splendid (strongly recommended; they were also the only airline to offer a non-stop flight from NYC to Sacramento and back). The problems began when I got to Newark at 10:30AM, with my flight at 3:50PM, assured that I have plenty of time and everything is certainly going to be OK.
The first minor annoyance was that baggage check-in for the flight only started at 12:30PM even though they said it will be at 12. Furthermore, there was just one lady trying to take care of several dozens of early birds like myself who wanted to check in. For me, the first big warning light went on when she mumbled something on the lines of "I can't get the computer to issue you a seat, the flight is full so you'll have to try it at the gate later". Considering that the flight was booked more than a week before, and considering that I was at the airport checking in my baggage over 3 hours before the flight, I wasn't much concerned with that warning light. Little did I know!
When I went through airport security and got to the gate, a nice lady (different one, of course) explained to me how the system works - you know, that usual story they give you about the poor poor airline companies not being able to make 100% profit, so they overbook flights. This one was particularly overbooked, but she told me time and again that I will have a seat, no problem.
A couple of minutes later, several security guards approach the gate area and ask me to leave because they are creating a restricted security area for the boarding process. I'm kind of used to that with flights going to Israel, so again no problem. At 2:15PM they start admitting people inside "the zone", and that's when the real problems began.
When the security guys saw that I don't really have a seat, but just some kind of recommendation-only boarding pass begging to pass me through security, they assumed I'm on standby and pushed me aside, telling me to wait until all "legit" passengers are boarded. Needless to say, explaining that I am not on standby and that I should have a seat and that it's not my problem that they overbook flights - didn't really help.
At about 3:15PM, things are really getting nasty - there are about 15 people sitting in the standby area, no customer representative has come to talk to us at any point, and finally - there are two BusinessFirst travelers sitting there, looking very annoyed because allegedly they paid $4000 to sit and wait outside the security area. How very comforting that we are all treated the same (for now).
Several minutes later, after much yelling and people getting really nervous, comes yet-another-nice-lady (YANL from now on) and tries to remedy the situation. She can't really do anything, of course - she doesn't know if they have any seats available, and they didn't start that beautiful volunteer scheme yet. The BusinessFirst passengers are ready to eat her alive as she tells them that she is not in charge of BusinessFirst, and that the BusinessFirst concierge is on his/her/their way (they only use this kind of words for business passengers anyway :-)).
At about 3:50PM, when the aircraft was actually supposed to be in the air, come the good news for some of us: the BusinessFirst concierge gets the BusinessFirst guys on board, and somehow another couple of seats emerge for some other people waiting. At no point did I really understand why they were giving those seats to certain people and not to others, and whether the algorithm was totally random or there still was some bizarre reverse sort order (because I should really have got the first seat, being at the airport 5 bloody hours before the flight).
The subsequent hour was one of the most aggravating experiences I've had in an airport. We're just sitting there, every once in a while comes a YANL bearing no news. They did call for volunteers, but nobody knows if there were any volunteers. The entire gate security area looks like a big human zoo, appropriately, and they aren't boarding anyone even though it's over half an hour after the flight departure time.
To make a long (and getting longer) story short, at about 4:40PM a YANL emerged and started giving out seats to some people, me not included. I got so annoyed I approached her and said that I don't understand the distribution logic she was following, but that if she was giving seats to people on the standby list, she should certainly be giving me a ticket. After appearing to be shocked by the fact that I have a reservation and paid for the ticket but they still couldn't find me a seat (right, very shocking), she went away and got me the last seat on the plane. Incidentally, when I got on the plane there was a nice gentleman sitting in my seat, but he moved away never to be seen later.
Also incidentally, we took off at 5:15PM or so, almost an hour and a half after what was planned, but the flight duration has magically changed from 10 hours and 25 minutes to 9 hours and 35 minutes. Why not make it 9 hours in the first place?!
This all goes along very well with what I personally experienced in the past with nearly every airline company out there (e.g. when I was frantically calling El-Al in Heathrow Airport explaining that I'm on my way to the flight, going to be there ahead of time, and asking time and again that they don't give my ticket away - but they still did and I got stuck in Heathrow for 24 hours on my expense), and with what people are saying about Continental in particular. It's not like I can heed out some warning which will actually help anyone. Just trying to let some steam out.