Taskkill used to kill iedriver process, resulting in leakage of the global atom table

600 views
Skip to first unread message

Ender

unread,
Jan 25, 2016, 11:56:35 PM1/25/16
to Selenium Users
hi all,
    I'm using selenium webdriver (for Internet Explorer). When the script execution timeout, I use the taskkill command to kill iedriverserver.exe process. But I find GlobalAtom Table and RWM Atom Table information iedriver registered no release.
    Such as:
// GlobalAtom Table
C08C = 8783062 --GlobalAtom
// RWM Atom Table
C37D = C: \ Users \ ADMINI ~ 1 \ AppData \ Local \ Temp \ IED77B2.tmp --RWM

    After a long run, GlobalAtom Table and RWM Atom Table space will be filled, resulting in the following error message:
Description: Failed to create atom
Error = 8: Not enough storage is available to process this command.

Atoms are stored as two-byte integers (uint16) and there can be 0xFFFF-0xC000=0x4000 (16384) entries maximum. If 0xFFFF is reached ERROR 8 is returned ("System Error. Code: 8. Not enough storage is available to process this command")

After the above error occurs, Selenium will not run properly, you need to reboot the operating system to recover.
Please help me how to solve this problem?

ps: ATOM table to monitor the use https://github.com/JordiCorbilla/atom-table-monitor

David

unread,
Jan 26, 2016, 2:53:11 PM1/26/16
to Selenium Users
Curious, how are you executing taskkill on IEDriver? Can you list out the full command used?

Ender

unread,
Jan 27, 2016, 12:04:12 AM1/27/16
to Selenium Users
Such as:

try {
   
Runtime.getRuntime().exec("taskkill /F /IM IEDriverServer.exe");
} catch (IOException e) {
    e
.printStackTrace();
}


Krishnan Mahadevan

unread,
Jan 27, 2016, 12:08:22 AM1/27/16
to Selenium Users
Why doesnt driver.quit() not work for you in those cases ? The driver.quit() internally should take care of cleaning up the IEDriverServer.exe instances automatically.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c7dd64cd-f662-40c7-8113-da30df58096e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mallik H

unread,
Jan 28, 2016, 6:15:59 AM1/28/16
to Selenium Users
Using windows PowerShell command:

String command = "kill -processname chrome";
Runtime runtime = Runtime.getRuntime();
Process proc  = runtime.exc(command )
Thread.sleep(2000);

Thanks,
Mallikarjun

David

unread,
Jan 28, 2016, 9:06:59 PM1/28/16
to Selenium Users
On Krishnan's note, the OP did mention script execution timeout, that to me seems to infer that WebDriver/IEDriver hung and there is a separate monitoring thread that monitors execution time, and on timeout invoke cleanup code to prevent the driver hanging forever. In such case, driver.quit() is likely not accessible as the driver hung.

If that is not the case, Ender/OP, please clarify the implementation details of your script execution timeout monitoring.

Krishnan Mahadevan

unread,
Jan 28, 2016, 9:44:48 PM1/28/16
to Selenium Users
David,

What monitoring mechanism are you talking about ? Can you please elaborate a bit more on that ? To the best of my knowledge I dont remember seeing any such mechanism in the client bindings [ atleast not in the Java ones ]

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

David

unread,
Jan 29, 2016, 1:51:59 PM1/29/16
to Selenium Users
Krishnan, I don't mean built-in monitoring mechanism from Selenium WebDriver (don't think such exists) but what is available to the given language being used. No language provides off the shelf "monitoring mechanism" either, but one can put one together from code & libraries. What I was referring to is making use of threads (as an example, other methods may be possible) to have one thread monitor (main thread) Selenium test/command execution, and should the test/command exceed a given test timeout, it kills the test (e.g. WebDriver instance, etc.) and does any needed cleanup. Alternatively, some test frameworks (JUnit? TestNG?) probably already provide some of this capability of setting test timeouts and calling a tearDown/cleanup function on timeout.

Ender

unread,
Jan 30, 2016, 3:03:37 AM1/30/16
to Selenium Users
Hi all,
    Thank you very much help. I'm sorry now reply.
    I re-examined the code that will remove kill iedriverserver.exe method, and run the program in a test environment. I found that because after calling driver.quit (), there is a chance, ieDriverserver.exe not closed immediately.  Old code method will kill iedriverserver.exe delay five seconds to perform, but not enough to make ieDriverserver.exe normal exit. After a long run, which leads Atom leaks.
    Short-term operation of the new code modified as follows:
    1. RWM Atom Table, it has been non-existent, such as: ... / ED77B2.tmp
    2. In GlobalAtom Table, there are still a large number such as: '8783062', such random number retained in the table.
    I have to manually create the data filled GlobalAtom Table space. And then executes the script and did not affect the normal operation of the program. The actual operation, but also need time to observe.
    Owing to time constraints, the above information may exist omissions. 
   
   Many thanks & best regards
   Ender
Reply all
Reply to author
Forward
0 new messages