Menu ▾ ▴

#1662 deadlock: main/JS executor on HtmlPage

Latest SVN
accepted
RBRi
None
1
2015-01-22
2015-01-21
No

Hello,

with htmlunit trunk and the the following code:

package playground;

import java.io.IOException;
import java.net.MalformedURLException;

import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.NicelyResynchronizingAjaxController;
import com.gargoylesoftware.htmlunit.WebClient;

public class Playground {
        public static void main(String[] args) throws FailingHttpStatusCodeException, MalformedURLException, IOException {
                WebClient wc = new WebClient();
                wc.getOptions().setJavaScriptEnabled(true);
                wc.getOptions().setThrowExceptionOnFailingStatusCode(false);
                wc.getOptions().setThrowExceptionOnScriptError(false);
                wc.setAjaxController(new NicelyResynchronizingAjaxController());

                wc.getPage("<REDACTED_URL>");   
        }

}

I end up in a deadlock. jstack dump attached.

It's a customer site and because of that I can't post the URL. I've tried solving the problem on my own unsuccessfully. Any more data you need (apart from the URL), or if there's anything I can do w/ regards to debugging, let me know.

Cheers,
Sebastian Cato

1 Attachments

Discussion

  • RBRi

    RBRi - 2015-01-21

    From a first look i guess you are simulating IE8 or at least a browser with JS_WINDOW_POST_MESSAGE_SYNCHRONOUS set. Correct?

     
  • RBRi

    RBRi - 2015-01-21
    • status: open --> accepted
    • assigned_to: RBRi
     
  • Sebastian Cato

    Sebastian Cato - 2015-01-22

    Yes. I'm using the exact code above and

            System.out.println("BrowserVersion: " + wc.getBrowserVersion()  
    
                    + "   JS_WINDOW_POST_MESSAGE_SYNCHRONOUS: " + wc.getBrowserVersion().hasFeature(BrowserVersionFeatures.JS_WINDOW_POST_MESSAGE_SYNCHRONOUS));
    

    confirms that it is IE8 and JS_WINDOW_POST_MESSAGE_SYNCHRONOUS is set. Using a BrowserVersion like IE8 with JS_WINDOW_POST_MESSAGE_SYNCHRONOUS disabled does not lead to a deadlock.

     
  • RBRi

    RBRi - 2015-01-22

    Is it ok for you to switch off this feature or use a different browser?

    Fixing the issues will not be that easy.

     
  • Sebastian Cato

    Sebastian Cato - 2015-01-22

    Yes, it works for me. Thank you!

     
  • RBRi

    RBRi - 2015-01-22

    Will leave the issue open for some time because the rule of your deadlock is a general problem we have in our code. Maybe i will wake up some day with an idea.

     

Log in to post a comment.