This repository has been archived by the owner. It is now read-only.

Ubuntu can get wedged in epoll_wait #3491

Closed
isaacs opened this Issue Jun 19, 2012 · 2 comments

Comments

Projects
None yet
2 participants
@isaacs

isaacs commented Jun 19, 2012

Probably a libuv issue. Found while running node tests:

> isaacs@7527bd77-ab3e-474b-ace7-eed6053931e7:~/node$ i=0; while ./node test/sple/test-domain-http-server.js ; do echo $i; let i++; done
listening on localhost:12346
server error { [TypeError: Converting circular structure to JSON]
  domain_thrown: true,
  domain: 
   { members: [ [Object], [Object] ],
     _events: { error: [Function] } } }
server error { name: 'AssertionError',
  message: 'Data should not be undefined',
  actual: false,
  expected: true,
  operator: '==',
  domain_thrown: true,
  domain: 
   { members: [ [Object], [Object] ],
     _events: { error: [Function] } } }
requests=5 responses=1
client error { [SyntaxError: Unexpected token A]
  domain_thrown: true,
  domain: 
   { members: [ [Object], [Object] ],
     _events: { error: [Function], dispose: [Function] } } }
requests=5 responses=2
json! bar
requests=5 responses=3
json! [ 1, 2, 3 ]
requests=5 responses=4
client error { [SyntaxError: Unexpected token T]
  domain_thrown: true,
  domain: 
   { members: [ [Object], [Object] ],
     _events: { error: [Function], dispose: [Function] } } }

And the process hangs forever.

GDB has this to say: https://gist.github.com/2955079

@ghost ghost assigned bnoordhuis Jun 19, 2012

@bnoordhuis

This comment has been minimized.

Show comment Hide comment
@bnoordhuis

bnoordhuis Jun 19, 2012

Member

It seems some of the handles get stuck:

[-A-] prepare  0xe797a0
[-A-] check    0xe79800
[R--] idle     0xe79860
[-A-] check    0xe798c0
[---] idle     0xe79920
[-A-] timer    0xe79980
[R-I] idle     0xe7b5c8
[-AI] async    0xe7b508
[-AI] async    0xe7b568
[RA-] tcp      0x2380630
[---] tty      0x2380a10
[R--] timer    0xe7b6f8
[R--] tcp      0x2381180
[R--] tcp      0x238e780
[R--] tcp      0x238ebd0
[R--] tcp      0x238f120
[RA-] timer    0x238f510
[---] tty      0x23ab870
[RA-] tcp      0x2380d70
[RA-] tcp      0x238e8d0
[RA-] tcp      0x23ad320
[RA-] tcp      0x23ad4b0

(R=ref'd, A=active, I=internal. Only active handles keep the event loop alive.)

That active timer may be the culprit, it's got a 23 days timeout:

(gdb) p ((uv_timer_t*)0x238f510)->timeout / (86400*1000.)
$2 = 23.742012199074072

EDIT: I take that last bit back. The timeout is offset against loop->time. Correcting for that, the timeout turns out to be a very reasonable two minutes.

Member

bnoordhuis commented Jun 19, 2012

It seems some of the handles get stuck:

[-A-] prepare  0xe797a0
[-A-] check    0xe79800
[R--] idle     0xe79860
[-A-] check    0xe798c0
[---] idle     0xe79920
[-A-] timer    0xe79980
[R-I] idle     0xe7b5c8
[-AI] async    0xe7b508
[-AI] async    0xe7b568
[RA-] tcp      0x2380630
[---] tty      0x2380a10
[R--] timer    0xe7b6f8
[R--] tcp      0x2381180
[R--] tcp      0x238e780
[R--] tcp      0x238ebd0
[R--] tcp      0x238f120
[RA-] timer    0x238f510
[---] tty      0x23ab870
[RA-] tcp      0x2380d70
[RA-] tcp      0x238e8d0
[RA-] tcp      0x23ad320
[RA-] tcp      0x23ad4b0

(R=ref'd, A=active, I=internal. Only active handles keep the event loop alive.)

That active timer may be the culprit, it's got a 23 days timeout:

(gdb) p ((uv_timer_t*)0x238f510)->timeout / (86400*1000.)
$2 = 23.742012199074072

EDIT: I take that last bit back. The timeout is offset against loop->time. Correcting for that, the timeout turns out to be a very reasonable two minutes.

@bnoordhuis

This comment has been minimized.

Show comment Hide comment
@bnoordhuis

bnoordhuis Jun 27, 2013

Member

Closing. I'm pretty sure this got fixed, the test never hangs anymore.

Member

bnoordhuis commented Jun 27, 2013

Closing. I'm pretty sure this got fixed, the test never hangs anymore.

@bnoordhuis bnoordhuis closed this Jun 27, 2013

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.