Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iperf3: segfault on x86_64 #24668

Open
Djfe opened this issue Jul 25, 2024 · 11 comments
Open

iperf3: segfault on x86_64 #24668

Djfe opened this issue Jul 25, 2024 · 11 comments

Comments

@Djfe
Copy link

Djfe commented Jul 25, 2024

Maintainer: @nbd168
Environment: x86_64, Hewlett-Packard HP EliteDesk 800 G1 USDT, OpenWrt GCC 12.3.0 r23899+10-3001d3c5d4
This was an OpenWrt fork: Gluon v2023.2.3
Which runs:

OPENWRT_REPO=https://github.com/openwrt/openwrt.git
OPENWRT_BRANCH=openwrt-23.05
OPENWRT_COMMIT=3001d3c5d446bf53fc222640d49a4cc79e04a2f3

Description:
I just noticed this segfault in dmesg after running a couple of iperf3 commands (I'm not sure which one triggered it or if it could've been triggered by a STRG+C by accident)

[459397.930023] iperf3[4064]: segfault at 28 ip 00007ff50794da40 sp 00007ffe5a472880 error 4 in libc.so[7ff507928000+4c000] [459397.930195] Code: 41 5d 41 5e c3 48 8d 35 2e f2 03 00 e9 a1 ff ff ff 90 83 c8 ff c3 83 c8 ff c3 83 c8 ff c3 41 54 55 bd 01 00 00 00 53 48 89 fb <48> 8b 43 28 48 85 c0 74 08 48 ff c5 48 89 c3 eb ef 48 0f bf 43 50 
@Djfe
Copy link
Author

Djfe commented Jul 25, 2024

I forgot to mention @nbd168 (had to edit the post above)

@vincejv
Copy link

vincejv commented Jul 27, 2024

This seems like an upstream issue? I can reproduce it with other linux distros as well

@Djfe
Copy link
Author

Djfe commented Jul 27, 2024

how did you reproduce it? Just by running iperf3 or a special command?

@vincejv
Copy link

vincejv commented Jul 28, 2024

@Djfe see upstream
esnet/iperf#1694
esnet/iperf#1692
esnet/iperf#1681

It seems that the server crash because it receives "illegal" message from the client, and somehow it doesn't know to handle it well

I get this seg fault when i abruptly stop the client from performing the iperf test and then resuming with another client on the same port

@neheb
Copy link
Contributor

neheb commented Aug 27, 2024

Not fixed by 37ade7e ?

@vincejv
Copy link

vincejv commented Aug 27, 2024

@neheb x86_64 is little endian so that fix isn't applicable

@neheb
Copy link
Contributor

neheb commented Aug 27, 2024

It relates to JSON code.

Anyway, gdb is needed to figure this out.

@trenchcoatjedi
Copy link

trenchcoatjedi commented Nov 20, 2024

This is still an issue in current snapshots for this architecture.

# iperf3 -c server -P 4 -t 30
[ 1181.356729] iperf3[18191]: segfault at 28 ip 00007fa2adce41f2 sp 00007ffdc4444f40 error 4 in libc.so[7fa2adcb
d000+54000] likely on CPU 1 (core 1, socket 0)                                                                  
[ 1181.370686] Code: e9 a1 ff ff ff 90 b8 ff ff ff ff c3 b8 ff ff ff ff c3 b8 ff ff ff ff c3 41 54 55 bd 01 00 0
0 00 53 eb 07 48 83 c5 01 48 89 c7 <48> 8b 47 28 48 85 c0 75 f0 48 0f bf 47 50 48 89 fb 48 8d 14 80 48          
Segmentation fault 
# uname -a                                                                                        
Linux OpenWrt 6.6.61 #0 SMP Wed Nov 20 08:49:21 2024 x86_64 GNU/Linux 
# cat /etc/openwrt_release                                                                     
DISTRIB_ID='OpenWrt'                                                                                            
DISTRIB_RELEASE='SNAPSHOT'                                                                                      
DISTRIB_REVISION='r28141-52519a59a8'                                                                            
DISTRIB_TARGET='x86/64'                                                                                         
DISTRIB_ARCH='x86_64'                                                                                           
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r28141-52519a59a8'                                                        
DISTRIB_TAINTS='' 

@neheb
Copy link
Contributor

neheb commented Nov 20, 2024

iperf3 -c server -P 4 -t 30

is crashing on my mipsel device. Will investigate.

@neheb
Copy link
Contributor

neheb commented Nov 20, 2024

I'm getting

(gdb) bt
#0  0x77f8e06c in freeaddrinfo () from /lib/ld-musl-mipsel-sf.so.1
#1  0x77f05069 in create_socket () from /usr/lib/libiperf.so.0

I have a strong feeling esnet/iperf@3da07ae fixes it

@neheb
Copy link
Contributor

neheb commented Nov 20, 2024

Yep, will push.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants