ceylon.net.http intermittently the next "GET" that comes in after a "DELETE" hangs

55 views
Skip to first unread message

Andrew Oliver

unread,
Apr 19, 2013, 11:46:09 AM4/19/13
to ceylon...@googlegroups.com
Every other time I do an http delete then get, the get request hangs...  The same code works throughout the application at least most of the time.  When I pause the XNIO threads in the debugger after the first delete, one is in epoll and the other is in FileChannelImpl.transferFrom(ReadableByteChannel, long, long) line 644 and the second one is in epoll.  After the second time, they are both there.  Eventually the first one ends up in Throwable.fillInStackTrace(int) seemingly after a ClosedChannelException in that same transferFrom method.  Then it goes back to that transferFrom.  Until I hit stop, my laptop fan continues to rise.  I don't know much about undertow but I'm thinking it is a bug in it or maybe xnio I suppose...  Can anyone confirm?



client side:

$.ajax({
 type: "DELETE",
 url: url,
 data: { '_method':'delete', 'authenticity_token': "lJxO7oZQ460Rw3+4bk/aO9kpKhdO3+bUFmt+cByPsC8=", },
 success: function(data){
retrieveContactList();
}});

  1. Request URL:
  2. Request Method:
    DELETE
  3. Status Code:
    200 OK
  4. Request Headersview source
    1. Accept:
      */*
    2. Accept-Charset:
      ISO-8859-1,utf-8;q=0.7,*;q=0.3
    3. Accept-Encoding:
      gzip,deflate,sdch
    4. Accept-Language:
      en-US,en;q=0.8
    5. Connection:
      keep-alive
    6. Content-Length:
      88
    7. Content-Type:
      application/x-www-form-urlencoded; charset=UTF-8
    8. Host:
      localhost:8080
    9. Origin:
    10. Referer:
    11. User-Agent:
      Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22
    12. X-Requested-With:
      XMLHttpRequest
  5. Form Dataview sourceview URL encoded
    1. _method:
      delete
    2. authenticity_token:
      lJxO7oZQ460Rw3+4bk/aO9kpKhdO3+bUFmt+cByPsC8=
  6. Response Headersview source
    1. Connection:
      keep-alive
    2. Transfer-Encoding:
      chunked

followed by

var url = "/contacts/"+strId+".json";
$.get(url, function(data){
//console.log(data);
$("#frmName").val(data['name']);
$("#frmAddress").val(data['address']);
$("#frmPhone").val(data['phone']);
$("#frmEmail").val(data['email']);
});

  1. Request URL:
  2. Request Headersview source
    1. Accept:
      */*
    2. Referer:
    3. User-Agent:
      Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Ubuntu Chromium/25.0.1364.160 Chrome/25.0.1364.160 Safari/537.22
    4. X-Requested-With:
      XMLHttpRequest
  3. Query String Parametersview sourceview URL encoded
    1. _:
      1366384773793




Andrew Oliver

unread,
Apr 19, 2013, 3:06:44 PM4/19/13
to ceylon...@googlegroups.com
It only does this on delete method, PUT works fine.

Matej Lazar

unread,
Apr 20, 2013, 9:21:01 PM4/20/13
to ceylon...@googlegroups.com

Hi Andrew,

I've been able to reproduce this issue with a test
https://github.com/ceylon/ceylon-sdk/blob/master/test-source/test/ceylon/net/server.ceylon#L226

It seems the problem wasn't just with DELETE, but also with other methods, where form data parsing is in chain.

This issue is fixed, but I hit another one (multipart post) that should be already solved in newer versions of Undertow.

I will try to use latest Undertow and merge fixes to 0.5.x branch.


Matej.
--
You received this message because you are subscribed to the Google Groups "ceylon-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceylon-users...@googlegroups.com.
To post to this group, send email to ceylon...@googlegroups.com.
Visit this group at http://groups.google.com/group/ceylon-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Andrew Oliver

unread,
Apr 22, 2013, 11:20:17 AM4/22/13
to ceylon...@googlegroups.com
Thanks man.  The article comes out Thursday most likely.
Reply all
Reply to author
Forward
0 new messages