Time |
Nickname |
Message |
00:50
๐
|
DFJustin |
in "how the hell does it still exist" news, http://www.mysimon.com/ |
01:09
๐
|
godane |
uploaded and checked it: http://archive.org/details/laptops-manuals-dump-from-tim.id.au-20121111 |
06:59
๐
|
SketchCow |
Back once again |
06:59
๐
|
SketchCow |
Off to the UK Tuesday morning |
12:38
๐
|
godane |
i think i got sometime from way back before archvieteam was around |
12:38
๐
|
godane |
its called digpicz |
12:38
๐
|
godane |
it was to digg for pictures site |
12:39
๐
|
godane |
no warc but i have (maybe) full mirror of site after it was shutdown |
12:40
๐
|
godane |
including letter to them from digg.com to not use digg as part of there site |
12:46
๐
|
SmileyG |
lol |
13:32
๐
|
godane |
uploaded volume 20 of smart computing or year 2009 |
13:32
๐
|
godane |
example url: http://archive.org/details/smartcomputing-magazine-v20i1 |
14:32
๐
|
godane |
item is going to be called BBC_Schools_Progs_VHSRip |
16:02
๐
|
balrog |
alard: you're probably aware but standalone warctozip chokes on many warcs and online warctozip is down :/ |
16:06
๐
|
alard |
balrog: Does it? (The standalone thing might be an older version than the online version.) Is it? underscor maintains warctozip.archive.org. http://warctozip.herokuapp.com/ is an alternative. |
16:06
๐
|
balrog |
I tried a warc from mobileme with the standalone one and it didn't work |
16:06
๐
|
balrog |
http://ia601401.us.archive.org/tarview.php?tar=/27/items/mobileme-hero-1341176093/mobileme-full-1341176093.tar&file=full-1341176093%2Fc%2Fca%2Fcal%2Fcalhoun%2Fhomepage.mac.com%2Fhomepage.mac.com-calhoun.warc.gz |
16:07
๐
|
balrog |
http://warctozip.herokuapp.com/http://ia601401.us.archive.org/tarview.php?tar=/27/items/mobileme-hero-1341176093/mobileme-full-1341176093.tar&file=full-1341176093%2Fc%2Fca%2Fcal%2Fcalhoun%2Fhomepage.mac.com%2Fhomepage.mac.com-calhoun.warc.gz returns an internal server error |
16:08
๐
|
alard |
And it is a valid warc.gz? (tarview.php doesn't always work.) |
16:09
๐
|
balrog |
the standalone one is at https://github.com/alard/warctozip |
16:09
๐
|
balrog |
how do I verify that it's valid? |
16:09
๐
|
balrog |
un-gzipping it and looking at it with less *looks* ok |
16:11
๐
|
alard |
http://warctozip.herokuapp.com/46875685376-46888852316/homepage.mac.com-calhoun.zip/http://archive.org/download/mobileme-hero-1341176093/mobileme-full-1341176093.tar |
16:11
๐
|
balrog |
well that's a 62.5gb file |
16:13
๐
|
balrog |
it's possible that warc is not fully compliant |
16:13
๐
|
alard |
It isn't if you include the range. E.g.: curl -L --range 46875685376-46888852316 http://archive.org/download/mobileme-hero-1341176093/mobileme-full-1341176093.tar |
16:14
๐
|
balrog |
is there a way to verify a warc? some better error reporting would be nice |
16:15
๐
|
balrog |
"bad prefix on WARC version header" hmm |
16:15
๐
|
alard |
Heh, yes. Error reporting is not for lazy people. :) |
16:15
๐
|
balrog |
"version field is not known (0.17,1.0,0.18)" |
16:15
๐
|
balrog |
hmmmmmm |
16:16
๐
|
balrog |
aha |
16:16
๐
|
balrog |
line endings :/ |
16:17
๐
|
alard |
I've just tried the warc-proxy, it can't load the thing either. (But that may be since it shares the same code.) There's apparently something wrong with one of the WARC headers. |
16:17
๐
|
balrog |
no |
16:17
๐
|
balrog |
the issue is line endings |
16:17
๐
|
balrog |
gunzip and look at each file in vim |
16:17
๐
|
balrog |
this warc and another warc |
16:18
๐
|
alard |
Any line I should look for? |
16:18
๐
|
balrog |
any line, from the beginning |
16:19
๐
|
alard |
That looks fine, I think. If I remember correctly the line endings should be \r\n in the WARC headers. |
16:19
๐
|
balrog |
hmm, yeah they ARE \r\n |
16:20
๐
|
balrog |
the errors look like this: |
16:20
๐
|
balrog |
[('ignored line', 'software: Wget/1.13.4.59-2b1dd (darwin9.8.0)\r\n'), ('ignored line', 'format: WARC File Format 1.0\r\n'), ('version field is not known (0.17,1.0,0.18)', 'WARC_ISO_28500_version1_latestdraft.pdf'), ('bad prefix on WARC version header', 'conformsTo: http://bibnum.bnf.fr/')] |
16:20
๐
|
balrog |
warc errors at /Users/me/Downloads/homepage.mac.com-calhoun.warc:405 |
16:22
๐
|
balrog |
wait, Content-Length: 0? |
16:23
๐
|
alard |
Hmm, that's wrong. |
16:23
๐
|
balrog |
the rest of the warc looks fine |
16:24
๐
|
alard |
The Content-Length is always 0 (in the WARC headers, not in the HTTP headers). |
16:24
๐
|
balrog |
another WARC I'm looking at has non-zero Content-Lengths in WARC headers |
16:24
๐
|
balrog |
http://ia601401.us.archive.org/tarview.php?tar=/25/items/mobileme-hero-mobileme-hero-1331593225/mobileme-hero-1331593225.tar&file=mobileme-hero-1331593225%2Fd%2Fdg%2Fdgc%2Fdgcx%2Fhomepage.mac.com%2Fhomepage.mac.com-dgcx.warc.gz |
16:25
๐
|
alard |
http://warctozip.herokuapp.com/40017991168-40023049642/homepage.mac.com-dgcx.zip/http://archive.org/download/mobileme-hero-mobileme-hero-1331593225/mobileme-hero-1331593225.tar |
16:25
๐
|
alard |
No problem there, it seems. |
16:26
๐
|
balrog |
that warc works fine |
16:26
๐
|
balrog |
the calhoun one doesn't |
16:26
๐
|
alard |
No, the calhoun one is broken. |
16:27
๐
|
balrog |
that's what I just said |
16:27
๐
|
alard |
Yes, and I agreed. :) |
16:27
๐
|
balrog |
question is how it's broken and how it can be fixed |
16:27
๐
|
balrog |
since the data looks ok |
16:28
๐
|
balrog |
also what's the index that warcvalid says? |
16:28
๐
|
balrog |
it's certainly not line |
16:28
๐
|
alard |
It might have something to do with the Wget version: Wget/1.13.4.59-2b1dd (darwin9.8.0) |
16:28
๐
|
alard |
I don't know, I've never used warcvalid. |
16:28
๐
|
alard |
The byte offset, perhaps? |
16:29
๐
|
alard |
We do have another copy of calhoun, by the way. |
16:29
๐
|
balrog |
ok |
16:29
๐
|
balrog |
still, it would be nice to fix broken warcs |
16:30
๐
|
alard |
Certainly, and even better to know why they exist in the first place. |
16:31
๐
|
alard |
balrog: It seems that you're the source of that file. |
16:32
๐
|
balrog |
probably. |
16:32
๐
|
balrog |
it probably was dumped on a big-endian machine |
16:32
๐
|
balrog |
I hope that's not the issue |
16:34
๐
|
balrog |
it's failing a regex match |
16:34
๐
|
alard |
Well, here's how Wget gets that Content-Length: it writes the response to an open file, does an fseek to the end, uses ftell to determine the length of the file. |
16:34
๐
|
alard |
The regex is not the problem, I think, just a symptom. |
16:35
๐
|
alard |
The Content-Length: 0 header tells the warc reader that the record does not contain any data, and that the next record starts immediately. That 'record' doesn't have a WARC-Type header, obviously, so it breaks down. |
16:35
๐
|
alard |
Have you made any warcs on that system, recently? |
16:36
๐
|
alard |
Do they work? |
16:36
๐
|
balrog |
I haven't, that was probably the Mac G5 |
16:36
๐
|
balrog |
yup, that was the Mac G5 |
16:37
๐
|
balrog |
right now it's inaccessible but I can test on a Mac G4 probably |
16:37
๐
|
balrog |
other WARCs were made on a Mac G4 by Lord_Nigh |
16:37
๐
|
balrog |
(or Lord_Nightmare) |
16:38
๐
|
balrog |
might be worth checking if they have the same issues |
16:40
๐
|
alard |
http://ia700403.us.archive.org/30/items/archiveteam-mobileme-index/mobileme-20120817.html#randycottingham |
16:40
๐
|
alard |
It seems so. |
16:40
๐
|
alard |
Lots of Content-Length: 0. |
16:41
๐
|
alard |
Is it possible to make a fresh WARC with the latest Wget version? |
16:47
๐
|
balrog |
latest being latest git or latest release? |
16:47
๐
|
alard |
Whatever is easiest. They should be the same, at least for the WARC parts. |
16:48
๐
|
balrog |
once wget compiles, sure |
16:49
๐
|
balrog |
it may take some time on a G4 |
16:51
๐
|
SmileyG |
72843264 89% 21.70kB/s 0:06:53 |
16:51
๐
|
SmileyG |
:/ |
16:51
๐
|
SmileyG |
worlds slowest connection to aus it seems :( |
18:05
๐
|
chronomex |
aus only has one connection, x.25 over troposcatter packet radio |
18:05
๐
|
chronomex |
a nickel a minute |
18:39
๐
|
SmileyG |
D: |
18:43
๐
|
balrog |
alard: I have here some warcs that were generated with wget-1.14 on debian armel |
18:43
๐
|
balrog |
and they have content-length 1 for the warc headers |
18:43
๐
|
balrog |
and warcvalid also chokes on them with errors |
18:44
๐
|
balrog |
yup |
18:44
๐
|
balrog |
wget-1.14 on debian armel spits out Content-Length: 1 |
18:44
๐
|
alard |
Is armel also big-endian? (Weird that it is 1, not 0.) |
18:44
๐
|
balrog |
little-endian. |
18:44
๐
|
alard |
Hmm. |
18:45
๐
|
balrog |
yes, on ppc it writes 0 |
18:46
๐
|
balrog |
just tested with wget-1.14 from homebrew |
18:46
๐
|
balrog |
on intel/x86_64 it works as expected |
18:49
๐
|
balrog |
it's only the WARC headers that are wrong, the normal wget headers are correct |
18:49
๐
|
balrog |
btw, armel means "ARM, endian little" |
18:49
๐
|
balrog |
I think |
18:50
๐
|
chronomex |
yep |
18:51
๐
|
balrog |
anyway, this is annoying, though totally fixable in post |
18:51
๐
|
balrog |
you just read the length of the headers and write the correct Content-Length |
18:51
๐
|
alard |
As long as there are no warc headers inside the responses. |
18:51
๐
|
balrog |
you mean that you didn't wget a site containing warcs? yeah, but then you could go looking for response headers and ignore all data within those |
18:52
๐
|
alard |
Ah, yes, of course. |
18:52
๐
|
balrog |
because all WARC headers start with WARC/1.0 and contain a Content-Length: |
18:52
๐
|
balrog |
while HTTP headers start with HTTP/ |
18:52
๐
|
balrog |
and contain a *valid* Content-Length |
18:53
๐
|
balrog |
now where is the code messing this up? |
18:53
๐
|
balrog |
that's my question |
18:54
๐
|
alard |
In here: http://git.savannah.gnu.org/cgit/wget.git/tree/src/warc.c |
18:54
๐
|
balrog |
I know, I had that open |
18:54
๐
|
balrog |
http://git.savannah.gnu.org/cgit/wget.git/tree/src/warc.c#n247 to be exact |
18:55
๐
|
alard |
The extra gzip header might also be incorrect: http://git.savannah.gnu.org/cgit/wget.git/tree/src/warc.c#n196 |
18:55
๐
|
balrog |
doesn't asprintf return -1 on failure? |
18:56
๐
|
alard |
The documentation says so. |
18:56
๐
|
balrog |
well !(-1) == 0 |
18:57
๐
|
alard |
That might explain why there isn't an error message. But why does it go wrong? |
18:58
๐
|
balrog |
the data in content_length must be corrupted |
18:58
๐
|
balrog |
somewhere |
18:58
๐
|
balrog |
if the asprintf doesn't complete it would just be uninitialized mem |
18:59
๐
|
balrog |
but why does it spit out 0 or 1 |
19:00
๐
|
balrog |
ftello should be returning the appropriate value |
19:20
๐
|
balrog |
alard: |
19:20
๐
|
balrog |
char *content_length; |
19:20
๐
|
balrog |
off_t data_len; |
19:20
๐
|
balrog |
asprintf (&content_length, "%ld", data_len) |
19:20
๐
|
balrog |
tell me what's wrong there. |
19:21
๐
|
balrog |
or not? this is weird |
19:21
๐
|
balrog |
content_length is never getting filled properly |
19:21
๐
|
balrog |
data_len is correct |
19:21
๐
|
balrog |
hmm, okay... |
19:32
๐
|
balrog |
I don't get this |
19:38
๐
|
balrog |
I changed the code to look like: |
19:38
๐
|
balrog |
data_len = ftello (data_in); |
19:38
๐
|
balrog |
if (asprintf (&content_length, "%ld", data_len) == -1) |
19:38
๐
|
balrog |
and data_len is correct while content_length is still zero |
19:45
๐
|
balrog |
alard: the issue is incorrect use of asprintf |
19:45
๐
|
balrog |
you need to use "%jd", not "%ld" |
19:45
๐
|
balrog |
also while you're at it, do == -1 |
19:45
๐
|
SmileyG |
add jack daniels! |
19:46
๐
|
balrog |
alard: how to get this fixed upstream? |
19:52
๐
|
DFJustin |
http://gizmodo.com/5959812/john-mcafee-wanted-for-murder |
19:53
๐
|
alard |
balrog: So %jd does work? |
19:53
๐
|
balrog |
yes |
19:53
๐
|
alard |
Problem is, if I see that correctly, that %jd is for int while %ld is for long int. |
19:54
๐
|
alard |
So %jd would break with large files on 64-bit systems? |
19:54
๐
|
balrog |
j is intmax_t |
19:54
๐
|
balrog |
it's whatever is the maximum width supported on the platform |
19:54
๐
|
balrog |
so on 64-bit systems, it would be 64-bits |
19:55
๐
|
balrog |
on 32-bit systems, it would be 32-bits |
19:55
๐
|
balrog |
look it up ;) |
19:55
๐
|
alard |
I may be confused with off_t, here: http://linux.die.net/man/3/fseeko |
19:56
๐
|
balrog |
off_t's width may vary |
19:56
๐
|
alard |
Suppose you would compile Wget with large file support, so off_t is a 64-bit number. Would %jd still work? |
19:57
๐
|
balrog |
j is C99 though. |
19:58
๐
|
balrog |
not sure if wget allows that |
19:58
๐
|
balrog |
I think intmax_t is also C99 |
19:59
๐
|
alard |
Maybe it's better to use wgint (a Wget type) instead of off_t. |
19:59
๐
|
balrog |
what is a wgint? |
20:00
๐
|
balrog |
I mean, how wide? |
20:00
๐
|
alard |
http://git.savannah.gnu.org/cgit/wget.git/tree/src/wget.h#n142 |
20:00
๐
|
alard |
There's a filesize function in util.c that returns a wgint. |
20:00
๐
|
balrog |
yes, that's probably the way to go |
20:00
๐
|
balrog |
using that function. |
20:01
๐
|
balrog |
and how do you print a wgint? |
20:01
๐
|
alard |
No, not the function, that needs a filename. |
20:01
๐
|
balrog |
oh, doesn't work on a file pointer? :\ |
20:01
๐
|
alard |
But all it does is fseek to the end, then ftello, so that's the same. |
20:01
๐
|
alard |
Unless there's no fseeko/ftello, but that's another case. |
20:02
๐
|
alard |
number_to_static_string |
20:02
๐
|
balrog |
ah |
20:02
๐
|
balrog |
yes, that's the way to go here. |
20:03
๐
|
balrog |
can you fix it up and get me a patch to test? I don't have the time right now |
20:03
๐
|
balrog |
already wasted time debugging this :( |
20:03
๐
|
alard |
Yes, I'll do that. ( http://git.savannah.gnu.org/cgit/wget.git/tree/src/utils.c#n1805 ) |
20:04
๐
|
balrog |
that concisely describes the problem here ;) |
20:07
๐
|
balrog |
Someone's gonna have to write a script or something to fix broken warcs |
20:10
๐
|
alard |
https://gist.github.com/741a969548d892183646 |
20:12
๐
|
alard |
Works for me. (But I have a sensible, modern OS. :) |
20:13
๐
|
balrog |
It didn't work for me on modern Debian for ARM |
20:13
๐
|
balrog |
;) |
20:15
๐
|
ersi |
heh, "doesn't work on edgy new platform that barely no one runs" |
20:15
๐
|
ersi |
:p |
20:16
๐
|
ersi |
good that you guys look into these things though |
20:16
๐
|
ersi |
<3<3 |
20:21
๐
|
balrog |
alard: is that patch against 1.14 or git? |
20:22
๐
|
alard |
git, but I think it works for 1.14 as well. |
20:22
๐
|
alard |
It only touches src/warc.c, and that hasn't changed (I think). |
20:22
๐
|
balrog |
well that fixed the issue on ppc |
20:30
๐
|
balrog |
gonna test on arm |
20:30
๐
|
balrog |
how long will it take to get added upstream? :) |
20:41
๐
|
balrog |
alard: yes, works on arm too |
20:41
๐
|
balrog |
next steps are getting it fixed upstream, and making a warc-fixer |
20:55
๐
|
alard |
balrog: Great. Shall I send the patch to the Wget people? |
20:55
๐
|
balrog |
alard: please do. |
20:56
๐
|
balrog |
explain that it's a pretty critical issue that breaks WARC on some platforms |
20:56
๐
|
alard |
(It will take a year to get fixed. :) |
20:56
๐
|
balrog |
:[ |
20:56
๐
|
balrog |
they won't be releasing a 1.14.1 sometime soon? |
20:56
๐
|
balrog |
or do they only release .x versions to fix security bugs? |
20:56
๐
|
alard |
There was a year between 1.14 and the previous version, I think. |
20:57
๐
|
alard |
Don't know, we'll see. |
20:57
๐
|
alard |
So on which platforms is this a problem? 32 bit? No. Platforms without large-file support? |
20:58
๐
|
balrog |
not sure what's the trigger |
20:58
๐
|
balrog |
I've had it happen on debian armel and on ppc mac os x 10.5.8 |
20:58
๐
|
balrog |
which means it probably happens on other arm platforms too, like Raspberry Pi |
20:59
๐
|
balrog |
(which is armhf รขยย hf means hardware floating point) |
21:03
๐
|
balrog |
anyway how do we fix the warcs that have the wrong values? |
21:04
๐
|
ersi |
What should Content-Length be in a WARC? |
21:04
๐
|
ersi |
s/WARC/WARC Header/ |
21:05
๐
|
balrog |
it should be the length of the WARC header, correct? |
21:05
๐
|
alard |
Content-Length should be the length of the record payload. |
21:05
๐
|
alard |
record body, sorry. |
21:05
๐
|
balrog |
this bug caused it to be garbage (0 or 1 in the cases we've looked at, but this is not guaranteed)) |
21:05
๐
|
alard |
So that would be the length of the HTTP headers + the HTTP body. |
21:05
๐
|
ersi |
Ah, alright. I think I've seen a bug in tef's tools regarding that~ I'll investigatezor |
21:05
๐
|
chronomex |
content length is how far to seek to skip the record, so headers + body sounds right to me |
21:06
๐
|
balrog |
the annoying part is that we have *many* warcs which are broken this way, that need fixing :| |
21:06
๐
|
chronomex |
:| |: :| |: |
21:06
๐
|
ersi |
Well, it's not *that* much of a problem - since it's actually fixable :) |
21:06
๐
|
balrog |
since Lord_Nigh and I can't be the only ones who used PPC or ARM machines to participate |
21:06
๐
|
ersi |
iterate through ALL the records! |
21:07
๐
|
alard |
Luckily, SketchCow *is* going to do that anyway, for the mobileme data. |
21:07
๐
|
balrog |
do what? :P |
21:07
๐
|
ersi |
balrog: iterate through all the records |
21:07
๐
|
ersi |
might as well fix as doing that |
21:08
๐
|
ersi |
chug chug chug |
21:08
๐
|
alard |
It will make it a lot slower, though. |
21:08
๐
|
ersi |
It's worth it, in the long run |
21:08
๐
|
balrog |
I think that warcs should be validated on the receiving end when rsynced |
21:09
๐
|
balrog |
then errors like this would be caught more quickly |
21:09
๐
|
balrog |
maybe only smaller warcs |
21:09
๐
|
alard |
Was the Transfer-Encoding: chunked issue fixed before or during mobileme? |
21:09
๐
|
balrog |
Transfer-Encoding: chunked issue? what was that? |
21:09
๐
|
ersi |
I think that was during, but I'm not entirely sure |
21:09
๐
|
alard |
Very early versions of the Wget code de-chunked the response but kept the Transfer-Encoding header. |
21:09
๐
|
balrog |
oh, oops |
21:10
๐
|
balrog |
that's stil fixable, though painfully so |
21:10
๐
|
balrog |
what concerns me the most is when data is thrown away because of bugs |
21:10
๐
|
alard |
The hanzo warctools fix that (warc2warc, I believe). |
21:10
๐
|
balrog |
and I doubt we have that here |
21:10
๐
|
alard |
It's not thrown away. |
21:10
๐
|
balrog |
why not modify warc2warc to fix the Content-Length issues? :) |
21:10
๐
|
ersi |
It's just a bit retardedly stored |
21:11
๐
|
ersi |
There's plenty of ways to fix the WARCs, it's basically a non-issue |
21:11
๐
|
balrog |
it's an issue when you're trying to extract data from them |
21:11
๐
|
alard |
Although the megawarc script doesn't check the warc headers, just checks for gzip errors, so these warcs will mess up the megawarc.warc.gz's. |
21:11
๐
|
ersi |
I know it's an issue, didn't say it wasn't. mark words dude :p |
21:11
๐
|
balrog |
what does megawarc do, cat warcs together? |
21:11
๐
|
alard |
Yes. |
21:12
๐
|
alard |
It checks for gzip errors, if it's a valid gzip named .warc.gz it gets added to the megawarc, if not it's added to a tar file. |
21:22
๐
|
balrog |
alard: are you sending the patch to the mailing list? |
21:23
๐
|
alard |
Yes. |
21:23
๐
|
alard |
Have any changes? |
21:23
๐
|
balrog |
also, http://www.mail-archive.com/bug-wget@gnu.org/msg02220.html |
21:23
๐
|
balrog |
no |
21:23
๐
|
balrog |
but that's an interesting thing to look at and probably introduced this bug (while fixing another) |
21:23
๐
|
alard |
The code works fine on many platforms, but it is apparently a problem on some PowerPC and ARM systems, and maybe others as well. |
21:23
๐
|
alard |
There's a somewhat serious issue in the WARC-generating code: on some platforms (presumably the ones where off_t is not a 64-bit number) the Content-Length header at the top of each WARC record has an incorrect length. On these platforms it is sometimes 0, sometimes 1, but never the correct length. This makes the whole WARC file unreadable. |
21:23
๐
|
alard |
Existing WARC files with this problem can be repaired by replacing the value of the Content-Length header with the correct value, for each WARC record in the file. The content of the WARC records is there, it's just the Content-Length header that is wrong. |
21:23
๐
|
alard |
The attached patch fixes the problem in warc.c. It replaces off_t by wgint and uses the number_to_static_string function from util.c. |
21:24
๐
|
balrog |
are there any other places where off_t is used "raw"? |
21:24
๐
|
balrog |
or size_t |
21:24
๐
|
alard |
Oh, ah, wait, it's in the warc.h. |
21:25
๐
|
balrog |
funny that this compiled |
21:25
๐
|
balrog |
and worked |
21:28
๐
|
alard |
Fixed, good catch. |
21:28
๐
|
alard |
There's a little bit of size_t in warc.c. |
21:28
๐
|
alard |
But that's just used for string and buffer sizes. |
21:29
๐
|
balrog |
there's a little in trunc.c but I think that's ok |
21:29
๐
|
balrog |
of off_t |
21:29
๐
|
chronomex |
size_t has its place ... |
21:30
๐
|
alard |
Where is trunc_t? |
21:30
๐
|
balrog |
yeah, size_t does |
21:30
๐
|
alard |
trunc.c, sorry? |
21:30
๐
|
chronomex |
do not cast size_t :( |
21:30
๐
|
balrog |
util/trunc.c |
21:30
๐
|
alard |
I see. (Was looking in src/) |
21:30
๐
|
chronomex |
every time you truncate an integer god bukkakes on a kitten |
21:31
๐
|
ersi |
awesome! |
21:31
๐
|
balrog |
trunc.c is probably ok |
21:32
๐
|
balrog |
since it looks like a standalone util |
21:32
๐
|
alard |
I think that is everything. |
21:33
๐
|
balrog |
yup |
21:37
๐
|
alard |
I'm curious to see which errors this patch will introduce. |
21:38
๐
|
balrog |
what sort of errors could it introduce? maybe we should test it more heavily first? |
21:38
๐
|
alard |
I have no idea, but I thought off_t was a good solution. |
21:39
๐
|
alard |
This wgint seems to be how they do it in the other parts of Wget, so it's probably better. |
21:39
๐
|
balrog |
off_t is good but isn't portable. |
21:39
๐
|
balrog |
I didn't know that, but a bit of googling indicated as much. |
21:39
๐
|
alard |
Would this mean that your ARM system can't download files larger than 2GB? |
21:40
๐
|
balrog |
it shouldn't mean that, hmm |
21:40
๐
|
balrog |
I'm sure I was able to download 2+gb files before |
21:43
๐
|
balrog |
ah |
21:43
๐
|
ersi |
give it a try :) |
21:43
๐
|
balrog |
getconf LFS_CFLAGS tells you what defines you need for 64-bit off_t |
21:43
๐
|
balrog |
and it's -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 |
21:43
๐
|
balrog |
I think the issue is that the system is 32-bit and the off_t is 64-bit |
21:44
๐
|
balrog |
and a long is 32 bits, not 64, typically |
21:44
๐
|
balrog |
%ld means long |
21:45
๐
|
balrog |
does this all make sense? :) |
21:46
๐
|
balrog |
long is 32 bits on 32 bit platforms, 64 bits on 64 bit platforms |
21:46
๐
|
balrog |
off_t is 64 bits on all platforms with the proper defines |
21:46
๐
|
balrog |
technically, this should have been broken if wget was compiled for 32-bit on any platform (without the patch) |
21:47
๐
|
chronomex |
huh. |
21:47
๐
|
chronomex |
and nobody noticed? |
21:47
๐
|
alard |
There aren't that many 2GB files. |
21:48
๐
|
balrog |
it doesn't have anything to do with >2gb files |
21:48
๐
|
chronomex |
ah |
21:48
๐
|
balrog |
>2gb files will download fine |
21:48
๐
|
balrog |
since that's another part of wget, and the proper flags are being set for 64-bit off_t |
21:48
๐
|
alard |
Yes, but if you have a >2gb file, on a 32-bit system, the WARC record will have an incorrect Content-Length? |
21:49
๐
|
balrog |
if you have anything on a 32-bit system the WARC record will have an incorrect Content-Length |
21:49
๐
|
balrog |
because it's truncating |
21:49
๐
|
alard |
Anything? |
21:49
๐
|
ersi |
Even if the Content-length is <32-bit? |
21:50
๐
|
ersi |
in value |
21:50
๐
|
alard |
If it really is any size on a 32-bit system, that seems like something we should have noticed, then. |
21:50
๐
|
balrog |
that's what it seemed, my tests were downloading http://google.com/ which is only one small page |
21:50
๐
|
balrog |
I'm testing on i386 |
21:50
๐
|
ersi |
wรยคt, huh cool |
21:51
๐
|
alard |
So it wouldn't crash, but it would print the wrong Content-Length and continue? |
21:51
๐
|
balrog |
nope, it's fine on intel-32 |
21:51
๐
|
balrog |
wat |
21:52
๐
|
balrog |
and yes, that's what it was doing |
21:55
๐
|
alard |
The webshots warcs are currently being parsed by the CDX indexer, so they're fine. That implies that there is either no-one with a 32-bit system working on webshots, or that it's not a problem (for those systems). |
21:56
๐
|
alard |
I think the warriors are 32-bits, even. |
21:56
๐
|
ersi |
Isn't the VM 32-bit? |
21:56
๐
|
balrog |
It may be that asprintf behaves differently on OS X and Linux |
21:56
๐
|
balrog |
Gonna test it :) |
21:56
๐
|
balrog |
I did some webshots but only on intel |
21:56
๐
|
balrog |
Hmm... |
21:56
๐
|
balrog |
There might be platform specific behavior of asprintf |
21:56
๐
|
alard |
Or some GNU-specific fix. |
21:58
๐
|
balrog |
Then Debian ARM should work. |
22:00
๐
|
alard |
Yes, you'd expect that. Unless the workaround excludes ARM. |
22:00
๐
|
balrog |
possible. |
22:00
๐
|
balrog |
this is why I hate hacks :/ |
22:01
๐
|
chronomex |
hmmm fascinating hack https://code.google.com/p/linear-book-scanner/ |
22:02
๐
|
balrog |
alard: on ARM, I can printf an off_t only if I use %jd |
22:02
๐
|
balrog |
hmm |
22:03
๐
|
balrog |
or %lld. so it's a long long |
22:03
๐
|
balrog |
that's the problem |
22:03
๐
|
balrog |
stuff becomes "undefined behavior" here |
22:05
๐
|
alard |
Somehow I find this a very tiring subject. :) |
22:05
๐
|
alard |
Why doesn't it just work?! |
22:05
๐
|
balrog |
http://en.wikipedia.org/wiki/Undefined_behavior รขยย implementation-defined stuff |
22:06
๐
|
balrog |
which you simply cannot rely on |
22:06
๐
|
chronomex |
"undefined behavior" translates to "sends dirty pictures to your mum" |
22:06
๐
|
chronomex |
keep that in mind and you'll be ok |
23:57
๐
|
dashcloud |
http://www.infodocket.com/2012/11/12/gif-is-the-oxford-dictionaries-usa-2012-word-of-the-year/ |
23:57
๐
|
dashcloud |
so, who's worse: Network Solutions or GoDaddy? |
23:58
๐
|
chronomex |
what, it took 20 years? |