Mailing List Archive

#1763: tolerate EINTR in accept() ?
#1763: tolerate EINTR in accept() ?
----------------------+-------------------
Reporter: slink | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Keywords:
----------------------+-------------------
Accidentally seen when sending make check into the background, do we want
to tolerate EINTR in accept() ?
{{{
*** v1 12.7 debug| Child (31710) died signal=6\n
*** v1 12.7 debug| Child (31710) Panic message:\n
*** v1 12.7 debug| Assert error in vwe_thread(),
waiter/cache_waiter_epoll.c line 114:\n
*** v1 12.7 debug| Condition(n >= 0) not true.\n
*** v1 12.7 debug| errno = 4 (Interrupted system call)\n
*** v1 12.7 debug| thread = (cache-epoll)\n
*** v1 12.7 debug| version = varnish-trunk revision 0dd8c0b\n
*** v1 12.7 debug| ident =
Linux,3.16.0-4-amd64,x86_64,-jnone,-smalloc,-smalloc,-hcritbit,epoll\n
*** v1 12.7 debug| Backtrace:\n
*** v1 12.7 debug| 0x43245f: pan_ic+0x12f\n
*** v1 12.7 debug| 0x462b2e: vwe_thread+0x47e\n
*** v1 12.7 debug| 0x7f6c3161b0a4: libpthread.so.0(+0x80a4)
[0x7f6c3161b0a4]\n
*** v1 12.7 debug| 0x7f6c3135004d: libc.so.6(clone+0x6d)
[0x7f6c3135004d]\n
*** v1 12.7 debug| \n
*** v1 12.7 debug| \n
*** v1 12.7 debug| Child cleanup complete\n
**** v1 12.7 vsl| 3 Debug - Accept failed:
Interrupted system call
**** v1 12.7 vsl| 3 Debug - Accept failed:
Interrupted system call
**** v1 12.7 vsl| 0 Backend_health - vcl2.default Still sick
------- 1 3 8 0.000000 0.000000
**** v1 12.7 vsl| 0 CLI - Rd ping
**** v1 12.7 vsl| 0 CLI - Wr 200 19 PONG 1436770414
1.0
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1763>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1763: tolerate EINTR in accept() ? [ In reply to ]
#1763: tolerate EINTR in accept() ?
----------------------+--------------------
Reporter: slink | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------

Comment (by martin):

There is another use case for this. When attempting to attach gdb to a
running varnishd, it asserts on the same issue. Would've been useful to be
able to do that in some debugging scenarios.

Martin

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1763#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1763: tolerate EINTR in accept() ? [ In reply to ]
#1763: tolerate EINTR in accept() ?
----------------------+--------------------
Reporter: slink | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------

Comment (by phk):

I've poked this a bit, and found that we'd have to ignore EINTR a largeish
number of places for this to become reliable, that feels a bit on the
"fast&loose" side to me, but I'll look at it some more.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1763#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1763: tolerate EINTR in accept() ? [ In reply to ]
#1763: tolerate EINTR in accept() ?
----------------------+--------------------
Reporter: slink | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------

Comment (by lkarsten):

Also reported in #1822.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1763#comment:3>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1763: tolerate EINTR in accept() ? [ In reply to ]
#1763: tolerate EINTR in accept() ?
----------------------+--------------------
Reporter: slink | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution:
Keywords: |
----------------------+--------------------

Comment (by lkarsten):

Agreed on bugwash today: propose a patch for the *poll/kqueue waiters, and
see if it is sufficient.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1763#comment:4>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1763: tolerate EINTR in accept() ? [ In reply to ]
#1763: tolerate EINTR in accept() ?
----------------------+-----------------------------------------------
Reporter: slink | Owner: Martin Blix Grydeland <martin@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution: fixed
Keywords: |
----------------------+-----------------------------------------------
Changes (by Martin Blix Grydeland <martin@…>):

* owner: => Martin Blix Grydeland <martin@…>
* status: new => closed
* resolution: => fixed


Comment:

In [765b6d3b3bb6f96e2c5945abe998ba9016327116]:
{{{
#!CommitTicketReference repository=""
revision="765b6d3b3bb6f96e2c5945abe998ba9016327116"
Restart epoll_wait on EINTR error

This works around a Linux kernel bug where the epoll_wait will return
EINTR when the process is subjected to a ptrace or the OS wakes from
suspend.

Fixes: #1763
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1763#comment:5>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1763: tolerate EINTR in accept() ? [ In reply to ]
#1763: tolerate EINTR in accept() ?
----------------------+-----------------------------------------------
Reporter: slink | Owner: Martin Blix Grydeland <martin@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: trunk
Severity: normal | Resolution: fixed
Keywords: |
----------------------+-----------------------------------------------

Comment (by Lasse Karstensen <lkarsten@…>):

In [df4ef3b99acba107fc69e1d0e07ab262bb2d1ba6]:
{{{
#!CommitTicketReference repository=""
revision="df4ef3b99acba107fc69e1d0e07ab262bb2d1ba6"
Restart epoll_wait on EINTR error

This works around a Linux kernel bug where the epoll_wait will return
EINTR when the process is subjected to a ptrace or the OS wakes from
suspend.

Fixes: #1763
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1763#comment:6>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs