Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Programming Software IT Technology Linux

Webservice Debugs Linux Binaries While-U-Wait 219

null-und-eins writes "A new webservice offers automatic debugging of Linux binaries. It takes a (with "-g" compiled) binary and two invocations where one fails and the other doesn't. The service repeatedly runs the two programs and tries to find the smallest difference between the two that causes the failure. Nice google-like interface with statistics about its own performance."
This discussion has been archived. No new comments can be posted.

Webservice Debugs Linux Binaries While-U-Wait

Comments Filter:
  • by Theatetus ( 521747 ) * on Friday November 21, 2003 @05:16PM (#7532584) Journal

    ...these guys allow me to upload any linux executable, which they will then execute in a gdb context?

    Alfred, prepare the rootkit!

  • by Space cowboy ( 13680 ) on Friday November 21, 2003 @05:16PM (#7532586) Journal
    Now we've got it debugging the code, we only need to get it started writing the code, and we're sorted :-)

    Simon
  • Why... (Score:4, Funny)

    by O2n ( 325189 ) on Friday November 21, 2003 @05:17PM (#7532603) Homepage
    Why ask Igor when you can ask slashdot [slashdot.org]? :-)
  • One thing I've learned from working on and encouraging students to use GPL programs is that they are largely much higher in quality than other standard programming code deliverables.

    Therefore, I challenge the author of this article to state why Linux code would need to be debugged.

    I mean, honestly -- have YOU ever seen a function or class or subroutine in Linux that WASN'T damn near perfectly coded?
    • I see some folks left work early today to head to the bars...

      either that or the sarcasm is a little too subtle in this one...
    • by phorm ( 591458 ) on Friday November 21, 2003 @06:00PM (#7532960) Journal
      You must be joking. While some of the more "mature" projects are definately solidly coded, some of the others are nightmares. Try mixing several different coding styles, nights coding on only caffeine, starting, stopping, and losing your place...leaving debug to-fix-later code in by accident...

      Open source suffers the same problems as closed. In some projects moreso, as the variance of different coding styles/standards-adherance can lead to very interesting things happening. Even some mature projects have this problem, I've heard of some common ones where a rewrite was considered, because as the code evolved and was added to, the author(s) learned much better coding as it progressed but left the core a bit flaky.
    • I mean, honestly -- have YOU ever seen a function or class or subroutine in Linux that WASN'T damn near perfectly coded?

      Yes, most of it. The majority of recent open-source software is badly-written, non-portable dreck that'll build, sometimes, on a short list of Linux platforms.

      All the worlds a RedHat box is as bad an assumption as all the world's a Sun or all the world's a VAX.

      The redeeming factor is that a major reason for this is that there's so much open source code. So while the fraction that i

  • by Kadagan AU ( 638260 ) <kadaganNO@SPAMgmail.com> on Friday November 21, 2003 @05:19PM (#7532625) Journal
    ...When I was trying to figure out what the hell was making my program crash! I figured it out, and got it fixed, but it took me 6 hours to pin point it! Something like this can (hopefully) be very useful next time I have a program that unexpectedly seg faults! =)
    • Between valgrind and ddd, I haven't had any bugs which I couldn't identify in a half hour, and only ones where there is something that the tools are bad at take more than a few minutes. Of course, that doesn't include programs that run fine but produce results which are simply not what I wanted and actually coming up with a way to fix the bug.

      Valgrind, in particular, is really promising; the core architecture is now being used to identify potential race conditions (cases where different threads access the
      • If you check the FAQ page out [uni-sb.de], you'll see that one of "the people behind AskIgor" is Andreas Zeller, the guy who co-created DDD.

        This is a tool, nothing more. Computers are deterministic state machines, but the state machine is essentially infinite. Anything that cuts down the number of states you need to look at is good.
  • poor admin... (Score:3, Interesting)

    by Dreadlord ( 671979 ) on Friday November 21, 2003 @05:21PM (#7532647) Journal
    I site's admin configured the site to forward visitors to the google cache of the site, but if you actually try to debug something, you get back to the real site, poor admin, he thought he could get away from /.ing!
    • I site's admin configured the site to forward visitors to the google cache of the site, but if you actually try to debug something, you get back to the real site, poor admin, he thought he could get away from /.ing!

      but how many people are going to submit code right away? they might look at it, bookmark it, and some time later *maybe* try it out.

      i thought it was a good idea to do that.
    • Re:poor admin... (Score:5, Informative)

      by Andreas Zeller ( 726074 ) on Friday November 21, 2003 @05:53PM (#7532907) Homepage
      Most people coming from /. just have a look at the main site. By redirecting, we reduce traffic by about 50% and Apache load by 75%. If you want to go beyond (and maybe submit some buggy program), you're welcome!
  • So... (Score:2, Insightful)

    If you have a working version, why do you need the debugger?
    • wellsir (Score:2, Insightful)

      Your program may fail if invoked one way and work if you invoke it some other way.

      Hence this [askigor.org].
    • If it works with one set of arguments and not with another.
    • The summary is confusing, but from looking at askigor.com I think what it means is that you give it two sets of input, one that works and one that doesn't, and it executes the program both ways and tries to find the differences so you can look to those places as potential bugs.
    • Re:So... (Score:3, Informative)

      by bogado ( 25959 )
      Read again, it is two diferent runs, one that will work and the other that will segfault. For instance, if program is called "foo" and you call it with the line "foo bar" and all goes fine, but then you call it "foo baar" and it goes boink. The site can magicly tell what's wrong.
  • Linux developers and soap....

    back to the drawing board guys!
  • This is cool but (Score:5, Insightful)

    by Safiire Arrowny ( 596720 ) on Friday November 21, 2003 @05:38PM (#7532794) Homepage
    I think this is a neat idea, but I wonder why it isn't a standalone program you can run yourself as well as/instead of a web interface.

    This is because I wonder why he wants to run the risk of running foreign binaries (sandbox or not) when he could have just not done that. There doesn't seem to be any advertising on the page, so that isn't it.

    Oh well, maybe he just thinks it's cooler this way, actually it kinda is, so long as it's safe for him I guess.
    • Easy answer: So he can steal your programs!

      (OK, maybe not steal, but you know what I mean)
      • by ThisIsFred ( 705426 ) on Friday November 21, 2003 @07:27PM (#7533519) Journal
        If you find this service useful...

        I'm going to set-up a new MP3-checking site. It inspects the MP3s you upload and tells you whether or not they are protected by copyright. If the MP3s contain copyrighted material, the server informs the user, then saves a copy of the file for, uh, ahem, closer long-term inspection by the site administrator. Contacting the RIAA won't be necessary since it's already been established that the content is copyrighted, and the user warned. It's like RIAA copyright infringer amnesty, but without the legal gotchas!

        Why take chances? Do a batch upload of all your MP3s and save yourself from a lot of legal hassles!

        p.s. Please upload only MP3s encoded at 160Kbps/high quality or better. Quality is very important to the copyright determination process.
        • Re:This is cool but (Score:3, Informative)

          by Krellan ( 107440 )
          Funny that you should mention MP3's. I looked at AskIgor's site, and a key patent for their technology is owned by... Fraunhofer!

          http://www.st.cs.uni-sb.de/askigor/faq.php#paten t

          I'd look at their technology and admire it, but keep a good distance away, unless you want to get shaken down for huge sums of money at a later date!
    • Re:This is cool but (Score:5, Informative)

      by Andreas Zeller ( 726074 ) on Friday November 21, 2003 @06:07PM (#7533004) Homepage
      We're running AskIgor as a Web service (instead of a standalone program) for two reasons:
      • We get a set of programs for regression testing.
      • We get some ratings about the quality of our work.
      Although we did our best to give AskIgor a decent interface, it's still a research prototype, and there's many possible ways to go. Your submissions help us making these decisions, and guide our future development.
      • Aside from being just plain useful, I can see this being educational for inexperienced coders, as a way to get examples of how to fix their work. Nice.

  • Ok igor... (Score:3, Funny)

    by retro128 ( 318602 ) on Friday November 21, 2003 @05:44PM (#7532848)
    The program I'm trying to run that is causing my computer to fail is "rm -rf". What's wrong?
    • Re:Ok igor... (Score:5, Informative)

      by Andreas Zeller ( 726074 ) on Friday November 21, 2003 @05:48PM (#7532869) Homepage
      No problem. Igor runs your program in a sandbox whose contents get restored with each new submission.
      • Re:Ok igor... (Score:3, Interesting)

        by retro128 ( 318602 )
        Well that fine for the file system, but does it have protected memory space for each session? If so, wouldn't that get kind of demanding on the system? If not, how do you stop people from messing with the core OS?

        • Any Unix already provides the protected memory space protecting from messing with the core OS. Assuming that it's run as a regular user that doesn't have access to use the network (I think netfilter can do this) and you have reasonable filesystems everywhere, it's pretty safe. To prevent DOS attacks he'll also need a per-user process and memory limit. Not sure if any unix can do a per user memory limit, but at least a user can't use more than (max number of processes * max size per process) of memory.

          Somet
          • Forgive me, but I know very little about UNIX programming. Does this mean that if you were to write a program that tweaks memory addresses that don't belong to it, it will be stopped?
            • Good old SIGSEGV. That's what happens when you deference null pointers, write to memory that's not yours, etc. It's the most common crash-n-burn error an application will experience. Windows calls these "Program Errors" or something now in XP. I forget. It use to call them "Access Violations". IIRC only Windows ME->98->95 had the "feature" that you could destroy other program's memory if you didn't follow all the rules.
          • Solaris has per user, group and project limits on many resources including virtual memory.
    • Try running it as root
  • by El ( 94934 )
    This site wouldn't happen to also, uh... keep a copy of the working code?
  • Is this trying to replace the cardboard cutout dog [sjbaker.org] as everyone's favorite debugging tool?
  • Question (Score:3, Interesting)

    by pavon ( 30274 ) on Friday November 21, 2003 @06:22PM (#7533101)
    I presume igor had some bugs when you were writing it. Was it able to find it's own problems? :)
    • Re:Question (Score:5, Informative)

      by Andreas Zeller ( 726074 ) on Friday November 21, 2003 @06:50PM (#7533300) Homepage
      The core technology behind Igor is delta debugging [uni-sb.de], a general method to determine the difference between a working and a failing scenario.

      While not applying AskIgor (being a huge mix of Python, PHP, and SQL) on itself, we have applied delta debugging on various parts of AskIgor to detect failure-inducing code changes, and especially failure-inducing GDB commands.

      We're currently working on Eclipse plugins [uni-sb.de] written in Java, and working on Java - and these will work 100% on themselves.

      • The service is all fine and dandy, but it is useless if the program you have a problem with is an interactive program. This can only handle programs with parameters and where the parameters causes the problem. That is probably the cause of failure in 0.00001% of all programs.
  • by Elwood P Dowd ( 16933 ) <judgmentalist@gmail.com> on Friday November 21, 2003 @06:23PM (#7533107) Journal
    Smart kids. Redirecting to their google cache.

    I wonder what happens on google's next cache update, if you're doing something like that. Do you get a google cache within a google cache? Or does google just forget about you?
  • by penguin7of9 ( 697383 ) on Friday November 21, 2003 @07:05PM (#7533400)
    This fields has decades of history. A good starting point, should you like to explore it, is here [nmsu.edu].
  • Honestly, not to belittle the effort here, but in my experience if you've gotten to the point where you absolutely know that some input to your program will cause a crash it is very easy to find the bug and fix it.

    The REAL problem bugs are the ones where the same input on different machines will give different results, or the same input on the same machine will give different results during different runs.

    Kinda cool technology, I guess, but speaking as someone who has programmed in C/C++ professionally

    • Kinda cool technology, I guess, but speaking as someone who has programmed in C/C++ professionally for about 9 years now, I just don't see this as being useful in 99.99% of debugging cases, and the ones where it might be useful are pretty easy to solve just by tracing the stack once you know what the 'problem' input is.

      I agree. I have ten years' professional experience, and I honestly can't recall a single instance in which something like this would have been useful. The really tough problems are usuall
    • We're talking about two different issues here - reproducing the bug and actually understanding how it came to be. Most bugs are easy to reproduce and easy to understand, just by re-invoking them and looking at the stack trace.

      Some bugs, though, are hard to reproduce, which means that you should set up appropriate isolation and monitoring layers in your program. The recent issue of Communications of the ACM, for instance, has a nice article on record/replay of program executions, which solves all problem

  • Hmm... (Score:3, Informative)

    by AlXtreme ( 223728 ) on Friday November 21, 2003 @07:33PM (#7533544) Homepage Journal
    However, Passau University has filed international patents for the automatic isolation of cause-effect chains from computer programs--that is, Delta Debugging applied to program states. This is the core technology of AskIgor. This means that if you want to make money out of AskIgor technologies, you'll have to license the patent.
    AskIgor FAQ [uni-sb.de]

    Arg, I thought us Euro's didn't have to worry about software patents anymore. Then again, isn't it a bit weird to have AskIgor licensed under the GPL and filing patents on it at the same time? IANAL, but is this possible? You file a patent to make cash from it by licensing it to others (or using the technique yourself), or you make it opensource and give it away freely. They say that "Delta Debugging" isn't patented, but when it's applied to program states it is (will be).

    Gotta love IP...

    • Re:Hmm... (Score:2, Informative)

      We are well-aware that this is a conflict, and we're currently working on this. Sorry, no further comment on this matter.
    • In some cases the GPL and patents actualy achieve similar end goals. They both allow someone to publish work and let others use it that would otherwise have been kept a trade secret.

      Personally I don't believe that the GPL and patents conflict. In particular you can give a license to use your patented technology freely as long as it is used in the GPL'd code. You can then also charge licenses for the patented technology for non GPL usage cases.
    • every heard of pre-emptive patents? You can patent something before company X does and then give out licenses freely within whatever terms you want eg the usage must also be GPLed. wouldn't it be nice if someone had done that with one-click purchasing or a variety of other 'obvious' patents.
    • The GPL basically says "if you distribute software with this license and you have patents governing methods used in the software, you grant a perpetual patent license to anybody who obtains, in accordance with this license, the software or any legitimate derivative works, which patent license extends at least to the use and/or distribution of such."

      In other words, if you use the gpl'd delta debugging software or its derivatives in a way which complies with the GPL, Passau University can't sue you for pate
  • by 3Suns ( 250606 ) on Friday November 21, 2003 @08:08PM (#7533692) Homepage
    Nice google-like interface...

    What, you mean like a textbox?
  • ...and launch the premptive strike?
  • Hmmm... That sounds like a really good deal. But I think I got a better one: How about a special webserver with an artificial intelligence engine and a database containing a description of every bug in every program ever made. All you have to do when you have a problem, no matter what that problem is, is write an email that goes along the lines of, "I installed a program and it didn't work," and the server looks in its database, figures out some AI stuff, and sends a reply that tells *exactly* where the pro
  • by DraconPern ( 521756 ) on Friday November 21, 2003 @09:58PM (#7534174) Homepage
    multithreaded programs? Does it catch race conditions and such?
  • Patents (Score:3, Insightful)

    by Quelain ( 256623 ) on Friday November 21, 2003 @10:10PM (#7534217)
    Igor FAQ:

    "The Eclipse plug-ins are licensed under the GNU public license." ...

    "The basic Delta Debugging technique (narrowing down relevant circumstances by experiments) is not covered by any patent (as far as we know); in fact, we have released Delta Debugging plug-ins for Eclipse under a GNU license.

    However, Passau University has filed international patents for the automatic isolation of cause-effect chains from computer programs--that is, Delta Debugging applied to program states. This is the core technology of AskIgor. This means that if you want to make money out of AskIgor technologies, you'll have to license the patent. (That's how Passau University attempts to get some revenue from its research.) Patent licenses are handled by the Fraunhofer Society in the BayernPatent initiative. "

    GPL:

    "For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program."

    WTF?

    Maybe there is some difference between what the Eclipse plugins do and what AskIgor does, but it's not very clear from the FAQ if that is the case.
  • So, it comes out! This [slashdot.org] is what happens when you toy with your system ;)
  • some-linux-box% cat tst.c
    #include <string.h>

    int main(int argc, char **argv)
    {
    if (strcmp(argv[1], "gezuntereit") == 0) {
    char *c = (char *)0;
    *c = "gloodorf";
    }
    sleep(5);
    exit(0);
    }

    some-linux-box% uname -a
    Linux some-linux-box 2.4.20 #2 Mon Mar 17 22:02:15 PST 2003 i686 unknown
    some-linux-box% gcc -v
    Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/3.2.2/specs
    Configured with: ../gcc-3.2.2/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --disable-

    • Our sandbox crashed around 4AM, while all maintainers were sleeping. Thus, all 45 later submissions got these "internal errors". I have restarted Igor to recompute all failed submissions, including the one above; just try again later.

      I'm sorry for the inconvenience, and have made sure this problem won't happen again. But remember that this is a research project, and we can't sit besides the machine 24/7.

      • Hey, no problem. I just posted the information in case my submission did something bizaare and you needed to ... "debug" igor.

        By the way, the papers are pretty interesting.

      • For those who didn't recognise the name, this fine gentleman is responsible for DDD. which has saved me (and a lot of other developers I've known in school and professionally) lots and lots of hours of debugging time.

        Andreas, I'd just like to say thanks.

        Andreas is mentioned with a blurb in the FAQ, but I know most Slashdot readers don't read the main page in the article, much less links off the main page. It should have been mentioned in the submission.
  • Does this assume that the program is deterministic? By this I mean that the program always follows the same code path for the same inputs, or, put another way, that no randomness is involved.

    -c
  • Ask Igor seems to be an implementation of delta debugging [uni-sb.de]. You can use the delta [berkeley.edu] program to implement this on your own system. You choose a test program (or 'harness') and an input that causes the harness to exit with success; for example your harness might run some executable and test to see if it segfaults - if so success. Then you give an initial input that passes the test (eg causes the segfault). Delta chops out lines of text to find a minimal (or at least 1-minimal, see the website) test case that

Put your Nose to the Grindstone! -- Amalgamated Plastic Surgeons and Toolmakers, Ltd.

Working...