Problems with transmission 1.80+ on uClibc 0.9.27
Problems with transmission 1.80+ on uClibc 0.9.27
Helo.
I'm cross-compiling transmission for my Sat-Reciever/MediaTank AzBox HD Premium.
It is:
Linux MMP 2.6.15-sigma #138 PREEMPT Thu Jan 22 21:35:07 KST 2009 mips unknown
GCC:
Reading specs from /usr/local/smp86xx/lib/gcc/mipsel-linux-uclibc/3.4.2/specs
Configured with: /smp86xx_toolchain.20080505/toolchain_build_mipsel_nofpu/gcc-3.4.2/configure --prefix=/usr/local/smp86xx --build=sparc-pc-linux-gnu --host=sparc-pc-linux-gnu --target=mipsel-linux-uclibc --enable-languages=c,c++ --enable-shared --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --enable-multilib --with-float=soft --enable-sjlj-exceptions
Thread model: posix
gcc version 3.4.2
where is uClibc 0.9.27, libz 1.2.1, curl 7.18.2 and openssl 0.9.8j in it's own SDK (smp86xx_toolchain.20080505), so i use it.
i cross-compile libevent 1.4.14b as shared library.
When i cross compile transmission 1.77 or lower - it runs Ok, but if i cross-compile 1.80+ - its compiling Ok, but then i run it - all downloaded chunks are bad.
In log appears comething like (output from 2.12):
[11:40:47.844] File.avi Piece 0, which was just downloaded, failed its checksum test (peer-mgr.c:1468)
I modified source to print CRCs and so, what computed and original CRCs are different.
Can somebody help me with this ?
Do you need some additional info ?
PS: Sorry for my poor english.
I'm cross-compiling transmission for my Sat-Reciever/MediaTank AzBox HD Premium.
It is:
Linux MMP 2.6.15-sigma #138 PREEMPT Thu Jan 22 21:35:07 KST 2009 mips unknown
GCC:
Reading specs from /usr/local/smp86xx/lib/gcc/mipsel-linux-uclibc/3.4.2/specs
Configured with: /smp86xx_toolchain.20080505/toolchain_build_mipsel_nofpu/gcc-3.4.2/configure --prefix=/usr/local/smp86xx --build=sparc-pc-linux-gnu --host=sparc-pc-linux-gnu --target=mipsel-linux-uclibc --enable-languages=c,c++ --enable-shared --disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --enable-multilib --with-float=soft --enable-sjlj-exceptions
Thread model: posix
gcc version 3.4.2
where is uClibc 0.9.27, libz 1.2.1, curl 7.18.2 and openssl 0.9.8j in it's own SDK (smp86xx_toolchain.20080505), so i use it.
i cross-compile libevent 1.4.14b as shared library.
When i cross compile transmission 1.77 or lower - it runs Ok, but if i cross-compile 1.80+ - its compiling Ok, but then i run it - all downloaded chunks are bad.
In log appears comething like (output from 2.12):
[11:40:47.844] File.avi Piece 0, which was just downloaded, failed its checksum test (peer-mgr.c:1468)
I modified source to print CRCs and so, what computed and original CRCs are different.
Can somebody help me with this ?
Do you need some additional info ?
PS: Sorry for my poor english.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
I wrote, that in 1.77 or lower all works perfect.x190 wrote:Can't help you with that cross-compilation stuff (makes me go cross-eyed!), but I'm wondering if you have tested with a known uncorrupted torrent such as an Ubuntu iso?
Is this applicable?
Same torrent and same libs with 1.80 or higher doesnt work !!!
From NEWS of 1.80:
* Add an OS hint to not cache local data during torrent verification
* Portability fixes for embedded systems
I think - this is it, but i don't know what exactly changed.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
This was reported in trac before, but the ticket didn't go anywhere because I didn't have a system similar to the reporter, and the reporter had difficulty in building his own version of Transmission to make tests.
If you can walk through the changes between 1.77 and 1.80, and figure out for certain which change broke verification, I'd be happy to fix the change. However until I have that information there's no much that I can do.
If you can walk through the changes between 1.77 and 1.80, and figure out for certain which change broke verification, I'd be happy to fix the change. However until I have that information there's no much that I can do.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
What do you mean "walk through the changes between 1.77 and 1.80" ?
Re: Problems with transmission 1.80+ on uClibc 0.9.27
I mean, make builds from svn snapshots of what came between 1.77 and 1.80 so that you can figure out which commit broke Transmission on uClibc 0.9.27. Not a fun task, probably.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
Ok. I'll try.
Results will be reported.
Results will be reported.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
Yep, considering that svn checkout doesn't retrieve libevent third-party directory at revision 1559, needed for old transmission versions builds.Charles wrote:Not a fun task, probably.
Back to the point, I've the same box and same problem.
I've started checks from revision 9394, the equivalent in trunk of version 1.76
At a first look it seems that the 'bug' was introduced in trunk between revisions 9486 and 9500. Still testing.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
Bingo.
The issue was introduced exactly in 9500.
And wierd enough, the only difference is in configure.ac :
-AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename strcasecmp localtime_r posix_fallocate memmem strtold syslog])
+AC_CHECK_FUNCS([pread pwrite lrintf strlcpy daemon dirname basename strcasecmp localtime_r posix_fallocate memmem strtold syslog])
I reverse-applied the same patch to transmission-2.13 sources (in other words, removing "pread pwrite" to AC_CHECK_FUNCS in configure.ac) and it works!
But I can't really figure out why those checks broke compilation on uClibc 0.9.27, and how to fix that.
AAS, could you please double-check my results?
The issue was introduced exactly in 9500.
And wierd enough, the only difference is in configure.ac :
-AC_CHECK_FUNCS([lrintf strlcpy daemon dirname basename strcasecmp localtime_r posix_fallocate memmem strtold syslog])
+AC_CHECK_FUNCS([pread pwrite lrintf strlcpy daemon dirname basename strcasecmp localtime_r posix_fallocate memmem strtold syslog])
I reverse-applied the same patch to transmission-2.13 sources (in other words, removing "pread pwrite" to AC_CHECK_FUNCS in configure.ac) and it works!
But I can't really figure out why those checks broke compilation on uClibc 0.9.27, and how to fix that.
AAS, could you please double-check my results?
Re: Problems with transmission 1.80+ on uClibc 0.9.27
Yes !!! This is it.
pread() and pwrite() is broken in uClibc 0.9.27.
Without it transmission works perfect.
UPD: It's a known problem: http://lists.busybox.net/pipermail/ucli ... 27653.html
pread() and pwrite() is broken in uClibc 0.9.27.
Without it transmission works perfect.
UPD: It's a known problem: http://lists.busybox.net/pipermail/ucli ... 27653.html
Re: Problems with transmission 1.80+ on uClibc 0.9.27
That link's from 2003 though. Are you sure this is still a uClibc issue?AAS wrote:Yes !!! This is it.
pread() and pwrite() is broken in uClibc 0.9.27.
Without it transmission works perfect.
UPD: It's a known problem: http://lists.busybox.net/pipermail/ucli ... 27653.html
Also, I see 0.9.31 has been available since April. Does upgrading uClibc solve the issue?
Re: Problems with transmission 1.80+ on uClibc 0.9.27
This bug is present in 0.9.27 version.
And 0.9.27 is very old version (released in Jan-2005).
Upgrading is not possible, because root fs hardcoded in AzBox's ROM as CRAMFS. Reflashing of ROM is not a trivial operation.
But, IMHO, adding checks for MIPS and uCLibc in configure to not use pread()/pwrite() if fully solves this issue.
And 0.9.27 is very old version (released in Jan-2005).
Upgrading is not possible, because root fs hardcoded in AzBox's ROM as CRAMFS. Reflashing of ROM is not a trivial operation.
But, IMHO, adding checks for MIPS and uCLibc in configure to not use pread()/pwrite() if fully solves this issue.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
https://trac.transmissionbt.com/ticket/3826
Awesome work, iz0bbz ... that must have been time-consuming.
Awesome work, iz0bbz ... that must have been time-consuming.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
Jordan, you told:
http://lists.uclibc.org/pipermail/uclib ... 16032.html
I see pread/pwrite fixes mentioned in 0.9.27 -> 0.9.28 uclibc changelog:It would be nice to do this conditionally based on the uClibc version number, rather than unconditionally like this, but I didn't see the fix mentioned anywhere, so I don't know what version to test for.
http://lists.uclibc.org/pipermail/uclib ... 16032.html
I cannot test on 0.9.28 (AAS explained why) but I think it's quite safe to check for uclibc <0.9.2810990: mips: fix pread/pwrite bugs reported by ltp.
Re: Problems with transmission 1.80+ on uClibc 0.9.27
Ah, good catch. http://lists.busybox.net/pipermail/ucli ... 19117.html looks like it's The One.