Closed Bug 499745 Opened 15 years ago Closed 15 years ago

unable to launch process from pythonCE reliably

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Windows Mobile 6 Professional
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED WONTFIX

People

(Reporter: jmaher, Unassigned)

References

Details

Aki has outlined the basics on his HTC setup page:
https://wiki.mozilla.org/User:Asasaki:TouchProSetup#Talos_steps

If you use osce and pythonce, you can launch a process from python.  Using blockingtee() results in the output redirected to a file (default: \Temp\tee.txt), but when calling it multiple times in a row (3rd time is the magic number) python crashes.  This doesn't work for how we run unittests on mobile since we need to run a series of small chunks to avoid the tests from hanging (suspected memory issues).
using blassey's private build of pythonCE, we have very good success launching processes.  The method for retrieving a log file is to pass a handle to stdout/stderr.  This process works, but the device locks up very frequently.  I have never made it to 100 log files in a row without a device reboot.  Sometimes I cannot even make it >1 log file.
after further investigation, I have found this:
1) I seem to crash at the 23rd or 24th test in my testpass for xpcshell
2) I have made it end to end by caching the output strings into an 8k buffer and printing out when full.  This effectively reduces the # of writefile() calls.  This has got me end to end 2/3 tries.
3) writing out 100000 lines of text from xpcshell via python script worked 30 times in a row
4) writing out 10000 lines of text from xpcshell via python script fails within 20 iterations
5) running .js files from xpcshell -f <script> fail when inline javscript works via xpcshell -e "inline script".
6) commenting out the writefile() call in python _subprocess.c allows me to run xpcshell tests end to end reliably.

So my conclusions come to the fact that our logging (writefile() in subprocess.c) is causing a hang on the device.  This is a factor of the number of lines output from the process and the number of files we create.  It also points at a bug related to using xpcshell -f vs -e.
Blocks: 491903
(In reply to comment #2)
> after further investigation, I have found this:

> 3) writing out 100000 lines of text from xpcshell via python script worked 30
> times in a row
> 4) writing out 10000 lines of text from xpcshell via python script fails within
> 20 iterations
Is line 3 supposed to be "without python script"?  I'm kind of confused about what this is supposed to indicate.
no, it worked well with python.  That is really odd since nothing else works this reliably except this case (which happens to output by far the most data per iteration).
we're no longer perusing pythonce for our test framework
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
verified.
Status: RESOLVED → VERIFIED
Component: Windows Mobile → General
QA Contact: mobile-windows → general
You need to log in before you can comment on or make changes to this bug.