Bug 42128 - Crash when visiting a site with Firefox
Summary: Crash when visiting a site with Firefox
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: 7.11
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 46239 46591 47872 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-10-23 06:48 UTC by Thor
Modified: 2019-09-18 19:34 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
The output of glxinfo (11.04 KB, text/plain)
2011-10-27 02:53 UTC, Thor
Details
backtrace (25.33 KB, application/x-gzip)
2012-02-24 15:29 UTC, Götz
Details
firefox backtrace from _mesa_problem (105.17 KB, text/plain)
2012-04-20 10:00 UTC, Orion Poplawski
Details

Description Thor 2011-10-23 06:48:23 UTC
Using Firefox 7.0.1, startpage is https://www.ixquick.com/eng/ entering "delayed cron" in the search, in the list, there is a link to devcenter.heraku.com/cron - clicking on it makes Firefox give this message in the console:

Can't find symbol 'glXBindTexImageEXT'
Can't find symbol 'glXReleaseTexImageEXT'
Mesa 7.11 implementation error: unexpected format in _mesa_choose_tex_format()
Please report at bugs.freedesktop.org
Mesa 7.11 implementation error: unexpected MESA_FORMAT for renderbuffer
Please report at bugs.freedesktop.org
###!!! ABORT: Divide by zero: file /build/src/mozilla-release/toolkit/xre/nsSigHandlers.cpp, line 174
###!!! ABORT: Divide by zero: file /build/src/mozilla-release/toolkit/xre/nsSigHandlers.cpp, line 174
Aborted
----------------------------------8<-----|cut here|-----------------------

and it crashes...

Using XFCE 4.8, Arch Linux "3.0-Arch"

reporting this to Mozilla as well...

Good luck!

Thor

PS - not really severe, just wanted to add to the quality...
Comment 1 Brian Paul 2011-10-23 08:59:01 UTC
Could you possibly debug this to determine what the texture internalFormat is at the failure?  Or try Mesa from git? I can improve the warning message for this problem for the future.
Comment 2 Kenneth Graunke 2011-10-23 14:01:50 UTC
Not sure what driver you're using...

I was not able to reproduce this on my Intel Sandybridge system, using either the latest Mesa 7.11 branch (from git, not the release) or Mesa master.  I'm also using Firefox 7.0.1 on Arch Linux.
Comment 3 Thor 2011-10-26 03:12:54 UTC
@ Kenneth Graunke 
Hmm, this is not really critical, but, perhaps the site in question uses features (stuff) that makes Firefox trip, somehow.

What do I enter where so you can get more info (if needed)...
Comment 4 Brian Paul 2011-10-26 07:23:43 UTC
Posting the output of 'glxinfo' would  be a good start.
Comment 5 Thor 2011-10-27 02:53:52 UTC
Created attachment 52818 [details]
The output of glxinfo
Comment 6 Thiago 2011-12-18 10:59:59 UTC
It also happens to me with mesa 7.11.2
same glxinfo as Thor's

https://bugs.archlinux.org/task/27573
Comment 7 awhan 2012-02-02 22:57:21 UTC
today i experienced the same problem when trying to open github.com 

$ firefox -safe-mode
Mesa 7.11.2 implementation error: unexpected format in _mesa_choose_tex_format()
Please report at bugs.freedesktop.org
Mesa 7.11.2 implementation error: unexpected MESA_FORMAT for renderbuffer
Please report at bugs.freedesktop.org
###!!! ABORT: Divide by zero: file /build/src/mozilla-release/toolkit/xre/nsSigHandlers.cpp, line 174
###!!! ABORT: Divide by zero: file /build/src/mozilla-release/toolkit/xre/nsSigHandlers.cpp, line 174
Segmentation fault

other sites like google and youtube worked just fine. also chromium web browser had no problem with github on the same machine. 

Mozilla Firefox 10.0

mesa 7.11.2-1

Linux blah 3.2.2-1-ARCH #1 SMP PREEMPT Thu Jan 26 08:28:27 UTC 2012 i686 Intel(R) Celeron(R) M processor 1300MHz GenuineIntel GNU/Linux

00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 02)

openbox window manager
Comment 8 awhan 2012-02-02 23:42:04 UTC
just noticed that setting webgl.disabled to true in the about:config settings of firefox lets me get away with the crashing when i visit github.com

incidently as mentioned in this bug report https://bugs.freedesktop.org/show_bug.cgi?id=42611 firefox crashes when i visit http://get.webgl.org/ as well
Comment 9 Christopher Yeleighton 2012-02-10 14:28:33 UTC
Both <URL: http://www.britannica.com/EBchecked/topic/23762/Andhra-University > AND <URL: about:support > crash Mozilla Firefox 9.0.1. I disabled webgl support and they show up.

name of display: :0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
    GLX_OML_swap_method, GLX_SGI_make_current_read, GLX_SGI_swap_control, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_INTEL_swap_event
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4
client glx extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_framebuffer_sRGB, 
    GLX_MESA_copy_sub_buffer, GLX_MESA_multithread_makecurrent, 
    GLX_MESA_swap_control, GLX_OML_swap_method, GLX_OML_sync_control, 
    GLX_SGI_make_current_read, GLX_SGI_swap_control, GLX_SGI_video_sync, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap, 
    GLX_INTEL_swap_event
GLX extensions:
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context, 
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer, 
    GLX_MESA_multithread_makecurrent, GLX_MESA_swap_control, 
    GLX_OML_swap_method, GLX_OML_sync_control, GLX_SGI_make_current_read, 
    GLX_SGI_swap_control, GLX_SGI_video_sync, GLX_SGIS_multisample, 
    GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group, 
    GLX_EXT_texture_from_pixmap, GLX_INTEL_swap_event
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) 865G 
OpenGL version string: 1.3 Mesa 7.11
OpenGL extensions:
    GL_ARB_multisample, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, 
    GL_EXT_blend_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract, 
    GL_EXT_copy_texture, GL_EXT_polygon_offset, GL_EXT_subtexture, 
    GL_EXT_texture_object, GL_EXT_vertex_array, GL_EXT_compiled_vertex_array, 
    GL_EXT_texture, GL_EXT_texture3D, GL_IBM_rasterpos_clip, 
    GL_ARB_point_parameters, GL_EXT_draw_range_elements, GL_EXT_packed_pixels, 
    GL_EXT_point_parameters, GL_EXT_rescale_normal, 
    GL_EXT_separate_specular_color, GL_EXT_texture_edge_clamp, 
    GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp, 
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_ARB_multitexture, 
    GL_IBM_multimode_draw_arrays, GL_IBM_texture_mirrored_repeat, 
    GL_3DFX_texture_compression_FXT1, GL_ARB_texture_cube_map, 
    GL_ARB_texture_env_add, GL_ARB_transpose_matrix, 
    GL_EXT_blend_func_separate, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays, 
    GL_EXT_secondary_color, GL_EXT_texture_env_add, 
    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias, 
    GL_INGR_blend_func_separate, GL_NV_blend_square, GL_NV_light_max_exponent, 
    GL_NV_texgen_reflection, GL_SUN_multi_draw_arrays, 
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression, 
    GL_EXT_framebuffer_object, GL_EXT_texture_env_dot3, GL_MESA_window_pos, 
    GL_NV_packed_depth_stencil, GL_NV_texture_rectangle, GL_NV_vertex_program, 
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar, 
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat, 
    GL_ARB_window_pos, GL_EXT_texture_cube_map, GL_NV_vertex_program1_1, 
    GL_APPLE_client_storage, GL_APPLE_packed_pixels, 
    GL_APPLE_vertex_array_object, GL_ARB_draw_buffers, GL_ARB_shader_objects, 
    GL_ARB_vertex_program, GL_ARB_vertex_shader, GL_ATI_draw_buffers, 
    GL_EXT_stencil_wrap, GL_MESA_pack_invert, GL_MESA_ycbcr_texture, 
    GL_ARB_half_float_pixel, GL_ARB_point_sprite, GL_ARB_shading_language_100, 
    GL_ARB_sync, GL_ARB_vertex_buffer_object, GL_ATI_blend_equation_separate, 
    GL_EXT_blend_equation_separate, GL_OES_read_format, 
    GL_ARB_pixel_buffer_object, GL_ARB_texture_rectangle, 
    GL_EXT_pixel_buffer_object, GL_EXT_texture_rectangle, 
    GL_ARB_framebuffer_object, GL_EXT_framebuffer_blit, 
    GL_EXT_framebuffer_multisample, GL_EXT_packed_depth_stencil, 
    GL_APPLE_object_purgeable, GL_ARB_vertex_array_object, 
    GL_EXT_gpu_program_parameters, GL_EXT_texture_env_combine, 
    GL_OES_EGL_image, GL_ARB_copy_buffer, GL_ARB_map_buffer_range, 
    GL_EXT_separate_shader_objects, GL_ARB_ES2_compatibility, 
    GL_ARB_draw_elements_base_vertex, GL_ARB_explicit_attrib_location, 
    GL_ARB_provoking_vertex, GL_ARB_sampler_objects, GL_EXT_provoking_vertex, 
    GL_ARB_robustness
