Re: [wpkg-users] wpkg.js crashing?
Adam Williams schrieb: Tomasz Chmielewski wrote: You can configure a Windows system to make a BSOD when the Event Log is full. I doubt many (non-paranoid) people use it, though. how do you do that? sounds like an evil trick I could use on friend's PCs :) http://support.microsoft.com/kb/232564 If the CrashOnAuditFail registry key is set to 1 and the Security Event log is full on a computer that is running Microsoft Windows NT, Microsoft Windows 2000, or Microsoft Windows Server 2003, the following blue screen error message may be displayed... It doesn't mention XP though, you may have problems implementing it on your friend's PC ;) -- Tomasz Chmielewski http://wpkg.org - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
It doesn't mention XP though, you may have problems implementing it on your friend's PC ;) At the bottom it says Microsoft Windows XP Home Edition and Microsoft Windows XP Professional in the Applies to section. Filling the security event log is a little harder than the application event log though. :p - jens - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Hi Brian, Brian May wrote: This is pure speculation: * When I pushed OK on the dialog box yesterday, it expanded the file size to the size specified in the control, which I assumed was the current size. * The problem with logging events was because the current size of 64kb was being exceeded. * For some reason the Overwrite events older then 7 days was not working, as many events look older then 7 days. Or maybe, like the size setting it wasn't really the current value until after I pushed OK. So to me it looks like your system was somehow behaving oddly regarding the event log size and auto-purging. Anyway, this strange behavior allowed us to discover and fix a problem in WPKG which could happen in very rare cases - and therefore is very hard to trace and debug. Finally we solved this issue (see release of WPKG 1.0.2 and WPKG 1.1.0-M5) once forever. Thanks for your support. WPKG is getting more and more stable ;-) br, Rainer - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Hi, I remember a machine in my setup that didnt log anything to the event log anymore because it was full. This happened after running wpkg in debug mode two or three times (previous log entries left there). Cleaning the event log solved this and wpkg logged its actions again. Thanks for information. Was it just not logging (but executing properly) or was it also hanging somehow when trying to write log entries? I don't remember. :p But I'll just set a machine to debug and restart it a couple of times to reproduce this later today and report back. Ok, took me a little longer to complete this test as I had too much to do on friday. But here are my results: I enabled the debug-mode with /debug and restarted the machine several times without changing anything else. When the eventlog reached a size of 512KB no more entries were logged (this happened in the middle of executing wpkg. the first few entries of debug-mode were logged, the rest wasnt). I then added two software packages to the machine's profile and restarted the machine. No progress window appeared on the screen and the users was able to log in immediately without any delay but no software at all had been installed. There was no wpkg service running in the background either. After cleaning the eventlog and restarting the machine the progress window appeared again before the user was able to log in and the software had been successfully installed. So it seems that when eventlog is full wpkg fails to do anything. And because the eventlog is already full it cannot even log why it failed. While testing this I found that using param name='quiet' value='false' / in config.xml seems to break WPKG. WPKG starts and stops immediately. No software is installed even when eventlog is empty. Starting wpkg manually through commandline gives: WPKG Service konnte nicht gestartet werden. (WPKG service could not be started.) Der Dienst hat keinen Fehler gemeldet. (The service did not report any errors. Sie erhalten weitere Hilfe, wenn Sie NET HELPMSG 3534 eingeben. (Type NET HELPMSG 3534 to get more information.) After some more testing even param name='quiet' value='false' / is working now but it seems to disable /debug. - jens - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Jens Geile schrieb: So it seems that when eventlog is full wpkg fails to do anything. And because the eventlog is already full it cannot even log why it failed. While testing this I found that using param name='quiet' value='false' / in config.xml seems to break WPKG. WPKG starts and stops immediately. No software is installed even when eventlog is empty. Starting wpkg manually through commandline gives: WPKG Service konnte nicht gestartet werden. (WPKG service could not be started.) Der Dienst hat keinen Fehler gemeldet. (The service did not report any errors. Sie erhalten weitere Hilfe, wenn Sie NET HELPMSG 3534 eingeben. (Type NET HELPMSG 3534 to get more information.) After some more testing even param name='quiet' value='false' / is working now but it seems to disable /debug. Don't think so, but all debug output goes to eventlog then - this is why eventlog is filled so quickly. Even on the 2nd run (!) after cleaning event log (standard size) I get this error: cscript \\server\install\wpkg.js /synchronize /debug /quiet Microsoft (R) Windows Script Host, Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. Alle Rechte vorbehalten. \\server\install\wpkg.js(4527, 4) (null): Die Ereignisprotokolldatei ist voll. Wouldn't it make sense to completely disable sending of debug entries to eventlog in case of /quiet switch, instead creating only a hint in event log where the actual log file (containing the debug entries) can be found? Just my 2?. Falko - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Hi Jens Jens Geile wrote: After some more testing even param name='quiet' value='false' / is working now but it seems to disable /debug. I created a bug report (just for the records): http://bugzilla.wpkg.org/show_bug.cgi?id=110 However I verified it and it works exactly as expected. Setting 'quiet' do 'false' will cause WPKG not to write to the event log but to print to STDOUT instead (which you probably cannot see when it runs as a service). Refer to the more-detailed description within the report linked above. I am going to close it soon if there is no feedback from you. br, Rainer - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Rainer Meier wrote: And let me repeat again... WPKG does not seem to crash for you. Most probably just the API call is hanging. So it is useless trying to catch an exception if there is simply no exception thrown by Windows on the logEvent() call. Let me repeat again: Yes it does. If the API was just hanging, then the process would still be running. It is not still running. I think I told you this already. If it was a matter of nothing being logged and the process continuing, then I would expect to see the applications installed regardless. So the process definitely is exiting prematurely, that is without completing the tasks it was required to perform. I call this crashing. In fact I think I can guess why it is crashing, if this is the code you talked about: try { main(); } catch (e) { error(Message: + e.message + \n + Description: + e.description + \n + Error number: + hex(e.number) + \n + Stack: + e.stack + \n + Line: + e.lineNumber + \n ); notifyUserFail(); exit(2); } Here if any exception occurs, error is called which tries to log a message via the log function. However I just established that the the log function probably causes an exception when trying to write to the event handler - Guess what - it will cause an exception again when trying to log the fact that the previous log attempt failed - there is nothing to catch this exception - the result being the application WILL die without any errors being displayed. Meanwhile, the log file is perfectly OK, but not getting used, because it isn't tried until after the message is logged to the event handler. Ideally if an exception occurs when logging to the event handler it should still try writing a message to the log file. This means wrapping the code that logs to the event handler in a try ... catch clause, otherwise the log function will abort before it gets a chance to log to the log file. Brian May - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Rainer Meier wrote: There is nothing really to debug here. In case of quiet mode (/quiet flag set at command line or quiet flag set to true in config.xml) it is simply using the Windows logEvent method. In case that one fails it is a Windows issue. Try commenting just the logEvent method. If it fails, then the event log space might be full, try cleaning the logs. Where is the event log stored? However it might also be that you just misconfigured WPKG. Which value did you assign to the logLevel (either command line switch or config.xml)? Please read the documentation in config.xml how the value is constructed. It is handled as a bitmask. So probably it's just wrongly set so you don't see all log output. Set it to 0xFF for the moment. The configuration is identical to the other computers that were working; I think it is 0xFF In your output from the original post I see _ONLY_ debug severity output. So you might have set logLevel to something like 8 or 16. The binary representation of 8 is 1000, therefore the bits for error, warning and information are not set - so it's not logging them. The INFO (and higher) messages weren't getting logged because this is what cause wpkg to crash. Would it be possible to wrap those lines of code in a try/catch clause? I don't think errors writing to the event handler should be fatal and cause wpkg to abort. Brian May - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Hi Brian, Brian May wrote: Where is the event log stored? Right click my computer, select manage, click Event Viewer, right click Application, chose Clear all Events. The configuration is identical to the other computers that were working; I think it is 0xFF OK. The INFO (and higher) messages weren't getting logged because this is what cause wpkg to crash. Would it be possible to wrap those lines of code in a try/catch clause? I don't think errors writing to the event handler should be fatal and cause wpkg to abort. No, WPKG does not crash on your system - this for sure not. And there is absolutely no need to wrap in in a try-catch clause. The reason is that whole WPKG is wrapped in a try-catch clause. So if anything throws an unexpected exception, then it will be catched and a nicely formated message will be logged to the event log. But more and more I have the feeling that your event log does not work as expected and either it just hangs there (Windows call hangs, not WPKG) or it is simply ignored. I see from your logs that every debug message is printed up to the point that the language-local user notification should be logged to eventlog. Next entry would be something like: 2008-04-18 06:45:46, INFO: User notification suppressed. Message: Das WPKG Software-Installationstool in... This message would be logged to event log using the logEvent() method I already pointed out. So you might do the following: Check your event log for errors (Application and System logs - see above how to reach there). Then clean all the logs. Run WPKG and check the event log for a user notification entry - or even more output depending on the number of packages to be installed. If it still does not work for you, then try disabling quiet mode (remove /quiet flag, set quiet flag to false within config.xml) and run WPKG on the command line: cscript \\server\path\to\wpkg.js /synchronize Then check what is printed on the console. In fact I am quite sure that you will have some errors logged in your System log. They might help to fix your system. br, Rainer - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Rainer Meier wrote:= No, WPKG does not crash on your system - this for sure not. And there is absolutely no need to wrap in in a try-catch clause. The reason is that whole WPKG is wrapped in a try-catch clause. So if anything throws an unexpected exception, then it will be catched and a nicely formated message will be logged to the event log. But more and more I have the feeling that your event log does not work as expected and either it just hangs there (Windows call hangs, not WPKG) or it is simply ignored. I will have a look at the code ASAP. However, the fact remains, if I comment the code out it works. If I leave the code it, wpkg.js exits without doing anything else. Check your event log for errors (Application and System logs - see above how to reach there). Then clean all the logs. Ok, I will check this. Thanks. Got to go now, will investigate more on Monday. Brian May - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Hi Brian, Brian May wrote: I will have a look at the code ASAP. However, the fact remains, if I comment the code out it works. If I leave the code it, wpkg.js exits without doing anything else. I don' think you need to look at the WPKG code since it is about a simple API call. It looks like it either waits or just does nothing. This is a Windows issue, not WPKG. Of course it helps if you just omit this call - but then you don't get any output on your event log. So I write it again, and again... You could try commenting just the line which calls logEvent() - then you know exactly if Windows hangs there. But then it's most probably because the event log is full and it waits for some space to become available. If you disable silent mode (again, I wrote that already) this code will not be called. In case you disable the logEvent() line, then for sure you won't get any event log entry since all logs written to event log are written by this single line. So don't complain that id does nothing - it is working in the background but you just muted it :-o And let me repeat again... WPKG does not seem to crash for you. Most probably just the API call is hanging. So it is useless trying to catch an exception if there is simply no exception thrown by Windows on the logEvent() call. You wrote since the beginning, that it only seems to happen on this one computer. So you should probably fix this one computer instead of re-writing WPKG ;-) I thought to remember that somebody reported a similar problem where an error was logged about full event log. After cleaning it it was OK again. br, Rainer - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Hi Jens Jens Geile wrote: I remember a machine in my setup that didnt log anything to the event log anymore because it was full. This happened after running wpkg in debug mode two or three times (previous log entries left there). Cleaning the event log solved this and wpkg logged its actions again. Thanks for information. Was it just not logging (but executing properly) or was it also hanging somehow when trying to write log entries? It looks like Brian is experiencing the second problem. However I guess there should be at least some information within the system log if there is a problem with the event log system. Or does anybody know another way how to trace event log system problems? br, Rainer - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Hi Jens, Jens Geile wrote: I don't remember. :p But I'll just set a machine to debug and restart it a couple of times to reproduce this later today and report back. Thanks for your support. I am not at home (where my testbed is) so I cannot do that at the moment. On the other side Brian might have another issue as well. Hopefully there is some error within his event logs he could provide. br, Rainer - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Brian May wrote: Ok, now I commented out this code in log(type, destination): //if ((type 7) 0 || isDebug()) { // if(isQuiet()) { // WshShell = WScript.CreateObject(WScript.Shell); // WshShell.logEvent(type, description); // } else { // alert(description); // } //} Now it works! Ok, how do I go about debugging the problem with this code? Thanks. Brian May - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Brian May schrieb: Tomasz Chmielewski wrote: Does it really crash here (i.e., cscript process is not running)? I will have to double check. If it is not still running, it is very slow (as in taking hours). I have seen it run slow other times, but not this slow. The next message should be: INFO : User notification suppressed. Message: Could you paste your config.xml? Nothing really spectacular: ?xml version=1.0 encoding=utf-8 ? config param name='log_file_path' value='hq\\wpkg-status' / param name='logfilePattern' value='[HOSTNAME].log' / /config Everything else is defaults. I meant, config.xml you use for wpkg.js. -- Tomasz Chmielewski http://wpkg.org - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Tomasz Chmielewski wrote: I meant, config.xml you use for wpkg.js. What I pasted is the only config.xml file I have. Is there support for more then one? Brian May - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Brian May schrieb: Tomasz Chmielewski wrote: I meant, config.xml you use for wpkg.js. What I pasted is the only config.xml file I have. Is there support for more then one? You're correct. I must be still sleeping ;) -- Tomasz Chmielewski http://wpkg.org - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Tomasz Chmielewski wrote: Does it really crash here (i.e., cscript process is not running)? I will have to double check. If it is not still running, it is very slow (as in taking hours). I have seen it run slow other times, but not this slow. The next message should be: INFO : User notification suppressed. Message: Could you paste your config.xml? Nothing really spectacular: ?xml version=1.0 encoding=utf-8 ? config param name='log_file_path' value='hq\\wpkg-status' / param name='logfilePattern' value='[HOSTNAME].log' / /config Everything else is defaults. I guess it is possible that the log file being on the network is slowing things down, however networking speed seems fine at other times. Brian May - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users
Re: [wpkg-users] wpkg.js crashing?
Brian May wrote: Tomasz Chmielewski wrote: Does it really crash here (i.e., cscript process is not running)? I will have to double check. If it is not still running, it is very slow (as in taking hours). I have seen it run slow other times, but not this slow. cscript doesn't seem to be running. What is odd is that it seems to crash at different points, I can't see a pattern yet. On this occasion it stopped right after connecting to the server (last event message is Server connecting: successfully done). Brian May - Reporting bugs, all WPKG mailing lists http://wpkg.org/Support ___ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users