Comments (9)
Does it also crash for you when you specify a sensible value for the interval?
As written you're trying to send 100 packets per second to about 10 hosts, or about 1000 connection requests per second. I can imagine "unexpected" things to happen.
My mtr also bombed out. After about ten seconds. But you're running this "as root" to work around the "lower limit of 1.0 seconds per round". As the root user you can break your system by issueing the wrong commands or giving the wrong arguments.
On your computer things go wrong (a segfault) after about a second. On my computer it exits with "Socket: succes!" after 5 seconds or so. So the limit depends on the computer somehow. I could program in a new limit, that today works on your computer and on mine. But after a few years that limit will be too high as computers and networks have gotten faster. So I don't like such an arbitrary limit.
So... You are stress-testing your system and network by attempting to start 500 to 1500 connections per second. And lo-and-behold, something goes wrong.
I suspect the problem might be caused by some fundamental IPV4 limit: Maybe you're running out of socket numbers or something like that.
If it breaks, you get to keep both pieces.
If you can reproduce this with normal parameters, feel free to reopen this issue. It is a "won't fix" for me.
from mtr.
Hi!I have the same issue with mtr 0.85 installed through MacPorts: "bind(): Undefined error: 0".
Command used is "mtr --tcp www.google.it", but even with other parameters it fails everytime.
By doing "dtruss mtr --tcp www.google.com":
... stat64("/usr/lib/libxar.1.dylib\0", 0x7FFF5xx31368, 0x7FFF5xx32200) = 0 0 �[?1049h�[1;24r�(B�[m�[4l�[?7h�[H�[2J�[1;29H�(B�[0;1m�[1K My traceroute [v0.85] �(B�[mpc.lan (0.0.0.0)�[2;56HSat Apr 19 17:02:25 2014 Keys: �(B�[0;1mH�(B�[melp �(B�[0;1mD�(B�[misplay mode �(B�[0;1mR�(B�[mestart statistics �(B�[0;1mO�(B�[mrder of fields �(B�[0;1mq�(B�[muit�[4;37H�(B�[0;1m Packets�[15X�[4;62HPings Host�[5;37H Loss% Snt Last Avg Best Wrst StDev�[H �(B�[m�[24;1H�[?1049l �[?1l�>�[?1049h�[1;24r�(B�[m�[4l�[?7h�[H�[2J�[1;29H�(B�[0;1m�[1K My traceroute [v0.85] �(B�[mpc.lan (0.0.0.0)�[2;56HSat Apr 19 17:02:25 2014 Keys: �(B�[0;1mH�(B�[melp �(B�[0;1mD�(B�[misplay mode �(B�[0;1mR�(B�[mestart statistics �(B�[0;1mO�(B�[mrder of fields �(B�[0;1mq�(B�[muit�[4;37H�(B�[0;1m Packets�[15X�[4;62HPings Host�[5;37H Loss% Snt Last Avg Best Wrst StDev�[H �(B�[mbind(): Inappropriate ioctl for device ... bind(0xD, 0x7FFxxF2xx610, 0x80) = -1 Err#22 ... ioctl(0x2, 0x8048xx15, 0x7FE8B84xx1E0) = -1 Err#25 ioctl(0x2, 0x8048xx15, 0x7FFF5xx32500) = -1 Err#25 ...
Any thought about "[mbind(): Inappropriate ioctl for device"?
Thanks
from mtr.
If you specify "-r" option the "truss" output will not be interspersed with escape sequences to handle the full-screen-output. Or otherwise send the truss output somewhere else. On Linux we have "strace" which does the same as truss. It has an -o option to save it to a file.
from mtr.
It looks like "-r" is not available:
$ dtruss -r /usr/bin/dtruss: illegal option -- r USAGE: dtruss [-acdefholLs] [-t syscall] { -p PID | -n name | command } -p PID # examine this PID -n name # examine this process name -t syscall # examine this syscall only -a # print all details -c # print syscall counts -d # print relative times (us) -e # print elapsed times (us) -f # follow children -l # force printing pid/lwpid -o # print on cpu times -s # print stack backtraces -L # don't print pid/lwpid -b bufsize # dynamic variable buf size eg, dtruss df -h # run and examine "df -h" dtruss -p 1871 # examine PID 1871 dtruss -n tar # examine all processes called "tar" dtruss -f test.sh # run test.sh and follow children
Anyway, I have played with Xcode and it looks like something is going wrong around net.c line 340 (http://tinyurl.com/l8b5akn):
if (bind(s, (struct sockaddr *) &local, sizeof (local))) { //here we get the error 22 - ?EINVAL? display_clear(); perror("bind()"); exit(EXIT_FAILURE); }
By modifying this code to:
if (bind(s, (struct sockaddr *) &local, sizeof (struct sockaddr))) { display_clear(); perror("bind()"); exit(EXIT_FAILURE); }
Bind() seems happy, but I don't have any hop printed in the output, just:
matrix:mtr dpm$ sudo ./mtr --tcp --report --port 80 8.8.8.8 Start: Fri Apr 25 12:38:23 2014 HOST: pc.lan Loss% Snt Last Avg Best Wrst StDev
from mtr.
You might try out this patch from https://bugs.launchpad.net/mtr/+bug/1273486/+attachment/4135564/+files/len-sizeof-patch.diff .
from mtr.
though this issue is closed, its still happening, so in case it is useful I've created a gist of the dtruss output from running the following in a separate terminal
sudo dtruss -flesal -n mtr
during the crash from running: sudo mtr --tcp 8.8.8.8
from mtr.
Running into this with
~% mtr --version
mtr 0.86
from mtr.
I have this problem FreeBSD 11.2, TCP mode with no other flags specified
mtr --version
mtr UNKNOWN
O_o, it is 0.92 tho.
from mtr.
You can help me reproduce it by restating the command I need to try to get what you see. Maybe a cut-and-paste of both the command and the crashing output.
from mtr.
Related Issues (20)
- cygwin 3.4.6 failure starting overlapped thread pipe read (code 232) HOT 6
- Feature request: mapping mode HOT 28
- CygWin build broken pipe problem HOT 2
- Running 'mtr -r www.google.com -c 1' leads to segmentation fault HOT 2
- Issue for `mtr-packet` while building customized version of mtr
- mtr with unspecified destination HOT 2
- Windows 11 x64 installation HOT 4
- --psize option to randomize packet size
- on cygwin build error HOT 1
- Using the -f option changes the packet rate. HOT 1
- Next release
- Show whether ICMP, UDP, or TCP is currently used HOT 1
- Show target ip when use -r or -j HOT 1
- BUG: Interface-specific binding and packet marking broken HOT 13
- Show source address when use -r HOT 1
- Proposal: Refactor Address Selection Logic for Enhanced Compatibility and Testability HOT 5
- MaxMind DB for Location HOT 9
- where can i get mtr 0.95? HOT 2
- traceroute does not stop on subnet router anycast addresses on linux routers HOT 2
- Implement DNF flag to set/clear Do Not Fragment bit
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtr.