Bug 86070

Summary: Host application crash on vmware fusion 7 in vmw_swc_flush
Product: Mesa Reporter: Nicholas Yue <yue.nicholas>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: medium    
Version: 8.0   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Nicholas Yue 2014-11-09 17:31:01 UTC
nicholas@ubuntu:~$ mplay-bin: vmw_context.c:138: vmw_swc_flush: Assertion `ret == PIPE_OK' failed.
4646:  (sent by pid 4646)

----------------
glxinfo (top portion)

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_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_create_context, GLX_ARB_create_context_profile, 
    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_EXT_create_context_es2_profile, 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 version: 1.4
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_SGI_make_current_read, GLX_SGI_video_sync, 
    GLX_SGIS_multisample, GLX_SGIX_fbconfig, GLX_SGIX_pbuffer, 
    GLX_SGIX_visual_select_group, GLX_EXT_texture_from_pixmap
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE;  
OpenGL version string: 2.1 Mesa 8.0.4
OpenGL shading language version string: 1.20
Comment 1 Sinclair Yeh 2014-11-12 01:19:14 UTC
From the description I assume the submitter is using mplayer.  I've done the following steps and could not reproduce this issue:

1.  download and build mplayer from http://www.mplayerhq.hu
2.  download an mpeg2 clip from http://support.apple.com/en-us/HT1425
3.  ran:  mplayer sample_mpeg2.m2v

The clip seems to run fine.  My system configuration:
  Fedora 20 64-bit
  MESA 10.4

Please provide more details in terms of steps to reproduce and the system configuration.
Comment 2 Nicholas Yue 2014-11-12 01:28:22 UTC
Hi Sinclair,

  The application mplay (not mplayer) is from the Houdini suite of software by Side Effects

  http://www.sidefx.com/index.php?option=com_download&task=apprentice&Itemid=208

  You can use the Apprentice (free) version to verify the crash when launching mplay, gplay or houdini itself

  Mesa version was already included in the original report

OpenGL version string: 2.1 Mesa 8.0.4

  My OS in question is Ubuntu 12.04.5 x64

  Kernel is : Linux ubuntu 3.13.0-32-generic #57~precise1-Ubuntu SMP Tue Jul 15 03:51:20 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Cheers
Comment 3 Nicholas Yue 2014-11-12 01:36:30 UTC
I am using the most recent version of VMWare Fusion 7 on OS X Yosemite to host Ubuntu 12.04.5 x64 and it only provides Mesa3D at version 8.0.4 not the 10.4 you are testing with.

Is there an update in VMWare Fusion 7 I should get and retest before debugging further ?
Comment 4 Sinclair Yeh 2014-11-12 19:20:42 UTC
Thanks.  I can now reproduce this issue with MESA 8.0.4 and MESA 9.0.  This seems to work fine with MESA 10.1.3.

I'll track down the root cause of this.

Do you see this "vmw_ioctl_command error Invalid argument." in the terminal when you run mplay-bin?
Comment 5 Nicholas Yue 2014-11-12 19:24:02 UTC
(In reply to Sinclair Yeh from comment #4)
> Thanks.  I can now reproduce this issue with MESA 8.0.4 and MESA 9.0.  This
> seems to work fine with MESA 10.1.3.
> 
> I'll track down the root cause of this.
> 
> Do you see this "vmw_ioctl_command error Invalid argument." in the terminal
> when you run mplay-bin?

No. I don't recall seeing "vmw_ioctl_command error Invalid argument."

Cheers
Comment 6 Emil Velikov 2014-11-12 22:28:26 UTC
(In reply to Sinclair Yeh from comment #4)
> Do you see this "vmw_ioctl_command error Invalid argument." in the terminal
> when you run mplay-bin?

Those messages happen when a mix of downstream & upstream modules happen. Namely:
- Both downstream vs upstream modules have the same name. Thus userspace loads either one.
- Upstream modules require another module which is available as upstream & downstream. In some cases via alias.

One could fix this, by stripping/avoiding the build of the downstream module when the kernel is new enough/has the equivalent module.
Please kindly forward this to the relevant team/person :)
Comment 7 Sinclair Yeh 2014-11-13 21:13:44 UTC
This issue has been fixed by ce9a3a8997d86f3bf387f23578972acb5b16ac4ac, which is in MESA 10.1.0 onwards.  The fix is not trivial to back port to MESA 8.0.4 and so the easiest way is to wait until the next update of Ubuntu 12.04.

There is a temporary workaround if waiting for the next update is not an option.
1.  Download MESA 10.1.2 from freedesktop
2.  ./configure --prefix=<PATH OF YOUR CHOOSING> --with-gallium-drivers=svga --enable-xa --disable-dri3
3.  make install

After the above is done, before running mplay-bin, do an "export LD_LIBRARY_PATH=<PATH OF YOUR CHOOSING FROM EARLIER>/lib"
Comment 8 Nicholas Yue 2014-11-14 00:23:52 UTC
(In reply to Sinclair Yeh from comment #7)
> This issue has been fixed by ce9a3a8997d86f3bf387f23578972acb5b16ac4ac,
> which is in MESA 10.1.0 onwards.  The fix is not trivial to back port to
> MESA 8.0.4 and so the easiest way is to wait until the next update of Ubuntu
> 12.04.
> 
> There is a temporary workaround if waiting for the next update is not an
> option.
> 1.  Download MESA 10.1.2 from freedesktop
> 2.  ./configure --prefix=<PATH OF YOUR CHOOSING> --with-gallium-drivers=svga
> --enable-xa --disable-dri3
> 3.  make install
> 
> After the above is done, before running mplay-bin, do an "export
> LD_LIBRARY_PATH=<PATH OF YOUR CHOOSING FROM EARLIER>/lib"

Thanks Sinclair,

  I have built Mesa 10.1.2 as a temporary solution and the Houdini tools are now running fine on VMWare Fusion 7.

Cheers

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.