Commit bc47f04
stress-ovpn: bound the wait for an rtnetlink reply
ovpn_rt_send() retried EINTR unconditionally, so the SIGALRM that ends
the run was swallowed on every iteration and the worker never learned it
had to stop: a --timeout run outlived its own timeout and needed SIGKILL
from outside to clear. EAGAIN cannot occur on a blocking socket, so
merging it into the same branch only obscured which case was being
handled. The loop had no deadline either, re-entering a blocking
recvmsg() whenever a datagram is parsed to the end without a terminating
message - latent today, since the only caller passes no callback and
NLM_F_ACK is therefore always set.
Set SO_RCVTIMEO and split the two cases: EAGAIN now means the deadline
expired and is reported as -ETIMEDOUT, while EINTR still retries but
gives up once stress_continue_flag() has dropped. Five seconds is far
longer than an rtnetlink round trip; across runs of twenty instances,
including one under slab fault injection, it never expired.
Also correct the comment above the NLM_F_ACK decision, which says the
opposite of what the code does.
Signed-off-by: Gianmarco De Gregori <gianmarco@mandelbit.com>1 parent e0601c6 commit bc47f04
1 file changed
Lines changed: 44 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
252 | 259 | | |
253 | 260 | | |
254 | 261 | | |
| 262 | + | |
255 | 263 | | |
256 | 264 | | |
257 | 265 | | |
| |||
279 | 287 | | |
280 | 288 | | |
281 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
282 | 302 | | |
283 | 303 | | |
284 | 304 | | |
| |||
357 | 377 | | |
358 | 378 | | |
359 | 379 | | |
360 | | - | |
| 380 | + | |
361 | 381 | | |
362 | 382 | | |
363 | 383 | | |
| |||
393 | 413 | | |
394 | 414 | | |
395 | 415 | | |
396 | | - | |
397 | | - | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
398 | 439 | | |
399 | 440 | | |
400 | 441 | | |
| |||
0 commit comments