Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593462 - net-p2p/freenet does not work with the compress-commons version that is present in portage
Summary: net-p2p/freenet does not work with the compress-commons version that is prese...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Sachau
URL:
Whiteboard:
Keywords:
: 606384 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-10 23:16 UTC by Claes
Modified: 2019-09-14 15:30 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Claes 2016-09-10 23:16:00 UTC
Installing and browsing freenet, the majority of requests fail with "Error detected parsing the header".

After getting help on the freenet irc channel, I've narrowed it down to the dev-java/commons-compress library. Downgrading to 1.5, freenet works.
Upgrading again to 1.6, it fails again.

Freenet currently is only officially tested with commons-compress 1.1, though I don't think that version is necessary, or desirable because a) it works with 1.5, and 1.4.1 was a security release.
Comment 1 Fabian Köster 2016-12-21 09:36:35 UTC
Having the same problem and cannot downgrade, because dev-java/commons-compress-1.10 is the one and only version in portage.

I guess this should be reported upstream at Freenet because they use a really old version of commons-compress.
Comment 2 Claes 2016-12-21 11:13:25 UTC
>Having the same problem and cannot downgrade, because dev-java/commons-compress-1.10 is the one and only version in portage.

I believe it was as simple as "cp commons-compress-1.10.ebuild commons-compress-1.5.ebuild && repoman manifest" for me to work around this issue.

> I guess this should be reported upstream at Freenet because they use a really old version of commons-compress.

I don't know if it's considered "reported upstream" or not, but before I reported this b.g.o issue, I asked upstream about the issue here: https://freenetproject.tenderapp.com/discussions/problems/57-all-page-loads-fail-with-error-detected-parsing-the-header
Comment 3 Fabian Köster 2016-12-21 12:11:33 UTC
(In reply to Claes from comment #2)
> >Having the same problem and cannot downgrade, because dev-java/commons-compress-1.10 is the one and only version in portage.
> 
> I believe it was as simple as "cp commons-compress-1.10.ebuild
> commons-compress-1.5.ebuild && repoman manifest" for me to work around this
> issue.

That did not work because commons-compress-1.5-src.tar.gz cannot be downloaded then, but I found it here:

https://archive.apache.org/dist/commons/compress/source/commons-compress-1.5-src.tar.gz

Afterwards, the error disappears.

> > I guess this should be reported upstream at Freenet because they use a really old version of commons-compress.
> 
> I don't know if it's considered "reported upstream" or not, but before I
> reported this b.g.o issue, I asked upstream about the issue here:
> https://freenetproject.tenderapp.com/discussions/problems/57-all-page-loads-
> fail-with-error-detected-parsing-the-header

I really think upstream (freenet project) should act, because it use commons-compress 1.0 (if I am not mistaking) and this has known security issues, as you pointed out. Sticking with an very outdated version of a library cannot be a solution. Especially if you have other software that depends on newer releases.
Comment 4 Fabian Köster 2016-12-21 12:23:54 UTC
I created an upstream report: https://bugs.freenetproject.org/view.php?id=6921
Comment 5 Arsen Shnurkov 2017-05-11 13:58:57 UTC
I have this bug too.
Comment 6 Eric Gisse 2017-06-15 15:31:27 UTC
Confirmed still an issue.
Comment 7 Pacho Ramos gentoo-dev 2017-07-03 07:52:13 UTC
*** Bug 606384 has been marked as a duplicate of this bug. ***
Comment 8 Thomas Sachau gentoo-dev 2017-07-16 09:16:52 UTC
I am still not able to reproduce the issue and i also have commons-compress-1.10 installed. It seems like there are more conditions to meet (maybe something like: happens only for older/newer freesites, happens only with a certain jvm or something else). So unless i can reproduce this myself locally, not much i can do here.
Comment 9 Dennis Nezic 2018-03-25 23:55:33 UTC
It's still an issue for me. Even with commons-compress-1.10, 1.12, 1.13.

(After version 1.14, there seem to be new dependencies that are required... compilation is failing for me with errors mentioning the Brotli and Zstandard libraries. 1.13 and newer also need to be compiled with -source 1.7 ... I got it to work with "export JAVA_PKG_WANT_TARGET=1.7")

In the meantime, can we get 1.5 back into portage, in case that fixes the issue for some of us?

It's very weird how it's only affecting some of us. Thomas, are you able to see Toad's freesite? That is an example of one that's failing for me. The "freesite howto" freesite is one of the few that seem to work for me. I updated upstream about this -- hopefully they'll have more insight.
Comment 10 Dennis Nezic 2018-04-09 22:32:21 UTC
I came up with two potential fixes to this, and mentioned them in the upstream bug report. One involves a quick patch to freenet's ArchiveManager.java file, the other involves a quick patch to all the commons-compress TarArchiveInputStream.java versions > 1.5. I still haven't figured out exactly why it's only affecting some of us.

I've narrowed down the issue to something to do with IOUtils.skip (which was introduced in 1.6), and/or how that interacts with Freenet's buckets/inputstreams.
Comment 11 Dennis Nezic 2018-04-19 00:56:02 UTC
I think this was an even lower-level bug in my openjdk's vm. Although I had this bug with openjdk version "1.8.0_151", I no longer have it with version "1.8.0_161". Can anyone verify this?
Comment 12 Dennis Nezic 2018-04-19 01:08:41 UTC
Nm, this bug still exists even with the newer jdk. ( https://issues.apache.org/jira/browse/COMPRESS-449 )
Comment 13 Thomas Sachau gentoo-dev 2019-09-14 11:04:38 UTC
Any update on this one?
Comment 14 Dennis Nezic 2019-09-14 13:47:06 UTC
It's working/fixed in the current versions of freenet (1484) and dev-java/commons-compress (1.10) in portage. Even though the official fix was only introduced upstream into commons-compress 1.17, freenet 1484 already has the new wrapper class in src/freenet/support/io/SkipShieldingInputStream.java, so no need for the newer dependency.
Comment 15 Thomas Sachau gentoo-dev 2019-09-14 15:30:23 UTC
Thanks for the reply.

Closing this bug as fixed.