Posts showing up blank


(Adam Capriola) #1

Continuing the discussion from [Solved] Posts appearing blank in 1.0:


This has happened to my forums on two separate instances (once a week ago, once today): users’ newly created posts start showing up blank.

I wish I had any clue what might be causing this. The fix has been to git pull and ./launcher rebuild app then rebuild the HTML for the blank posts. While typing, the user can see their post in the preview, but the post doesn’t render after it is submitted. Old posts are visible. I am on 1.2.0.beta1.


(Sam Saffron) #2

I have seen this in a few places will add a safeguard to ensure this can not happen anymore


(Sam Saffron) #3

Can you try this:

It attempts to recover the markdown engine if it goes bad.

this may be a v8 issue.

Watch your logs if you see “Markdown engine appears to have crashed” its a sign that this corrected the issue.


(Jeff Atwood) #4

I hope this works, this problem is really severe when it happens cc: @PJH


(PJH) #5

Not noticed it recently - well not since that batch that started around 3am UTC one morning…


(Adam Capriola) #6

It’s happening again. :cry:


(Sam Saffron) #7

With that latest patch deployed?


(Adam Capriola) #8

Yes. I was on a build up to commit f25f8de. I am updating again now.


(Sam Saffron) #9

are you noticing anything in the logs when it happens?


(Adam Capriola) #10

I’m going through my error logs and am not totally sure what to look for since I’m seeing many various warnings, but I do see this error in the logs a bunch when I think the posts started going blank:

Attempted to concat a non UTF-8 string in SafeBuffer

Is that of any significance?


(Jeff Atwood) #11

Yes I believe that is related. Do you have any users with odd Unicode chars in their username, title, etc?


(Sam Saffron) #12

I wonder if the issue here is nokogiri and not V8


(Adam Capriola) #13

Usernames all match this regex: ^[A-Za-z0-9][A-Za-z0-9_]{2,24}$

I think users can only set “Regular” as their title (as an admin that’s all I can do). It’s possible someone might have a weird character in their About Me or another profile field but I’ll have to get back to you on that.

Here’s one of the full warnings:

Attempted to concat a non UTF-8 string in SafeBuffer - <a href="http://bbs.sixprizes.com/t/survey-says-feedback-on-fall-regionals/3500">“Survey Says…” – Feedback on Fall Regionals</a> - internal encoding UTF-8, external encoding UTF-8 attempted to append encoding  ASCII-8BIT

(Adam Capriola) #14

Ok yeah, good call @codinghorror. It appears some lesser-used characters have been utilized lately:

α, δ, Ω

Only in posts though from what I can tell. I noticed in the error logs there were also warnings Encountered a non UTF-8 string in SafeBuffer - [...] - internal encoding UTF-8, external encoding UTF-8 my encoding is ASCII-8BIT that preceded the type of warning I posted above where […] is partial HTML of an email digest.


(Adam Capriola) #15

This happened again last night and I noticed soon enough to catch all the possibly related warnings:

(Inaccessible private links redacted)

The first couple of warnings involve the one topic I know has some odd Unicode characters (α, δ, Ω). The subsequent ones I think are instances when a user tried to post and then their post came up blank.


(Jeff Atwood) #16

We can’t see those messages, though, so you’ll need to quote them.


(Adam Capriola) #17

Oops, my bad. I assumed the share link might be public (I should have checked). Here are the warnings:


(Sam Saffron) #18

Next time this happens, look through logs, I added a bit more logging to help us isolate the issue.


(Sam Saffron) #19

Can you try this patch:

https://github.com/discourse/discourse/commit/16c2562e57fb585fb030430c5ebdebc78b29d4c0

grab latest, then watch /logs, if it is flooded with red in a week or so with the message Cooked post processor in FATAL state we are on to something.

My current theory is that something about nokogiri is crashing.


(Jeff Atwood) #20

Postgres gem bug, fixed with upgrade to pg gem.