| Summary: | Launching a process fails | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Michael Spivak-Baranov <Michael.Spivak.Baranov> |
| Component: | TPTP | Assignee: | Igor Alelekov <igor.alelekov> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P1 | CC: | guru.nagarajan, karla.callaghan |
| Version: | unspecified | Keywords: | plan |
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | closed460 | ||
| Attachments: | |||
Michael - Please turn on debug logging, then repeat this error and attach the resulting servicelog.log (located in the config directory) to this bugzilla. You turn on debug logging by editting the file config/serviceconfig.xml, change the "Logging" tag entry: format="Simple" level="DEBUG". The log file will show the actual pathname for the executable that the process controller is trying to launch. Created attachment 55240 [details]
first-pause_exit-yes_output-yes_servicelog.log
Created attachment 55241 [details]
no-pause_exit-no_output-no_servicelog.log
Created attachment 55242 [details]
second-pause_exit-yes_output-no_servicelog.log
Created attachment 55243 [details]
two-pauses_exit-yes_output-yes_servicelog.log
Created attachment 55244 [details]
test3_two-pauses_events-no_servicelog.log
Created attachment 55245 [details]
serviceconfig.xml
Created attachment 55246 [details]
batch file
Created attachment 55247 [details]
Client test application
Additional information. I launched the batch file 1.bat inserting “pause” command before “dir”, after it, and both before and after it. I did it to delay execution of the “dir” command and delay exiting the process. The client sends strings to the console after the process is launched. It makes the batch file continue working. Please look at the client test application. The appropriate code is in the method “Test2()” So, I carried out four experiments: 1. No “pause” commands are in the batch file. So, it looks as dir d:\temp I did not get “process exited” event, and no output reached the client DataProcessor. The log file is “no-pause_exit-no_output-no_servicelog.log” 2. The batch file is pause dir d:\temp Everything was ok. I got “process exited” event and all the output of the process. The log file is “first-pause_exit-yes_output-yes_servicelog.log” 3. The batch file is dir d:\temp pause I got “process exited” event, but no output reached the client DataProcessor. The log file is “second-pause_exit-yes_output-no_servicelog.log” 4. The batch file is pause dir d:\temp pause Everything was ok. I got “process exited” event and all the output of the process. The log file is “two-pauses_exit-yes_output-yes_servicelog.log” Then I tried to get an event using addEventListener method of IProcess interface. The appropriate code is in the method “Test3()” I did not get any event. The log file is “test3_two-pauses_events-no_servicelog.log” I attached all these log files, serviceconfig.xml, 1.bat, and the sources of the client test application. Assigning to Igor, and targetting 4.4 Bug 166831 is a duplicate of this bug. Created attachment 57719 [details]
The patch fixes losing of console data and losing of processExited event for short launched processes
1. Race condition arises with short processes launching. As a result, console data could arrive and be lost before launched process is registered.
2. When a short process is launched and terminated, corresponding commands (processStarted and processExited) could arrive in one message, but in this case command processor loses one command.
The patch fixes these issues and also implements enhancement request #167208
Guru, the patch fixes issues in the execution framework. Please review the patch. Igor - can you regenerate the patch and upload it. Created attachment 58241 [details]
regenerated patch
Guru, I uploaded the regenerated patch. Patch applied and verified *** Bug 166831 has been marked as a duplicate of this bug. *** Created attachment 58962 [details]
additional patch
To prevent possible deadlock it is better to move notification of process listeners in another thread.
Igor - if you think the original fix is incomplete, then please re-open this bug. If this is a side issue, open a new bug. Guru, please review the additional patch which completes the fix. I will do so after this iteration is complete. Meanwhile the earlier patch applied caused a regression in the TI client. So I had to modify some of the code. Will add details The additional patch fixes the problem with the TI client. I've tested this yesterday. The last patch does resolve the issue. As of TPTP 4.6.0, TPTP is in maintenance mode and focusing on improving quality by resolving relevant enhancements/defects and increasing test coverage through test creation, automation, Build Verification Tests (BVTs), and expanded run-time execution. As part of the TPTP Bugzilla housecleaning process (see http://wiki.eclipse.org/Bugzilla_Housecleaning_Processes), this enhancement/defect is verified/closed by the Project Lead since this enhancement/defect has been resolved and unverified for more than 1 year and considered to be fixed. If this enhancement/defect is still unresolved and reproducible in the latest TPTP release (http://www.eclipse.org/tptp/home/downloads/), please re-open. |
If I launch the process with the following lines of code, I get the message "No such file or directory" on console just before the output of the ls command appears (I set a DataProcessor for the console). process.setLocation("."); process.setExecutable("/bin/ls"); process.setParameter("."); My platform for the AC: Red Hat Enterprise Linux ES release 3 (Taroon Update 6) My platform for the client in Java: Windows XP, Java Sun 1.4.2_13