Giter Site home page Giter Site logo

Comments (9)

rewolff avatar rewolff commented on August 15, 2024

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.

depaoli avatar depaoli commented on August 15, 2024

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.

rewolff avatar rewolff commented on August 15, 2024

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.

depaoli avatar depaoli commented on August 15, 2024

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.

uhle avatar uhle commented on August 15, 2024

You might try out this patch from https://bugs.launchpad.net/mtr/+bug/1273486/+attachment/4135564/+files/len-sizeof-patch.diff .

from mtr.

numericillustration avatar numericillustration commented on August 15, 2024

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.

QwertyZW avatar QwertyZW commented on August 15, 2024

Running into this with

~% mtr --version
mtr 0.86

from mtr.

chrcoluk avatar chrcoluk commented on August 15, 2024

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.

rewolff avatar rewolff commented on August 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.