glu version: 1.3
glu extensions:
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x21 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x22 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x7d 24 tc  0 24  0 r  .  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x7e 24 tc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x7f 24 tc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x80 24 tc  0 24  0 r  .  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x81 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x82 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x83 24 tc  0 32  0 r  .  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x84 24 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x85 24 tc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x86 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x87 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x88 24 tc  0 24  0 r  y  .  8  8  8  0  0 24  8 16 16 16  0  0 0 Slow
0x89 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x8a 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
0x8b 24 dc  0 24  0 r  .  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x8c 24 dc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x8d 24 dc  0 24  0 r  y  .  8  8  8  0  0  0  0  0  0  0  0  0 0 None
0x8e 24 dc  0 24  0 r  .  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x8f 24 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x90 24 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x91 24 dc  0 32  0 r  .  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x92 24 dc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x93 24 dc  0 32  0 r  y  .  8  8  8  8  0  0  0  0  0  0  0  0 0 None
0x94 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x95 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x96 24 dc  0 24  0 r  y  .  8  8  8  0  0 24  8  0  0  0  0  0 0 None
0x97 24 dc  0 24  0 r  y  .  8  8  8  0  0 24  8 16 16 16  0  0 0 Slow
0x98 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
0x99 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  0 0 Slow
0x4c 32 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  0 0 None
Comment 10 Götz 2012-02-20 10:38:19 UTC
I get the crash with this error too (865G):

$  firefox
Mesa 8.1-devel implementation error: unexpected format GL_DEPTH_COMPONENT24 in _mesa_choose_tex_format()
Please report at bugs.freedesktop.org
firefox: main/formats.c:1556: _mesa_get_format_bytes: Assertion `info->BytesPerBlock' failed.

A Firefox developer said this is a bug in mesa https://bugzilla.mozilla.org/show_bug.cgi?id=696636#c12

00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
mesa 8.1-git  6e738d35c5c88769ececbadd5f4ac14d36647168
intel 2.17-git 	66cc9c69657ac2703f2c7fc3c2c50f06bf5daa99
libdrm 2.4.31-git 9b3ad51ae5fd9654df8ef75de845a519015150bb
linux 3.2.6
Comment 11 Ian Romanick 2012-02-22 14:13:30 UTC
(In reply to comment #10)
> I get the crash with this error too (865G):
> 
> $  firefox
> Mesa 8.1-devel implementation error: unexpected format GL_DEPTH_COMPONENT24 in
> _mesa_choose_tex_format()

Can you set a breakpoint a _mesa_problem and collect a backtrace?

> Please report at bugs.freedesktop.org
> firefox: main/formats.c:1556: _mesa_get_format_bytes: Assertion
> `info->BytesPerBlock' failed.
> 
> A Firefox developer said this is a bug in mesa
> https://bugzilla.mozilla.org/show_bug.cgi?id=696636#c12
> 
> 00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics
> Controller (rev 02)
> mesa 8.1-git  6e738d35c5c88769ececbadd5f4ac14d36647168
> intel 2.17-git     66cc9c69657ac2703f2c7fc3c2c50f06bf5daa99
> libdrm 2.4.31-git 9b3ad51ae5fd9654df8ef75de845a519015150bb
> linux 3.2.6

The bigger question is why is Firefox even trying to use this driver to provide WebGL support?  This hardware cannot possibly handle it.  At all.  WebGL requires either OpenGL ES 2.0 or desktop GL with ARB_fragment_shader.  As you can see from the glxinfo output, this hardware has none of the above.
Comment 12 Benoit Jacob 2012-02-22 16:00:47 UTC
OK, indeed we should not attempt to do WebGL on OpenGL 1.

But the stack trace in https://bugzilla.mozilla.org/show_bug.cgi?id=696636#c11 also shows that there is a driver bug here.
Comment 13 Benoit Jacob 2012-02-22 19:23:50 UTC
Alright, patch under review @moz to block opengl 1.
Comment 14 Ian Romanick 2012-02-23 09:05:47 UTC
(In reply to comment #12)
> OK, indeed we should not attempt to do WebGL on OpenGL 1.
> 
> But the stack trace in https://bugzilla.mozilla.org/show_bug.cgi?id=696636#c11
> also shows that there is a driver bug here.

Agreed.  By the time that stacktrace was taken, the underlying bug had done its damage.  That's why I asked (comment #11) for an additional backtrace from _mesa_problem.  Something is causing the driver to create a DEPTH_COMPONENT24 texture, but that hardware doesn't support depth textures at all.  As a result, by the time execution gets to _mesa_get_format_bytes or intel_region_alloc, it's passing around garbage data.  In the intel_region_alloc case, the texture format is unknown to the driver, so cpp is zero.  The divide by cpp causes the SIGFPE.
Comment 15 Ian Romanick 2012-02-23 09:08:43 UTC
*** Bug 46239 has been marked as a duplicate of this bug. ***
Comment 16 Rick Jenkins 2012-02-24 13:51:33 UTC
*** Bug 46591 has been marked as a duplicate of this bug. ***
Comment 17 Götz 2012-02-24 15:28:35 UTC
Ian Romanick, I am not sure how to do the breakpoint. I did a backtrace, but I don't know if it is useful.
Comment 18 Götz 2012-02-24 15:29:35 UTC
Created attachment 57613 [details]
backtrace
Comment 19 Orion Poplawski 2012-04-20 10:00:00 UTC
Created attachment 60400 [details]
firefox backtrace from _mesa_problem

#0  _mesa_problem (ctx=0xa4d49000,
    fmtString=0x1f85368 "unexpected format in _mesa_choose_tex_format()")
    at main/imports.c:930
#1  0x01dcc957 in _mesa_choose_tex_format (ctx=0xa4d49000,
    internalFormat=33190, format=0, type=0) at main/texformat.c:762
#2  0x01d54bba in intel_alloc_renderbuffer_storage (ctx=0xa4d49000,
    rb=0xa7a74350, internalFormat=33190, width=300, height=150)
    at intel_fbo.c:123
#3  0x01d7f872 in renderbuffer_storage (target=<optimized out>,
    internalFormat=<optimized out>, width=300, height=150, samples=1)
    at main/fbobject.c:1318
#4  0x41a9a999 in glRenderbufferStorageMultisample (target=36161,
    samples=1, internalformat=33190, width=300, height=150)
    at ../../../src/mapi/glapi/glapitemp.h:3937

output of print *ctx is in attachment.  Let me know if anything else would be useful.

This is with:

firefox-11.0-1.fc16.i686
mesa-dri-drivers-7.11.2-3.fc16.i686
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
Comment 20 Brian Paul 2012-04-20 10:12:28 UTC
On your 865G system, glx is saying that GL_ARB_depth_texture is not supported.  That's why we're failing in _mesa_choose_tex_format().  Evidently, the driver doesn't support depth textures for your older GPU.

Just out of curiosity, could you try this simple patch and see what happens?

--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -211,7 +211,7 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint inter
          ; /* fallthrough */
    }
 
-   if (ctx->Extensions.ARB_depth_texture) {
+   if (1 || ctx->Extensions.ARB_depth_texture) {
       switch (internalFormat) {
          case GL_DEPTH_COMPONENT:
          case GL_DEPTH_COMPONENT24:
Comment 21 Brian Paul 2012-04-20 10:21:45 UTC
*** Bug 47872 has been marked as a duplicate of this bug. ***
Comment 22 GitLab Migration User 2019-09-18 19:34:18 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/700.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.