Closed Bug 811830 Opened 7 years ago Closed 2 years ago

DMError: Attempted to push a file ( to a directory (/system/b2g/ in install_gecko


(Testing :: Mozbase, defect)

Not set


(Not tracked)



(Reporter: ahal, Assigned: gbrown)




I'm not sure if this is an error with how we are setting things up in, or if it's a devicemanager pushFile()/dirExists() error. Filing in testing/marionette for now.
<wlach> ahal: I think we might have to call communicate() in isDirectory for it to work properly in all cases. we might have a race condition between stdout having data and us reading from it
<wlach> ahal: yeah I think it's more of a mozbase bug
<wlach> bleh, if this is true this is probably far from the only case in dmADB where this runCmdAs stuff is causing problems
Component: Marionette → Mozbase
QA Contact: hskupin
So I guess the question is what we want to do here. It looks like we're quite frequently calling read() on the Popen class returned by _runCmd frequently, without checking whether the process has actually terminated.

I think the proper solution is to make _runCmd call communicate() and return the stdout/stderr directly to the caller (instead of returning a subclass). In addition to modifying deviceManagerADB, we'd also need to modify anything that uses _runCmd directly:^[^\0]*%24&hitlimit=&tree=mozilla-central

If we're going to make these changes, it may also be worthwhile to modify some uses of _runCmd (both inside and outside dmADB, especially outside) to use shellCheckOutput, which has better error checking.

I don't really have the time to do this right now, but will probably will be able to tackle this at some point in the next few weeks. If anyone feels like fixing this in the interim, go ahead. :) In the mean time, this is probably a very infrequent problem.
Blocks: 812149
Thinking about this a bit more, I think the right solution is probably to replace _runCmd and _runCmdAs with functions that are less difficult to use.
Depends on: 816581
For some reason B2G xpcshell tests are consistently hitting this error only on the mozilla-b2g18 branch :(

This is probably top priority for me now.
Actually, upon further investigation, this is unrelated to this bug. It looks like the version of on the beta/b2g18 branch just needs to be updated.
Assignee: nobody → gbrown
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.