aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: Amuleweb with wrong informations  (Read 3549 times)

GuyFawkes

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Amuleweb with wrong informations
« on: June 15, 2007, 08:33:40 AM »

look at the attachments ...

Solutions ?

Logged

wuischke

  • Developer
  • Hero Member
  • *****
  • Karma: 183
  • Offline Offline
  • Posts: 4292
Re: Amuleweb with wrong informations
« Reply #1 on: June 15, 2007, 09:50:32 AM »

Which version of aMule(web) are you using?

The first one is not necessarily a bug (that's when a download was being iniciated, but there were never any data submitted), but the second one does in fact look weird.
Logged

GuyFawkes

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Amuleweb with wrong informations
« Reply #2 on: June 15, 2007, 10:36:59 AM »

Which version of aMule(web) are you using?

The first one is not necessarily a bug (that's when a download was being iniciated, but there were never any data submitted), but the second one does in fact look weird.

for the first one I'm sure that data are submitted because I completed a lot of download and I have always no information on amuleweb.
Note that the progress bar "progression" works.

I'm running the non-gui emule port for ARM (NSLU2) version 2.1.3-9
http://www.nslu2-linux.org/wiki/Optware/Amule



Logged

GuyFawkes

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Amuleweb with wrong informations
« Reply #3 on: June 15, 2007, 12:17:57 PM »

I found this :
http://forum.amule.org/index.php?topic=11362.0

Now I'm at work but this evening I will try...
Logged

GuyFawkes

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Amuleweb with wrong informations
« Reply #4 on: June 19, 2007, 08:28:12 AM »

ok, it's strange, I removed ".0" from this function on downloads.php :

Code: [Select]

function CastToXBytes($size)
                {
                        if ( $size < 1024 ) {
                                $result = $size . " bytes";
                        } elseif ( $size < 1048576 ) {
                                $result = ($size / 1024.0) . "KB";
                        } elseif ( $size < 1073741824 ) {
                                $result = ($size / 1048576.0) . "MB";
                        } else {
                                $result = ($size / 1073741824.0) . "GB";
                        }
                        return $result;
                }

The first time I opened the page it worked like a charm with correct file size and download speed... but now when I clic on "Transfers" the browser save/open dialog box appear and the webserver crash.

Anyone can help me?
« Last Edit: June 19, 2007, 08:31:08 AM by GuyFawkes »
Logged

lfroen

  • Guest
Re: Amuleweb with wrong informations
« Reply #5 on: June 19, 2007, 08:58:35 AM »

First of all, I fail to see how removing ".0" should help. The reason it's there, is to interpret number as floating point, so we'll get FP division instead of integer division (1/3 = 0.333 instead of 1/3=0).
May be ARM have floating point issues? In any event, webserver crash probably indicate some error in code, so backtrace is needed.
Logged

GuyFawkes

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Amuleweb with wrong informations
« Reply #6 on: June 19, 2007, 07:24:02 PM »

Code: [Select]
Session ok, logged in
Processing request [original]: downloads.php
Session ok, logged in
Processing request [redirected]: downloads.php
Illegal instruction

Logged

skolnick

  • Global Moderator
  • Hero Member
  • *****
  • Karma: 24
  • Offline Offline
  • Posts: 1188
  • CentOS 6 User
Re: Amuleweb with wrong informations
« Reply #7 on: June 19, 2007, 11:04:39 PM »

In my experience, Illegal instruction means that you asked the processor to run some opcode that doesn't understand. Like asking a Pentium III to execute an SSE2 instruction, or asking an old Pentium to execute an MMX instruction. Maybe your compiler has some fault, or you compiled with the wrong configuration.

Regards.
Logged

lfroen

  • Guest
Re: Amuleweb with wrong informations
« Reply #8 on: June 20, 2007, 07:13:13 AM »

Quote
In my experience, Illegal instruction means that you asked the processor to run some opcode that doesn't understand.

Definitely. When we're talking about compiler-produced code, this may actually indicate either bug in compiler or bug in build process (instructing compiler to produce code for P4 and running it on P3, for example).
In this particular case, it seems that issue involves floating point support (or lack of support) on given CPU. AFAIK, some ARM have FP unit, some doesn't. Which one installed on NSLU2 I have no idea (as I have no such device to test it).
Logged

GuyFawkes

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Amuleweb with wrong informations
« Reply #9 on: June 20, 2007, 09:56:55 AM »

Ok, that's the point, NSLU2 ARM CPU doesn't have a built in FPU but  use FPU emulation on kernel level (soft-float).

Is there a way to use the CastToXBytes function without floating point operations ? maybe it will be less accurate but this doesn't metter...
Logged

lfroen

  • Guest
Re: Amuleweb with wrong informations
« Reply #10 on: June 20, 2007, 01:06:11 PM »

Quote
Illegal instruction
This may also indicate stack corruption. In any event, I need either backtrace, or valgrind log, or both to further debug the problem.
Since I don't have the hardware, I can't reproduce the problem.

[Edit: Kry] You mean you CAN'T reproduce it.
« Last Edit: June 20, 2007, 01:36:59 PM by Kry »
Logged

GuyFawkes

  • Approved Newbie
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
Re: Amuleweb with wrong informations
« Reply #11 on: June 20, 2007, 01:36:51 PM »

ok, i'll try to compile amule with debug informations, but this may take ages on a 266 mhz device...
« Last Edit: June 20, 2007, 03:54:08 PM by GuyFawkes »
Logged