Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox and Chrome causing hard client crash #1500

Closed
totaam opened this issue Apr 14, 2017 · 20 comments
Closed

Firefox and Chrome causing hard client crash #1500

totaam opened this issue Apr 14, 2017 · 20 comments

Comments

@totaam
Copy link
Collaborator

totaam commented Apr 14, 2017

Issue migrated from trac ticket # 1500

component: client | priority: blocker | resolution: fixed

2017-04-14 18:34:19: maxmylyn created the issue


Using the latest trunk r15617 (Both client and server are Fedora 25), I am getting hard client crashes after using Firefox or Chrome. Chrome seems to behave nicer, I can use it almost indiscriminately, but at some point something changes and then it causes a hard client crash. Firefox seems to be the easiest - I just opened it up and watched a YouTube video and that was enough to cause the crash - even just opening up a text only website like Reddit or Wikipedia and scrolling will also cause a crash. Once the client crashes, any subsequent connections will fail with the same error(if you were watching a video) until you kill Firefox or Chrome. Of note, just leaving Xterms running seems to behave - no crashes or errors. Running with a -d gtk seems to turn up nothing of interest.

Here's the last bit of the client log before it crashes:


(Xpra:19270): Gdk-ERROR **: The program 'Xpra' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 79698 error_code 8 request_code 72 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
2017-04-14 10:30:54,287 sound output stopping
Trace/breakpoint trap (core dumped)

One quick question:

What -d flag would be most useful here?

@totaam
Copy link
Collaborator Author

totaam commented Apr 15, 2017

2017-04-15 07:38:35: antoine changed owner from antoine to maxmylyn

@totaam
Copy link
Collaborator Author

totaam commented Apr 15, 2017

2017-04-15 07:38:35: antoine commented


When did this regression start? Can you bisect it?
I'm not seeing that here and I'm always running trunk on F25.
Do you use mmap? Have you tried enabling / disabling opengl? clipboard? etc..

As for debug flags, when in doubt go for "-d all": better have too much than too little.

@totaam
Copy link
Collaborator Author

totaam commented Apr 18, 2017

2017-04-18 18:04:34: maxmylyn commented


Looks like it was OpenGL - running with --opengl=no I don't get the crash anymore.

Running with OpenGL enabled and -d all, here's the last few prints:

2017-04-18 10:08:01,913 check_server_echo(0) last=True, server_ok=True
2017-04-18 10:08:01,913 add_packet_to_queue(add_data ...)
2017-04-18 10:08:01,928 gtk2.GLWindowBacking(12, (460, 185), None).gl_show() swapping buffers now
2017-04-18 10:08:01,929 gl_show after  79ms took  0ms,  1 updates
2017-04-18 10:08:01,929 gtk2.GLWindowBacking(12, (460, 185), None).gl_frame_terminator()
2017-04-18 10:08:01,929 <OpenGL.platform.baseplatform.glBindFramebuffer object at 0x7fed61243fd0>(GL_FRAMEBUFFER (36160), c_uint(1L))
2017-04-18 10:08:01,929 gtk2.GLWindowBacking(12, (460, 185), None).do_present_fbo() done

(Xpra:13520): Gdk-ERROR **: The program 'Xpra' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadMatch (invalid parameter attributes)'.
  (Details: serial 5782 error_code 8 request_code 72 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
2017-04-18 10:08:04,399 sound output stopping
Trace/breakpoint trap (core dumped)

[[br]]

Can you bisect it?

[[br]]

I'll get on that now since this morning seems a bit slow.

@totaam
Copy link
Collaborator Author

totaam commented Apr 18, 2017

2017-04-18 18:06:58: maxmylyn commented


Okay, I found a very reliable trigger:

  • Launch Firefox

  • Click on the SSL Information button (the button between Back / Forwards and the URL bar that shows you site certificate info)


That seems to reliably cause a crash here. Now, on to bisecting.

@totaam
Copy link
Collaborator Author

totaam commented Apr 18, 2017

2017-04-18 18:28:27: maxmylyn commented


First things first, rebuilding the client as 1.X causes the issue to go away, so it's limited to 2.X for now.

So I've rolled the client back to trunk r15500, and I'm still getting the crash.

I'll try rolling the server back as well, just to see if it makes a difference, but I'm 75% sure the issue is limited to the client.

@totaam
Copy link
Collaborator Author

totaam commented Apr 18, 2017

2017-04-18 18:47:00: maxmylyn commented


Alright, so of interest, my client's OpenGL information lists that it's a VMWare, Inc GPU with OpenGL version 2.1 - same as the server without a GPU. This desktop has an Nvidia 745 dedicated GPU, so I'm a little confused as to why it's listed as VMWare.

Edit:

This would probably explain the issues I'm running in to, they seem to be only on this machine as afarr's laptop with an Intel iGPU works fine running Windows 10 using the 2.1 r15608 client, and a 2.1 r15664 Fedora 25 server.

@totaam
Copy link
Collaborator Author

totaam commented Apr 18, 2017

2017-04-18 18:47:18: maxmylyn uploaded file 1500_gl_check.txt (7.2 KiB)

@totaam
Copy link
Collaborator Author

totaam commented Apr 19, 2017

2017-04-19 06:22:58: antoine changed priority from critical to blocker

@totaam
Copy link
Collaborator Author

totaam commented Apr 19, 2017

2017-04-19 06:22:58: antoine commented


We need to figure out if this crash is caused by:

@totaam
Copy link
Collaborator Author

totaam commented Apr 20, 2017

2017-04-20 21:21:10: maxmylyn commented


Starting with the low hanging fruit:

  • Upped client and server to trunk r15684

  • Disabling jpeg using --encodings=png,h264 still gets the crash, so it isn't the jpeg decoder

I perused #1309 and found out the fix was added in r15094. I rolled back to r15093, and the crash went away. However, upping to r15094 still doesn't cause the crash, so that isn't it.

Next up, walking through the versions you mentioned.

@totaam
Copy link
Collaborator Author

totaam commented Apr 20, 2017

2017-04-20 21:28:28: maxmylyn commented


So I still get the same crash even with r15560 - so it's been around for a while now. Not sure why I didn't catch this earlier. The fact that I get it before those changes tells me that they aren't the cause. Probably.

@totaam
Copy link
Collaborator Author

totaam commented Apr 21, 2017

2017-04-21 00:25:19: maxmylyn commented


Okay I've tried all the revisions mentioned in comment:6 and they all have the same crash.

@totaam
Copy link
Collaborator Author

totaam commented Apr 21, 2017

2017-04-21 06:55:50: antoine commented


Please try:

  • r15001
  • r14898
  • 15315 (2.0)
  • 14502 (1.0)
    And bisect from there as needed. (bearing in mind you may have to force enable opengl on older revisions)

@totaam
Copy link
Collaborator Author

totaam commented Apr 27, 2017

2017-04-27 20:58:42: maxmylyn commented


Quick update on this one:

After talking about it, the going theory right now is that the Nvidia driver isn't being loaded properly, as such we are falling back to the software opengl, which is causing an issue. That being said, the "VMWare" should work.

@totaam
Copy link
Collaborator Author

totaam commented May 11, 2017

2017-05-11 18:55:18: maxmylyn commented


Update:

  • Reinstalled the Nvidia driver today (thanks for finally supporting kernel 4.10 Nvidia, it's only been two/three months) and the issue went away.

Looks like it's the software OpenGL that's the problem.

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2017

2017-05-12 06:54:44: antoine changed title from Firefox and Chrome causing hard client crash in 15617 Trunk to Firefox and Chrome causing hard client crash

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2017

2017-05-12 06:54:44: antoine commented


r15811 moves "vmware" to the blacklist, so opengl won't be used by default on this buggy driver.

@maxmylyn: I think we can close this ticket?

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2017

2017-05-12 17:20:47: maxmylyn changed status from new to closed

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2017

2017-05-12 17:20:47: maxmylyn set resolution to fixed

@totaam
Copy link
Collaborator Author

totaam commented May 12, 2017

2017-05-12 17:20:47: maxmylyn commented


Agreed, closing.

@totaam totaam closed this as completed May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant