Page MenuHomeFreeBSD

[Bug 211031] [panic] in ng_uncallout when argument is NULL
ClosedPublic

Authored by mizhka on Jul 13 2016, 11:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 3:45 AM
Unknown Object (File)
Wed, Nov 6, 7:37 AM
Unknown Object (File)
Oct 6 2024, 3:35 PM
Unknown Object (File)
Oct 6 2024, 1:39 PM
Unknown Object (File)
Oct 3 2024, 2:11 PM
Unknown Object (File)
Oct 3 2024, 8:22 AM
Unknown Object (File)
Oct 3 2024, 4:16 AM
Unknown Object (File)
Sep 18 2024, 12:29 PM

Details

Summary

This patch allows to avoid panic from ng_uncallout with 11-ALPHA6 and 12-CURRENT when I unplug ethernet cable with active PPTP VPN connection.

db> bt
Tracing pid 902 tid 100675 td 0xfffff800169a1000
ng_uncallout() at ng_uncallout+0x3d/frame 0xfffffe04530b3580
ng_pptpgre_disconnect() at ng_pptpgre_disconnect+0xbb/frame 0xfffff*
ng_destroy_hook() at ng_destroy_hook+0xlfe/frame 8xfffffe84538b35d8
ng_ranode() at ng_ranode+0x75/frame 0xfffffe04538b3618
ng_apply_item() at ng_apply_itea+0x4ca/frame 0xfffffeB4538b36a8
ng_snd_item() at ng_snd_itea+0x3a9/frame 0xfffffeB4538b36e0
ngc_send() at ngc_send+0x21b/frame 0xfffffe04530b3790
sosend_generic() at sosend_generic+0x436/frame 0xfffffe04538b3850
kern_sendit() at kern_sendit+0x21b/frame Bxfffffe04538b390B
sendit() at sendit+0x19f/frame 0xfffffeB4530b3950
sys_sendto() at sys_sendto+0x4d/frame 0xfffffe04530b39a0
amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe04530b3ab0
Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffeB4530b3abB

  • syscall (133, FreeBSD ELF64, sys_sendto), rip = 0x80253906a, rsp - 0x7fffdfffd72B, rbp - 0x7fffdfffd770
Test Plan

Test case:

  • use wired ethernet connection
  • establish PPTP connection using mpd5
  • unplug ethernet cable (=> panic)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mizhka retitled this revision from to [Bug 211031] [panic] in ng_uncallout when argument is NULL.
mizhka updated this object.
mizhka edited the test plan for this revision. (Show Details)
mizhka set the repository for this revision to rS FreeBSD src repository - subversion.
ngie added inline comments.
sys/netgraph/ng_base.c
3817 ↗(On Diff #18392)

style(9): please use item != NULL instead

ngie added a reviewer: ngie.
ngie added subscribers: bz, ae.

Seems ok to me, modulo the style nit. I've added ae@/bz@ for comment (they might not be the right folks from net@ though...).

This revision is now accepted and ready to land.Jul 14 2016, 8:02 PM

Is this sudden problem possibly related to glebius' callout changes? I am not properly tracking things but if invariants changed and weren't reflected in the callers, that might explain.

In D7209#150056, @bz wrote:

Is this sudden problem possibly related to glebius' callout changes? I am not properly tracking things but if invariants changed and weren't reflected in the callers, that might explain.

I don't know to be honest.

I'll add glebius (I should have done that in the first place).

From my side this patch fixes issue with frequent crashes caused by reconnect of mpd5 pptp link ( 12.0-CURRENT r302535M amd64 ). Thank you

mizhka edited edge metadata.
  • style(9) change
  • no functional change

Tested, at least works for me

This revision now requires review to proceed.Jul 16 2016, 8:45 AM
This revision was automatically updated to reflect the committed changes.

This shoudn't be needed.. it should be panic condition if item is NULL.