Project

General

Profile

Regression #11550

Segmentation fault when loading ALTQ traffic shaping rules using FAIRQ

Added by Thorsten Zitterell about 2 months ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Traffic Shaper (ALTQ)
Target version:
Start date:
02/26/2021
Due date:
% Done:

0%

Estimated time:
Affected Version:
2.5.0
Affected Architecture:
amd64
Release Notes:
Default

Description

I have upgraded from 2.4.5p1 to 21.02/21.02p1 on my SG-4860.

Following traffic shaper rule causes an segmentation fault:


[21.02-RELEASE][admin@firewall]/root: pfctl -vf /tmp/rules.debug
[...]
altq on igb0 fairq bandwidth 1Gb tbrsize 36000 queue { qLink qAck qOthersHigh qVoIP qOthersLow }
Segmentation fault (core dumped)

As a result other rules are not loaded and NAT does not work.

shaper.xml (3.73 KB) shaper.xml Thorsten Zitterell, 02/26/2021 08:08 AM

History

#1 Updated by Jim Pingle about 2 months ago

  • Tracker changed from Bug to Regression
  • Project changed from pfSense Plus to pfSense
  • Subject changed from Segfault when Traffic Shaper is active to Segmentation fault when loading ALTQ traffic shaping rules
  • Category changed from Traffic Shaper (ALTQ) to Traffic Shaper (ALTQ)
  • Status changed from New to Feedback
  • Target version set to CE-Next
  • Affected Version set to 2.5.0

Unlikely that this is specific to Plus.

Can you attach the config.xml entries for the shaper? It would help to see the queue settings and so on to reproduce the issue locally.
Or at the very least, post the specific settings you put into the shaper wizard if that's what you used to create the queues.

#2 Updated by Thorsten Zitterell about 2 months ago

Jim Pingle wrote:

Can you attach the config.xml entries for the shaper? It would help to see the queue settings and so on to reproduce the issue locally.

<shaper> from config.xml attached.

#3 Updated by Jim Pingle about 1 month ago

Not that it should cause a segfault, but why are you mixing FAIRQ, PRIQ, and HFSC?

Does the crash happen if all your interfaces are using the same scheduler?

#4 Updated by Thorsten Zitterell about 1 month ago

Jim Pingle wrote:

Not that it should cause a segfault, but why are you mixing FAIRQ, PRIQ, and HFSC?

I used PRIQ for outgoing WAN interfaces, and FAIRQ for LAN interfaces because I wanted balanced rates to the internal hosts. The interface with HFSC was not enabled.

Does the crash happen if all your interfaces are using the same scheduler?

The crash does not happen if I use PRIQ for all interfaces. So it seems to be related to FAIRQ.

#5 Updated by Jim Pingle about 1 month ago

Have you tried only using FAIRQ instead of only using PRIQ? It's not clear from the symptom behavior if the problem is from FAIRQ alone or from mixing the two schedulers.

#6 Updated by Thorsten Zitterell about 1 month ago

Jim Pingle wrote:

Have you tried only using FAIRQ instead of only using PRIQ? It's not clear from the symptom behavior if the problem is from FAIRQ alone or from mixing the two schedulers.

When I use FAIRQ for all the interfaces, the segfault comes with the first rule.

The last lines of the trace are:


23153 pfctl CALL mmap(0,0x3000,0x3<PROT_READ|PROT_WRITE>,0x1002<MAP_PRIVATE|MAP_ANON>,0xffffffff,0)
23153 pfctl RET mmap 34367680512/0x800793000
23153 pfctl CALL write(0x1,0x800738000,0x6d)
23153 pfctl GIO fd 1 wrote 109 bytes
"altq on pppoe0 fairq bandwidth 1Mb tbrsize 1492 queue { qACK qLink qVoIP qOthersHigh qOthersMid qOthersLow }
"
23153 pfctl RET write 109/0x6d
23153 pfctl PSIG SIGSEGV SIG_DFL code=SEGV_MAPERR
23153 pfctl NAMI "/root/pfctl.core"

#7 Updated by Jim Pingle about 1 month ago

  • Subject changed from Segmentation fault when loading ALTQ traffic shaping rules to Segmentation fault when loading ALTQ traffic shaping rules using FAIRQ
  • Status changed from Feedback to New

OK, thanks for checking on that. I've updated the subject to reflect that it's specific to FAIRQ.

Also available in: Atom PDF