Page 3 of 8 FirstFirst 12345 ... LastLast
Results 31 to 45 of 110

Thread: Amule client for wl500gp

  1. #31
    Quote Originally Posted by oleo View Post
    Both and neither. Your problem seems to be with _llseek. offset_high values are unreasonable high. I suspect amule! Read this excerpt:
    I can confirm that amuled 2.1.3 is crashing when downloading the files
    with "Bad system call". Everything is fine when amuled is just seeding.
    Maybe we will have to re-compile from the CVS.

  2. #32
    Quote Originally Posted by capes View Post
    can't login via the amuleweb, i creat the remote.conf file, but can't longin.
    any detail step for this funtion?
    it doesn't generate the remote.conf file in /opt/share/amule/.aMule/ after i run amuleweb -w, Where is that file?

  3. #33

    i do with an other way

    Quote Originally Posted by capes View Post
    it doesn't generate the remote.conf file in /opt/share/amule/.aMule/ after i run amuleweb -w, Where is that file?
    first, create remote.conf file manually, and then edit the /opt/etc/init.d/S57amuled

    Code:
    ...........
    start() {
            set backup=$HOME
            echo "Starting amuled..."
            echo "Configuration's setting are located in /opt/share/amule"
            export HOME=/opt/share/amule
            /opt/bin/amuled -f
            /opt/bin/amuleweb --config-file=/opt/share/amule/.aMule/remote.conf --quiet &
            export HOME=$backup
            echo "done"
    }
    ..........

  4. #34
    this script restart amuled if it crashes.
    (it does not guard amuleweb)


    Code:
    while true; do
    
    PID=`ps | grep amuled | grep -v grep`
    
    if ! test -z "$PID"; then
            PID=`su amule -c "amulecmd -f ~/.aMule/amule.conf -c status" | grep "Succeeded! Connection established"`
    fi
    
    if test -z "$PID"; then
            #running problems, restart
            killall amuled 2>/dev/null
            killall amuleweb 2>/dev/null
            sleep 1
            killall -9 amuled 2>/dev/null
            killall -9 amuleweb 2>/dev/null
            sleep 1
            su amule -c"amuled -f >/dev/null"
    fi
    
    sleep 5
    done
    this script could be run with command like /opt/sbin/amule_check & in post-mount script

    PS. Please, note script does not uses standard S57amuled to run amule, because running amule as a root is not a good idea IMHO.

  5. #35
    Quote Originally Posted by dimonb View Post
    this script restart amuled if it crashes.
    (it does not guard amuleweb)
    Well, restarting the daemon is not a proper solution - you may lose all
    of your UL credits etc. Will try to look at re-compiling the amuled from
    the latest CVS sources when my router comes back from the service.

  6. #36
    Quote Originally Posted by halleck View Post
    Well, restarting the daemon is not a proper solution - you may lose all
    of your UL credits etc. Will try to look at re-compiling the amuled from
    the latest CVS sources when my router comes back from the service.
    This script restart daemon only if it's crashes or does not responding. Crashing of amule is terrible fact, but it's happens :-(((

    it would be better to develop giFT plugin to work with eDonkey networks...

  7. #37
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    It seems that the large file crash problem is solved, thanks to the clue from dimonb. It is specific for uclibc and to some extent mipsel. I already posted detailed report in the Russian thread:

    http://www.wl500g.info/showthread.php?p=51681#post51681

    It happens because of buggy (or feature-rich?) setrlimit of uclibc. Maximum value of RLIMIT_FSIZE is RLIM_INFINITY which is defined as either (~0UL), or (~0UL >> 1) (latter includes also mips). setrlimit because of unknown idea of developer makes once again >> 1 . This is where 1Gb comes from.

    If I execute 'strace amuled -f 2> log.log' I get:
    Code:
    getrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    setrlimit(RLIMIT_DATA, {rlim_cur=1073741823, rlim_max=1073741823}) = 0
    getrlimit(RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    setrlimit(RLIMIT_FSIZE, {rlim_cur=1073741823, rlim_max=1073741823}) = 0
    getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
    setrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
    getrlimit(RLIMIT_RSS, {rlim_cur=7401488, rlim_max=4735824}) = 0
    setrlimit(RLIMIT_RSS, {rlim_cur=720283552, rlim_max=2147449912
    After patching strace gives:
    Code:
    getrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    getrlimit(RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
    getrlimit(RLIMIT_RSS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    After patching it seems that the problem of maximum file size waived at all (at least till 4Gb size, as larger files are not supported by aMule at all):

    Code:
    _llseek(13, 4205578240, [4205578240], SEEK_SET) = 0
    write(13, "\210\302\2568\10\25\322\16\225\350!\372\200OQ\6x\326\362"..., 10240) = 10240
    _llseek(13, 4205598720, [4205578240], SEEK_SET) = 0
    write(13, "\216\35{\312\347\305\271\247\243{\206\202\357\254\311`"..., 10240) = 10240
    _llseek(13, 4205608960, [4205608960], SEEK_SET) = 0
    write(13, "\36\250\2732;\354C!\356\232\376\352\365\202\177,~h\233"..., 10240) = 10240
    2oleo or someone involved in development. Could you please "peer review" this stuff and if you find it sane submit in a right place. It's my first development under linux (which consists of a double slash ).

    I suggest also to change S57amuled again to something like this:
    Code:
    #!/bin/sh
    PATH=/sbin:/bin:/usr/bin:/usr/sbin:/opt/bin:/opt/sbin
    
    #It is not safe to run amuled by the root
    #Before the first run you have to create user p2p or whichever you like
    USER=p2p
    DIR=/opt/home/p2p
    DAEMON=/opt/bin/amuled
    NAME=amuled
    NAME2=amuleweb
    
    start() {
      echo "Configuration's setting are located in $DIR"
      echo -n "Starting $NAME... "
      su $USER -c "export HOME=$DIR && $DAEMON -f"
      echo "done"
    }
    
    stop() {
      echo -n "Shutting down $NAME... "
      killall $NAME
      killall $NAME2
      echo "done"
    }
    
    case "$1" in
    	start)
    		start
    		;;
    	stop)
    		stop
    		;;
    	restart)
    		stop
    		sleep 1
    		start
    		;;
    	*)
    		echo "Usage: $0 (start|stop|restart)"
    		exit 1
    		;;
    esac
    I believe we have to enforce the user to chose more safe way.
    Attached Files Attached Files

  8. #38
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Could you post a patch to amule with "diff -u old new" here. I have also upgraded uclibc to 0.9.28.3 and waiting to upgrade the feeds as all of them should be rebuilded.

  9. #39
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    OK, now I hope I did the patch correctly.
    Attached Files Attached Files

  10. #40
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Patch added with http://trac.nslu2-linux.org/optware/changeset/5903

    Not very clever though. We could also go undefining HAVE_ or setting
    PHP Code:
    #ifndef __UCLIBC__

    #endif 
    to make it universal. But until then, ...

  11. #41
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    Even better approach would be to fix uclibc's setrlimit to make it arch dependent instead of weird >>1 , as any application in optware/oleg feed using this function has this problem.

    However, at the moment this is not the biggest problem. After your compilation the issue is not solved. The patch is applied, because there are no calls to setrlimit, however, getrlimit returns 700Mb instead of RLIM_INFINITY.

    Code:
    getrlimit(RLIMIT_DATA, {rlim_cur=716175296, rlim_max=720250752}) = 0
    getrlimit(RLIMIT_FSIZE, {rlim_cur=716175296, rlim_max=720250752}) = 0
    getrlimit(RLIMIT_NOFILE, {rlim_cur=716175296, rlim_max=720250752}) = 0
    getrlimit(RLIMIT_RSS, {rlim_cur=7401488, rlim_max=9442296}) = 0
    So, in the new build file-size-limit is lower than before. This behavior is not related to my patch, but might be due to the changes in the uclibc library, or differences in the build system, (or even in the execution environment?). The second is most likely. The size of my amuled binary is 3723Mb, the size of you binary is 3243Mb.

    Here is my build system (created according to http://www.nslu2-linux.org/wiki/Optw...ckageToOptware ):
    openSuSE 10.2
    mkdir /opt/optware
    cd /opt/optware
    svn co http://svn.nslu2-linux.org/svnroot/optware/trunk optware
    edit /opt/optware/Makefile : OPTWARE_TARGET ?= oleg
    make directories ipkg-utils
    make

    After compiling toolchain and creation of about 10 packs (including amule-2.1.3-6.ipk) I stopped it. Then I edited /opt/optware/builds/amule/src/amule.cpp

    I was compiling it while being in /opt/optware with make amule

    What is wrong?

  12. #42
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Could you please verify if the updated uclibc library works without your patch. I am planning to merge uclibc-unstable branch back to trunk.
    Here is what you do:
    Code:
    svn co http://svn.nslu2-linux.org/svnroot/optware/branches/uclibc-unstable unstable
    cd unstable
    export OPTWARE_TARGET=oleg
    make directories 
    make toolchain
    make amule
    You will need to replace all packages on your system with packages that you built. This means at least uclibc-opt, ipkg-opt, amule and dependent packages.

    Newest toolchain uses gcc 4.1.2 and latest uclibc 0.9.28.3
    I did not verify if limits work as espected, but I've created this branch to softland mediatomb exception handling with SJLJ.

    If you will find that amule have the same symptmoms, then we will create patch for uclibc! Either by backport from 0.9.29 or from scratch.

  13. #43
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    OK, I hope I did what you've expected.
    I compiled the unstable toolchain and packages as you wrote. Then I set up a spare flash-drive as /opt and started to install newly compiled packages as usually:
    mkdir /opt/tmp
    mkdir /opt/tmp/ipkg
    ipkg.sh update
    ipkg.sh install ipkg

    after that i started to install locally compiled packages. I haven't succeed only with ipkg-opt, as ipkg was already installed

    amule shows:

    Code:
    getrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    setrlimit(RLIMIT_DATA, {rlim_cur=704010*1024, rlim_max=4674376}) = 0
    getrlimit(RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    setrlimit(RLIMIT_FSIZE, {rlim_cur=704010*1024, rlim_max=4674376}) = 0
    getrlimit(RLIMIT_NOFILE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    setrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
    getrlimit(RLIMIT_RSS, {rlim_cur=2147450584, rlim_max=4674512}) = 0
    setrlimit(RLIMIT_RSS, {rlim_cur=704010*1024, rlim_max=2147449144}) = 0
    as a response to

    Code:
    static void UnlimitResource(RLIMIT_RESOURCE resType)
    {
    #if defined(HAVE_GETRLIMIT) && defined(HAVE_SETRLIMIT)
    	struct rlimit rl;
    	getrlimit(resType, &rl);
    	rl.rlim_cur = rl.rlim_max;
    	setrlimit(resType, &rl);
    #endif
    }
    Do you understand something? I can only say that while compiling on my computer I get correct initial RLIMITs in all cases. setrlimits works wrong in both cases.
    Last edited by al37919; 11-04-2007 at 05:37.

  14. #44
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    To isolate the problem I suggest the folowing program rlimit.c
    PHP Code:
    #include <sys/time.h>
    #include <sys/resource.h>

    static void UnlimitResource(int resType)
    {
            
    struct rlimit rl;
            
    getrlimit(resType, &rl);
            
    rl.rlim_cur rl.rlim_max;
            
    setrlimit(resType, &rl);
            
    getrlimit(resType, &rl);
    }

    int main()
    {
            
    UnlimitResource(RLIMIT_DATA);
            
    UnlimitResource(RLIMIT_FSIZE);
            
    UnlimitResource(RLIMIT_NOFILE);
            
    UnlimitResource(RLIMIT_RSS);

    Compile it with buildroot-4.1.2-13 under router with
    gcc rlimit.c and report its output of strace ./a.out.

    When I've compiled it with buildroot-4.1.1-12 I've got the following result:
    Code:
    getrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    setrlimit(RLIMIT_DATA, {rlim_cur=1073741823, rlim_max=1073741823}) = 0
    getrlimit(RLIMIT_DATA, {rlim_cur=1073741823, rlim_max=1073741823}) = 0
    getrlimit(RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    setrlimit(RLIMIT_FSIZE, {rlim_cur=1073741823, rlim_max=1073741823}) = 0
    getrlimit(RLIMIT_FSIZE, {rlim_cur=1073741823, rlim_max=1073741823}) = 0
    getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
    setrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
    getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0
    getrlimit(RLIMIT_RSS, {rlim_cur=RLIM_INFINITY, rlim_max=RLIM_INFINITY}) = 0
    setrlimit(RLIMIT_RSS, {rlim_cur=1073741823, rlim_max=1073741823}) = 0
    getrlimit(RLIMIT_RSS, {rlim_cur=1073741823, rlim_max=1073741823}) = 0
    exit(0)                                 = ?
    That shows filesize limit 1GB limit with current trunk oleg feed.

    Please give gcc --version to verify that you have correct buildroot and uclibc.

    So you need at least ipkg-opt, uclibc-opt, buildroot and strace from unstable branch to verify this.

  15. #45
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    OK, I did it. I have native-compiled it in the two cases (unstable and stable). The both indicate the same 1Gb problem as you shown and as I shown in my initial post. I'm confused only with uclibc-opt - 0.9.28-13, as I would expect to find here uclibc-opt - 0.9.28.3.

    unstable:

    PHP Code:
    root@wl500g,/opt/tmpipkg list_installed
    ...
    buildroot 4.1.2-13 -
    libuclibc++ - 0.2.2--
    uclibc-opt 0.9.28-13 -
    ...
    root@wl500g,/opt/tmpgcc --version
    gcc 
    (GCC4.1.2
    ...
    root@wl500g,/opt/tmpgcc rlimit.c
    root
    @wl500g,/opt/tmpstrace ./a.out
    ...
    getrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITYrlim_max=RLIM_INFINITY}) = 0
    setrlimit
    (RLIMIT_DATA, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_DATA, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITYrlim_max=RLIM_INFINITY}) = 0
    setrlimit
    (RLIMIT_FSIZE, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_FSIZE, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_NOFILE, {rlim_cur=1024rlim_max=1024}) = 0
    setrlimit
    (RLIMIT_NOFILE, {rlim_cur=1024rlim_max=1024}) = 0
    getrlimit
    (RLIMIT_NOFILE, {rlim_cur=1024rlim_max=1024}) = 0
    getrlimit
    (RLIMIT_RSS, {rlim_cur=RLIM_INFINITYrlim_max=RLIM_INFINITY}) = 0
    setrlimit
    (RLIMIT_RSS, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_RSS, {rlim_cur=1073741823rlim_max=1073741823}) = 
    stable:

    PHP Code:
    root@wl500g,/opt/tmpipkg list_installed grep -e u[cC]libc
    buildroot 
    4.1.1-12 uClibc compilation toolchain
    libuclibc
    ++ - 0.2.2-C++ standard library designed for use in embedded systems
    uclibc
    -opt 0.9.28-12 micro C library for embedded Linux systems
    root
    @wl500g,/opt/tmpgcc --version
    gcc 
    (GCC4.1.1
    ...
    root@wl500g,/opt/tmpgcc rlimit.c
    root
    @wl500g,/opt/tmpstrace ./a.out
    ...
    getrlimit(RLIMIT_DATA, {rlim_cur=RLIM_INFINITYrlim_max=RLIM_INFINITY}) = 0
    setrlimit
    (RLIMIT_DATA, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_DATA, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_FSIZE, {rlim_cur=RLIM_INFINITYrlim_max=RLIM_INFINITY}) = 0
    setrlimit
    (RLIMIT_FSIZE, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_FSIZE, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_NOFILE, {rlim_cur=1024rlim_max=1024}) = 0
    setrlimit
    (RLIMIT_NOFILE, {rlim_cur=1024rlim_max=1024}) = 0
    getrlimit
    (RLIMIT_NOFILE, {rlim_cur=1024rlim_max=1024}) = 0
    getrlimit
    (RLIMIT_RSS, {rlim_cur=RLIM_INFINITYrlim_max=RLIM_INFINITY}) = 0
    setrlimit
    (RLIMIT_RSS, {rlim_cur=1073741823rlim_max=1073741823}) = 0
    getrlimit
    (RLIMIT_RSS, {rlim_cur=1073741823rlim_max=1073741823}) = 

Page 3 of 8 FirstFirst 12345 ... LastLast

Similar Threads

  1. How-to: Use your router as a BitTorrent Client
    By GerardNL in forum WL-700g Tutorials
    Replies: 28
    Last Post: 24-10-2007, 19:38
  2. Firewall dies
    By confused in forum WL-500g Q&A
    Replies: 0
    Last Post: 04-11-2006, 18:09
  3. Cannot enable WEP encryption in client mode
    By eldavies in forum WL-HDD Q&A
    Replies: 0
    Last Post: 07-09-2006, 21:27
  4. Firmware v1.9.2.7 CR4 [Oleg]
    By Oleg in forum WL-500g Firmware Releases
    Replies: 195
    Last Post: 08-08-2006, 13:18
  5. Asus WL-500b & Client Mode
    By cooper.zl in forum WL-500g Q&A
    Replies: 1
    Last Post: 17-10-2004, 18:27

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •