zee (_zee_) wrote in lj_dev,
zee
_zee_
lj_dev

  • Music:
Several days ago I've discovered an annoying bug in lj engine. I'm posting the bug report here because, in my experience, posting bug reports on the support board results in practically nothing.

I've first experienced the bug with Tranquility, tested it also with Generator (same error), don't know if it occurs with other layouts (it shouldn't depend on the layout though).

Let's customize an existing layout by use of a theme layer. To pinpoint the bug, the theme layer should be as small as possible, so I wrote something like this.
Now, the bug itself. Try accessing this page in your browser — and you'll get a bunch of horribly broken unicode characters instead of the actual page. The most interesting thing is that LJ's able to calculate the content length of the page correctly, so the actual rendering of the page using our layout is done correctly, it just drops the connection while sending the page, so the error must be at a lower level.

An example wget log of what's happening:
d:\Teh Dumpage>wget http://users.livejournal.com/_zee_/friends/ruphp?s2id=11661014
--05:07:53--  http://users.livejournal.com/_zee_/friends/ruphp?s2id=11661014
           => `ruphp@s2id=11661014'
Resolving users.livejournal.com... 204.9.177.18
Connecting to users.livejournal.com|204.9.177.18|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16 047 (16K) [text/html]

15% [=========>                                                         ] 2 487         --.--K/s

05:07:54 (257.41 KB/s) - Read error at byte 2487/16047 (Connection reset by peer). Retrying.

--05:07:54--  http://users.livejournal.com/_zee_/friends/ruphp?s2id=11661014
  (try: 2) => `ruphp@s2id=11661014'
Connecting to users.livejournal.com|204.9.177.18|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16 047 (16K) [text/html]

14% [========>                                                          ] 2 617         --.--K/s

05:07:55 (260.56 KB/s) - Read error at byte 2617/16047 (Connection reset by peer). Retrying.

--05:07:55--  http://users.livejournal.com/_zee_/friends/ruphp?s2id=11661014
  (try: 3) => `ruphp@s2id=11661014'
Connecting to users.livejournal.com|204.9.177.18|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16 047 (16K) [text/html]

14% [========>                                                          ] 2 617         --.--K/s

05:07:57 (270.71 KB/s) - Read error at byte 2617/16047 (Connection reset by peer). Retrying.

--05:07:57--  http://users.livejournal.com/_zee_/friends/ruphp?s2id=11661014
  (try: 4) => `ruphp@s2id=11661014'
Connecting to users.livejournal.com|204.9.177.18|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16 047 (16K) [text/html]

 6% [===>                                                               ] 1 157         --.--K/s


By changing ?skip=, I've pinpointed the bug to this particular entry in ru_php community, but there's nothing wrong with it, and it displays normally if I use uncustomized builtin layouts. Any idea of what's going on?

Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 10 comments