openwpm / OpenWPM

A web privacy measurement framework
https://openwpm.readthedocs.io
Other
1.33k stars 314 forks source link

Can't kill already killed process #535

Open vringar opened 4 years ago

vringar commented 4 years ago

In #474 we see in the logs that we can't kill an already killed process. This happens because we assume that a WebDriverException means that we still have a handle to the process, while in this specific circumstance it means that we never had a process in the first place. So we try to access the PID of or to kill a non-existent process. We could introduce special handling for this case like we did for neterror and and wrap it in an Exception that then gets handled in the catch outside the loop, which would kill the BrowserManager process

vringar commented 4 years ago

This error is easily reproduced when starting OpenWPM without xhost set in a docker container. It basically means there is not webdriver process as selenium can't cope with the fact that firefox fails to spawn and we just mark this as normal failure where it probably should be a critical failure. A fix to this would also include a test that creates a non headless browser being spawned and the plattform surviving the failure to spawn.