Skip to content
This repository has been archived by the owner on Apr 28, 2021. It is now read-only.

intel_do_flush_locked failed: Input/output error #137

Open
timholy opened this issue Feb 10, 2017 · 36 comments
Open

intel_do_flush_locked failed: Input/output error #137

timholy opened this issue Feb 10, 2017 · 36 comments

Comments

@timholy
Copy link
Contributor

timholy commented Feb 10, 2017

I'm back to giving this a whirl. I started by running the tests, and I get a segfault with the message

julia> include("runtests.jl")
Now showing rotate_robj.jl:

intel_do_flush_locked failed: Input/output error

I was able to verify that the GLFW tests pass.

Hardware/driver details:

tim@diva:~/.julia/v0.5/GLFW/test$ lspci | grep VGA ; lsmod | grep "kms\|drm" ; find /dev -group video ; \
> cat /proc/cmdline ; find /etc/modprobe.d/; cat /etc/modprobe.d/*kms* ; \
> ls /etc/X11/xorg.conf ; glxinfo | grep -i "vendor\|rendering" ; \
> grep LoadModule /var/log/Xorg.0.log
00:02.0 VGA compatible controller: Intel Corporation Broadwell-U Integrated Graphics (rev 09)
drm_kms_helper        155648  2 i915,nouveau
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
drm                   364544  15 ttm,i915,drm_kms_helper,nouveau
/dev/video0
find: ‘/dev/vboxusb’: Permission denied
/dev/fb0
/dev/dri/card0
/dev/dri/renderD128
/dev/dri/controlD64
BOOT_IMAGE=/boot/vmlinuz-4.4.0-62-generic root=UUID=932856c1-2a0e-4c7e-bdc0-64a1d0702474 ro quiet splash vt.handoff=7
/etc/modprobe.d/
/etc/modprobe.d/alsa-base.conf
/etc/modprobe.d/blacklist.conf
/etc/modprobe.d/fbdev-blacklist.conf
/etc/modprobe.d/blacklist-watchdog.conf
/etc/modprobe.d/blacklist-modem.conf
/etc/modprobe.d/blacklist-framebuffer.conf
/etc/modprobe.d/blacklist-oss.conf
/etc/modprobe.d/intel-microcode-blacklist.conf
/etc/modprobe.d/blacklist-firewire.conf
/etc/modprobe.d/iwlwifi.conf
/etc/modprobe.d/vmwgfx-fbdev.conf
/etc/modprobe.d/blacklist-ath_pci.conf
/etc/modprobe.d/mlx4.conf
/etc/modprobe.d/dkms.conf
/etc/modprobe.d/blacklist-rare-network.conf
# modprobe information used for DKMS modules
#
# This is a stub file, should be edited when needed,
# used by default by DKMS.
ls: cannot access '/etc/X11/xorg.conf': No such file or directory
direct rendering: Yes
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
    Vendor: Intel Open Source Technology Center (0x8086)
OpenGL vendor string: Intel Open Source Technology Center
[    18.791] (II) LoadModule: "glx"
[    19.022] (II) LoadModule: "intel"
[    19.039] (II) LoadModule: "modesetting"
[    19.039] (II) LoadModule: "fbdev"
[    19.040] (II) LoadModule: "vesa"
[    19.055] (II) LoadModule: "fbdevhw"
[    19.088] (II) LoadModule: "dri2"
[    19.088] (II) LoadModule: "present"
[    19.261] (II) LoadModule: "evdev"
[    19.311] (II) LoadModule: "synaptics"

What's odd is that I briefly tried this a couple of weeks ago, on the same machine, and I remember seeing an impressive-looking window (but got involved in other tasks before I could look further).

@SimonDanisch
Copy link
Member

Oh my, that's surely a bug in the driver...
There are a couple of cannot access and permission denied, maybe that's where things are going wrong?

Can you try glxinfo | grep OpenGL ?

@timholy
Copy link
Contributor Author

timholy commented Feb 10, 2017

$ glxinfo | grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

glxgears at least runs (though only ~60fps). I do have an NVIDIA card, but I uninstalled the driver a while back because it was causing me hassle when connecting to an external display. I can reinstall if necessary. GLVisualize, after all, is the main reason I bought this laptop 😄.

@timholy
Copy link
Contributor Author

timholy commented Feb 10, 2017

Oh, BTW, I'm also working towards solving my other main issue, which is that I do much of my plotting/visualization across a network. Is there a preferred solution? I'm looking into VirtualGL, but maybe there are much better options?

@SimonDanisch
Copy link
Member

haha, I remember :) This looks good to me...
Could the uninstall of the driver have things messed up? (Was the time it worked with the other drivers?)
Last time I researched this issue, it was become clear that it was a Linux/intel bug and after they fixed it I hoped to never see it again ;)

@timholy
Copy link
Contributor Author

timholy commented Feb 10, 2017

When it seemingly worked a few weeks ago, same state as now except that I surely have done an Ubuntu update. It was ~6 months ago that I uninstalled the nvidia driver. I could try booting into an older kernel, if you think that would help.

@timholy
Copy link
Contributor Author

timholy commented Feb 25, 2017

I was trying to debug this a bit and isolate the problem. Not quite sure I understand why the following isn't updating the window:

# first, comment out the renderloop call in rotate_robj.jl
julia> include("rotate_robj.jl")

julia> using GLWindow: render_frame, swapbuffers, poll_glfw

julia> render_frame(window)

julia> swapbuffers(window)

julia> poll_glfw()

One interesting observation is that swapbuffers takes ~1s even after the initial compilation. Do it enough times, and it crashes. It seems to be crashing in the ccall.

But what's weird is that, as you might guess from JuliaGL/GLAbstraction.jl#63, all the tutorials seem to work just fine. Any ideas? Maybe window settings?

@SimonDanisch
Copy link
Member

Yes, I do pretty fancy buffer setups, which are likely triggering the driver bug ;)

@SimonDanisch
Copy link
Member

you should also try window = glscreen(debugging = true)

@SimonDanisch
Copy link
Member

This works for me:
image

So maybe part of the bug?

@timholy
Copy link
Contributor Author

timholy commented Feb 25, 2017

I decided to take the plunge and install the nvidia driver. We'll see how long it lasts (I have to give a talk Tuesday). I'll go back to debugging this if I revert.

The demos are really cool!

@SimonDanisch
Copy link
Member

@SimonDanisch
Copy link
Member

Thanks :)

@timholy
Copy link
Contributor Author

timholy commented Mar 2, 2017

At least temporarily I'm back to intel (swapping external monitors/projectors with different resolutions was buggy). I tried your suggestions above:

  • calling poll_glfw() up to 100 times between renderings (result: just got a black screen)
  • using debugging=true didn't produce any text

So no dice yet. Since it did work earlier, can you point me to the places where you set buffer parameters? A little git blame based archeology might help me figure out the the specific changes that were relevant; just doing a git bisect wouldn't be easy, esp. since functionality is spread across many packages.

@SimonDanisch
Copy link
Member

I would be very surprised if it is because of something that happened in GLVisualize, a kernel update is much more likely. Have you tried reverting to a previous kernel state?
I think I haven't really touched the buffer code in the last months.
Nevertheless, I can see if I can put together a minimal example, utilizing the GLVisualize rendering functionality.
That's probably a good thing for my rebuild anyways ;)

@timholy
Copy link
Contributor Author

timholy commented Mar 3, 2017

Yeah, I tried every kernel I had installed on my machine. No luck. Of course it's possible I'd done an apt-get clean or other housecleaning in the meantime.

@timholy
Copy link
Contributor Author

timholy commented Mar 3, 2017

Could have been an xwindow update, of course. That's harder to test.

@biogeo
Copy link

biogeo commented Mar 20, 2017

I was just giving GLVisualize a test whirl, and I replicate @timholy's problem. I'm running a Dell Inspiron laptop with Ubuntu 16.10. glxgears runs just fine. My output for his informational commands is as follows:

geoff@bayes:~$ lspci | grep VGA ; lsmod | grep "kms\|drm" ; find /dev -group video ; cat /proc/cmdline ; find /etc/modprobe.d/; cat /etc/modprobe.d/*kms* ; ls /etc/X11/xorg.conf.d ; glxinfo | grep -i "vendor\|rendering" ; grep LoadModule /var/log/Xorg.0.log ; glxinfo | grep OpenGL
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 520 (rev 07)
drm_kms_helper        167936  1 i915
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
drm                   368640  8 i915,drm_kms_helper
find: ‘/dev/vboxusb’: Permission denied
/dev/video0
/dev/fb0
/dev/dri/card0
/dev/dri/renderD128
/dev/dri/controlD64
BOOT_IMAGE=/boot/vmlinuz-4.8.0-41-generic.efi.signed root=UUID=b16a6141-02d0-4779-8f32-4e404cc129b7 ro quiet splash pci=noaer vt.handoff=7
/etc/modprobe.d/
/etc/modprobe.d/blacklist-modem.conf
/etc/modprobe.d/blacklist-ath_pci.conf
/etc/modprobe.d/blacklist-oss.conf
/etc/modprobe.d/blacklist-firewire.conf
/etc/modprobe.d/blacklist-framebuffer.conf
/etc/modprobe.d/intel-microcode-blacklist.conf
/etc/modprobe.d/alsa-base.conf
/etc/modprobe.d/iwlwifi.conf
/etc/modprobe.d/mlx4.conf
/etc/modprobe.d/blacklist.conf
/etc/modprobe.d/blacklist-rare-network.conf
/etc/modprobe.d/vmwgfx-fbdev.conf
/etc/modprobe.d/blacklist-watchdog.conf
cat: '/etc/modprobe.d/*kms*': No such file or directory
direct rendering: Yes
server glx vendor string: SGI
client glx vendor string: Mesa Project and SGI
    Vendor: Intel Open Source Technology Center (0x8086)
OpenGL vendor string: Intel Open Source Technology Center
[     4.792] (II) LoadModule: "glx"
[     4.814] (II) LoadModule: "modesetting"
[     4.815] (II) LoadModule: "fbdev"
[     4.816] (II) LoadModule: "vesa"
[     4.824] (II) LoadModule: "fbdevhw"
[     4.824] (II) LoadModule: "glamoregl"
[     4.878] (II) LoadModule: "fb"
[     5.391] (II) LoadModule: "evdev"
[     5.399] (II) LoadModule: "synaptics"
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

@SimonDanisch
Copy link
Member

Sorry I think I can't offer much help here...
I'm 95% sure, that this is a problem with the kernel and intel drivers...
Can you try running some more advanced opengl program than glxgears to confirm this?
I found some easy to install benchmark for linux... not sure if that actually will trigger it:

sudo apt-get install glmark2
glmark2

@biogeo
Copy link

biogeo commented Mar 20, 2017

Thanks for the suggestion. I'm definitely prepared to believe this is a kernel/drivers problem. Regardless, glmark2 runs fine (and gave me a nice bit of nostalgia flashback to the demoscene programs my brother used to trade around with his friends on dialup BBSes back in the early '90s). In case it's in any way useful, the output of glmark2 was:

geoff@bayes:~$ glmark2
=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel Open Source Technology Center
    GL_RENDERER:   Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
    GL_VERSION:    3.0 Mesa 12.0.6
=======================================================
[build] use-vbo=false: FPS: 837 FrameTime: 1.195 ms
[build] use-vbo=true: FPS: 913 FrameTime: 1.095 ms
[texture] texture-filter=nearest: FPS: 858 FrameTime: 1.166 ms
[texture] texture-filter=linear: FPS: 840 FrameTime: 1.190 ms
[texture] texture-filter=mipmap: FPS: 873 FrameTime: 1.145 ms
[shading] shading=gouraud: FPS: 884 FrameTime: 1.131 ms
[shading] shading=blinn-phong-inf: FPS: 889 FrameTime: 1.125 ms
[shading] shading=phong: FPS: 893 FrameTime: 1.120 ms
[shading] shading=cel: FPS: 888 FrameTime: 1.126 ms
[bump] bump-render=high-poly: FPS: 691 FrameTime: 1.447 ms
[bump] bump-render=normals: FPS: 949 FrameTime: 1.054 ms
[bump] bump-render=height: FPS: 946 FrameTime: 1.057 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 705 FrameTime: 1.418 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 636 FrameTime: 1.572 ms
[pulsar] light=false:quads=5:texture=false: FPS: 976 FrameTime: 1.025 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 460 FrameTime: 2.174 ms
[desktop] effect=shadow:windows=4: FPS: 512 FrameTime: 1.953 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 415 FrameTime: 2.410 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 400 FrameTime: 2.500 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 463 FrameTime: 2.160 ms
[ideas] speed=duration: FPS: 785 FrameTime: 1.274 ms
[jellyfish] <default>: FPS: 857 FrameTime: 1.167 ms
[terrain] <default>: FPS: 122 FrameTime: 8.197 ms
[shadow] <default>: FPS: 337 FrameTime: 2.967 ms
[refract] <default>: FPS: 154 FrameTime: 6.494 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 839 FrameTime: 1.192 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 842 FrameTime: 1.188 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 841 FrameTime: 1.189 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 839 FrameTime: 1.192 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 838 FrameTime: 1.193 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 838 FrameTime: 1.193 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 842 FrameTime: 1.188 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 841 FrameTime: 1.189 ms
=======================================================
                                  glmark2 Score: 727 
=======================================================

I may keep trying to tinker with this in my free time, but looks like a stumbling block for now.

@SimonDanisch
Copy link
Member

Damn it! ;) Guess I do something odd!
Maybe this is helpful: https://bbs.archlinux.org/viewtopic.php?id=185376

@biogeo
Copy link

biogeo commented Mar 21, 2017

Thanks for the link! I did end up going down a bit of a rabbit hole tinkering with kernel parameters similar to what's described there, to no avail. This definitely seems like some kind of kernel/driver issue that cleverer minds than mine are going to have to fix. I can confirm, though, that whatever it is definitely involves the GPU crashing, as dmesg reports:

geoff@bayes:~$ dmesg | grep -i drm
[    0.000000] DMI: Dell Inc. Inspiron 13-7353/04RDRM, BIOS 01.04.00 12/09/2015
[    1.140159] [drm] Initialized drm 1.1.0 20060810
[    1.167740] [drm] Memory usable by graphics device = 4096M
[    1.167743] fb: switching to inteldrmfb from EFI VGA
[    1.167844] [drm] Replacing VGA console driver
[    1.173673] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    1.173674] [drm] Driver supports precise vblank timestamp query.
[    1.177022] [drm] Finished loading i915/skl_dmc_ver1_26.bin (v1.26)
[    1.186543] [drm] GuC firmware load skipped
[    1.200746] [drm] Initialized i915 1.6.0 20160711 for 0000:00:02.0 on minor 0
[    1.203109] fbcon: inteldrmfb (fb0) is primary device
[    1.203244] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
[    2.826679] [drm] RC6 on
[  147.682103] [drm] GPU HANG: ecode 9:0:0x84df7cfc, in julia [3699], reason: Hang on render ring, action: reset
[  147.682107] [drm] GPU hangs can indicate a bug anywhere in the entire gfx stack, including userspace.
[  147.682109] [drm] Please file a _new_ bug report on bugs.freedesktop.org against DRI -> DRM/Intel
[  147.682112] [drm] drm/i915 developers can then reassign to the right component if it's not a kernel issue.
[  147.682113] [drm] The gpu crash dump is required to analyze gpu hangs, so please always attach it.
[  147.682115] [drm] GPU crash dump saved to /sys/class/drm/card0/error
[  147.682250] drm/i915: Resetting chip after gpu hang
[  147.682561] [drm] GuC firmware load skipped
[  149.697848] [drm] RC6 on
[  163.681747] drm/i915: Resetting chip after gpu hang
[  163.682048] [drm] GuC firmware load skipped
[  165.697500] [drm] RC6 on
[  173.665630] drm/i915: Resetting chip after gpu hang
[  173.665918] [drm] GuC firmware load skipped
[  175.681552] [drm] RC6 on

I'm throwing in the towel on this for now; if a future kernel update resolves the issue I'll report back.

@timholy
Copy link
Contributor Author

timholy commented Mar 21, 2017

I'm pretty sure I'm not misremembering that an earlier version worked on my platform. @SimonDanisch, were I to try to bisect this, are the only relevant packages GLVisualize, GLWindow, and GLAbstraction? Or do I need to cast an even wider net?

@SimonDanisch
Copy link
Member

GLWindow might be the most important one!
Actually, in order of importants, these files are the most probable culprit:
https://github.com/JuliaGL/GLWindow.jl/blob/master/src/render.jl
https://github.com/JuliaGL/GLWindow.jl/blob/master/src/types.jl
and maybe
https://github.com/JuliaGL/GLWindow.jl/blob/master/src/screen.jl
https://github.com/JuliaGL/GLWindow.jl/blob/master/src/fxaa.frag

... But these are just heuristics :( Of course the error can also be in GLVisualize/GLAbstraction, but it should be less likely!
You can also try and run in debug mode with glscreen(debugging = true).

@timholy
Copy link
Contributor Author

timholy commented Mar 21, 2017

I have found a working configuration, but it's really old:

  • GLVisualize v0.0.10
  • GLWindow v0.1.4
  • GLAbstraction v0.0.13

Next step is to try to narrow it down a bit.

@SimonDanisch
Copy link
Member

Yeah, quite a bit has changed in GLWindow:
JuliaGL/GLWindow.jl@v0.1.4...master

The most complex change is the fxaa shader. For simple check if that's the culprit, you can try turning it off:
uncomment:
https://github.com/JuliaGL/GLWindow.jl/blob/5be338cc71c39c3a5a9f202321c2fa9fbcc1767c/src/fxaa.frag#L1030
and then comment out the long function call below it!

But I rather suspect the rest of the rendering code -.-

@timholy
Copy link
Contributor Author

timholy commented Mar 21, 2017

Looks like the crucial event was merging #105. Specifically, with GLAbstraction at 748ab69cb1ba6ee58a639dec02318a07d35dd97c, I get the intel_do_flush_locked error at:
GLWindow: b5cc0b90f255e06e0f4b4a47f1c3ee1503eace75
GLVisualize: e0fcf28
But the rotate_robj example works on
GLWindow: v0.1.4 (one "real" commit prior to the previous one, needed for compatibility with GLVisualize although of course GLWindow could still be the real culprit)
GLVisualize: 8ea5287

Sadly, commenting out the fxaa shader didn't fix it.

Any further ideas? I tried bisecting into #105, but it's not easy because there are all these dependencies that don't seem to exist.

@SimonDanisch
Copy link
Member

SimonDanisch commented Mar 21, 2017 via email

@thomper
Copy link

thomper commented Apr 1, 2017

Hi, just want to mention I get the same issue on a Thinkpad with integrated Intel graphics, running Ubuntu 16.04.

glxinfo | grep OpenGL gives:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

And glmark2 outputs:

=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel Open Source Technology Center
    GL_RENDERER:   Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 
    GL_VERSION:    3.0 Mesa 12.0.6
=======================================================
[build] use-vbo=false: FPS: 1394 FrameTime: 0.717 ms
[build] use-vbo=true: FPS: 1730 FrameTime: 0.578 ms
[texture] texture-filter=nearest: FPS: 1352 FrameTime: 0.740 ms
[texture] texture-filter=linear: FPS: 1610 FrameTime: 0.621 ms
[texture] texture-filter=mipmap: FPS: 1132 FrameTime: 0.883 ms
[shading] shading=gouraud: FPS: 1333 FrameTime: 0.750 ms
[shading] shading=blinn-phong-inf: FPS: 1522 FrameTime: 0.657 ms
[shading] shading=phong: FPS: 1371 FrameTime: 0.729 ms
[shading] shading=cel: FPS: 1503 FrameTime: 0.665 ms
[bump] bump-render=high-poly: FPS: 1199 FrameTime: 0.834 ms
[bump] bump-render=normals: FPS: 1339 FrameTime: 0.747 ms
[bump] bump-render=height: FPS: 1380 FrameTime: 0.725 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 1141 FrameTime: 0.876 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 755 FrameTime: 1.325 ms
[pulsar] light=false:quads=5:texture=false: FPS: 1726 FrameTime: 0.579 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 640 FrameTime: 1.562 ms
[desktop] effect=shadow:windows=4: FPS: 931 FrameTime: 1.074 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 381 FrameTime: 2.625 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 404 FrameTime: 2.475 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 352 FrameTime: 2.841 ms
[ideas] speed=duration: FPS: 1087 FrameTime: 0.920 ms
[jellyfish] <default>: FPS: 1372 FrameTime: 0.729 ms
[terrain] <default>: FPS: 185 FrameTime: 5.405 ms
[shadow] <default>: FPS: 613 FrameTime: 1.631 ms
[refract] <default>: FPS: 261 FrameTime: 3.831 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 1509 FrameTime: 0.663 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 1523 FrameTime: 0.657 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 1493 FrameTime: 0.670 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 1505 FrameTime: 0.664 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 1501 FrameTime: 0.666 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 1510 FrameTime: 0.662 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 1514 FrameTime: 0.661 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 1518 FrameTime: 0.659 ms
=======================================================
                                  glmark2 Score: 1175 
=======================================================

Both GLVisualize and GLPlot are looking quite promising, it's great to have a native Julia option for this sort of work.

@galenlynch
Copy link

I am getting the same error with a Dell Precision 3620 (i7-6700 with Intel HD graphics 530) on Ubuntu 16.04

glxinfo | grep OpenGL yields:

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) 
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

and glmark2 yields:

=======================================================
    glmark2 2014.03+git20150611.fa71af2d
=======================================================
    OpenGL Information
    GL_VENDOR:     Intel Open Source Technology Center
    GL_RENDERER:   Mesa DRI Intel(R) HD Graphics 530 (Skylake GT2) 
    GL_VERSION:    3.0 Mesa 12.0.6
=======================================================
[build] use-vbo=false: FPS: 3893 FrameTime: 0.257 ms
[build] use-vbo=true: FPS: 4066 FrameTime: 0.246 ms
[texture] texture-filter=nearest: FPS: 3810 FrameTime: 0.262 ms
[texture] texture-filter=linear: FPS: 3894 FrameTime: 0.257 ms
[texture] texture-filter=mipmap: FPS: 3914 FrameTime: 0.255 ms
[shading] shading=gouraud: FPS: 3541 FrameTime: 0.282 ms
[shading] shading=blinn-phong-inf: FPS: 3515 FrameTime: 0.284 ms
[shading] shading=phong: FPS: 3337 FrameTime: 0.300 ms
[shading] shading=cel: FPS: 3191 FrameTime: 0.313 ms
[bump] bump-render=high-poly: FPS: 2447 FrameTime: 0.409 ms
[bump] bump-render=normals: FPS: 4119 FrameTime: 0.243 ms
[bump] bump-render=height: FPS: 3956 FrameTime: 0.253 ms
[effect2d] kernel=0,1,0;1,-4,1;0,1,0;: FPS: 2424 FrameTime: 0.413 ms
[effect2d] kernel=1,1,1,1,1;1,1,1,1,1;1,1,1,1,1;: FPS: 1226 FrameTime: 0.816 ms
[pulsar] light=false:quads=5:texture=false: FPS: 3448 FrameTime: 0.290 ms
[desktop] blur-radius=5:effect=blur:passes=1:separable=true:windows=4: FPS: 1224 FrameTime: 0.817 ms
[desktop] effect=shadow:windows=4: FPS: 2236 FrameTime: 0.447 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 526 FrameTime: 1.901 ms
[buffer] columns=200:interleave=false:update-dispersion=0.9:update-fraction=0.5:update-method=subdata: FPS: 607 FrameTime: 1.647 ms
[buffer] columns=200:interleave=true:update-dispersion=0.9:update-fraction=0.5:update-method=map: FPS: 506 FrameTime: 1.976 ms
[ideas] speed=duration: FPS: 2830 FrameTime: 0.353 ms
[jellyfish] <default>: FPS: 2236 FrameTime: 0.447 ms
[terrain] <default>: FPS: 255 FrameTime: 3.922 ms
[shadow] <default>: FPS: 1235 FrameTime: 0.810 ms
[refract] <default>: FPS: 429 FrameTime: 2.331 ms
[conditionals] fragment-steps=0:vertex-steps=0: FPS: 2830 FrameTime: 0.353 ms
[conditionals] fragment-steps=5:vertex-steps=0: FPS: 3123 FrameTime: 0.320 ms
[conditionals] fragment-steps=0:vertex-steps=5: FPS: 3014 FrameTime: 0.332 ms
[function] fragment-complexity=low:fragment-steps=5: FPS: 3268 FrameTime: 0.306 ms
[function] fragment-complexity=medium:fragment-steps=5: FPS: 3309 FrameTime: 0.302 ms
[loop] fragment-loop=false:fragment-steps=5:vertex-steps=5: FPS: 3288 FrameTime: 0.304 ms
[loop] fragment-steps=5:fragment-uniform=false:vertex-steps=5: FPS: 3247 FrameTime: 0.308 ms
[loop] fragment-steps=5:fragment-uniform=true:vertex-steps=5: FPS: 3303 FrameTime: 0.303 ms
=======================================================
                                  glmark2 Score: 2674 
=======================================================

@loicspace
Copy link

Yo,

I had the same problem on a Dell XPS 15 on Ubuntu 16. Same as @timholy mentioned, I had no issue with it some time ago.
For anyone who has this issue and also has a NVIDIA GPU in addition to the integrated Intel card, switching to the NVIDIA GPU solved the issue for me. It entails downloading the appropriate NVIDIA drivers and enabling the NVIDIA GPU, see below for some instructions that worked for me:

http://ubuntuhandbook.org/index.php/2016/04/switch-intel-nvidia-graphics-ubuntu-16-04/

Of course, depending on some configs, switching to the NVIDIA card may not be desired, but that is the only way I was able to work around it thus far.

Cheers,
Loic

@timholy
Copy link
Contributor Author

timholy commented May 17, 2017

@SimonDanisch, I greatly appreciate your kind offer in #137 (comment) to look into things, but I wonder if it's not so easy for you if you can't replicate the problem locally. I also know you have a lot on your plate, which the whole CPU backend underway. When that work is merged, it will certainly open up (GL)Visualize to a much wider audience, but of course some folks are still going to be curious to know whether they can leverage the hardware of their machines, so I don't think this issue is going to go away.

Consequently, I wonder if there's anything that those of us experiencing this issue can do to help take this item off your TODO list. In a few days I might have a little more breathing room to look into this myself. Any chance we could get you to link us to places in the code that might be especially worthy of inspection? E.g., places where the main buffer settings are specified, etc.

@timholy
Copy link
Contributor Author

timholy commented May 17, 2017

Does anyone have experience with more recent Ubuntu releases fixing the problem? I've wondered about upgrading to 17.04 just to see if it fixes this issue. Installing the NVIDIA drivers fixes it, but it causes problems for me when I connect to a projector for teaching or presentations; and I do that so much that in general I've not found that worthwhile.

@SimonDanisch
Copy link
Member

Sorry for giving this such a low priority.... I want to port the more complex part of my framebuffer/render setup (which I suspect to be responsible for this) to Visualize today.
I will start by creating a minimal example of the current rendering pipeline of GLVisualize, which we then can hopefully use to reproduce the bug!

@SimonDanisch
Copy link
Member

Let me try to do it in a way, that one can peel of the complexity with each github commit...............

@timholy
Copy link
Contributor Author

timholy commented May 17, 2017

No apologies needed, I know you are moving massive mountains with your work and I'm very excited about what's coming. Mostly I was trying to discourage you dissuading others from pitching in and trying to debug it themselves (or myself) 😉. Given all the things there are to do in the world, it's very easy to say, "oh, Simon says he will take care of it" but perhaps that's not best for the future trajectory of GLVisualize if we all just lean on you.

@roscopetracula
Copy link

I believe I'm seeing the same error:

julia> Pkg.test("GLVisualize")
INFO: Computing test dependencies for GLVisualize...
INFO: Installing Contour v0.3.0
INFO: Installing DocStringExtensions v0.3.3
INFO: Installing Highlights v0.2.1
INFO: Installing ImageMagick v0.4.0
INFO: Building ImageMagick
INFO: Testing GLVisualize
Now showing rotate_robj.jl:

intel_do_flush_locked failed: Input/output error
=========================================================[ ERROR: GLVisualize ]==========================================================

failed process: Process(`/home/{user}/julia-6.0/bin/julia -Cx86-64 -J/home/{user}/julia-6.0/lib/julia/sys.so --compile=yes --depwarn=yes --check-bounds=yes --code-coverage=none --color=yes --compilecache=yes /home/{user}/.julia/v0.6/GLVisualize/test/runtests.jl`, ProcessExited(1)) [1]

=========================================================================================================================================
INFO: Removing Contour v0.3.0
INFO: Removing DocStringExtensions v0.3.3
INFO: Removing Highlights v0.2.1
INFO: Removing ImageMagick v0.4.0
ERROR: GLVisualize had test errors

What happens:

  • at the line ""INFO: Testing GLVisualize", there is a ~30-45sec pause, at the end of which a small window is created. The window shows whatever pixels were in the position where the window was created.
  • after maybe 20s, the small window is destroyed.
  • immediately after that a bigger window is created, which also only shows the background. The computer becomes non-responsive a couple times.
  • a couple minutes later ther terminal shows "Now showing rotate_robj.jl:" and the window is painted white. The computer again becomes non-responsive.

Here is my glxinfo

~$ glxinfo | grep "version"
server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.3
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.6
OpenGL core profile shading language version string: 4.30
OpenGL version string: 3.0 Mesa 12.0.6
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

Happy to add any additional info that might help. I'm relatively new to Julia-- is there any kind of debug mode that might have a richer stack trace?

Keen to give this library a try once this bug gets sorted, the examples shown on your website look great. I can't seem to find anything else that allows for real-time animations, but if you happen to know of alternatives that might be usable in the meantime, that would be helpful too. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants