3D Viewer and intel VGA Segmentation Faullt.

Bug #1511370 reported by firewalker
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Unassigned

Bug Description

Some times when in 3D Viewer, kicad will freeze (if the board is moved/rotated etc) and will segfault after couple seconds with:

 intel_do_flush_locked failed: Input/output error
Segmentation fault (core dumped)

I believe it is an intel VGA specific issue.

VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)

Intel HD 3000.

It used to freeze for some seconds in older versions also, with an error: intel_do_flush_locked failed: Input/output error but it would not segfault.

dmesg output:

[145813.486650] [drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=1090770 end=1090771)
[145930.365808] [drm] stuck on render ring
[145930.366482] [drm] GPU HANG: ecode 6:0:0x85fffff8, in kicad [13143], reason: Ring hung, action: reset
[145930.368608] drm/i915: Resetting chip after gpu hang
[145982.339235] [drm] stuck on render ring
[145982.339919] [drm] GPU HANG: ecode 6:0:0x85fffffc, in kicad [13143], reason: Ring hung, action: reset
[145982.342018] drm/i915: Resetting chip after gpu hang
[145988.349500] [drm] stuck on render ring
[145988.350192] [drm] GPU HANG: ecode 6:0:0x85fffff8, in kicad [13143], reason: Ring hung, action: reset
[145988.352314] drm/i915: Resetting chip after gpu hang
[145988.439109] kicad[13143]: segfault at b9d0a9ad ip b9d0a9ad sp bfff3448 error 4

Application: kicad
Version: (2015-10-28 BZR 6285)-product release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.2.0,wx containers,compatible with 2.8)
Platform: Linux 4.2.3-1-ARCH i686, 32 bit, Little endian, wxGTK
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Tags: 3d-viewer
tags: added: 3d-viewer
removed: 3d viewer
Revision history for this message
firewalker (firew4lker) wrote :

Was anyone able to test this issue?

Revision history for this message
Nick Østergaard (nickoe) wrote :

How reproducible is this? What driver and driver version is used? What exact linux OS?

Revision history for this message
firewalker (firew4lker) wrote :

Almost every time when dual monitors are used. Less frequently with single monitor.

4.2.5-1-ARCH
xf86-video-intel 1:2.99.917+478+gdf72bc5
libva-intel-driver 1.6.1
mesa 11.0.7

Application: kicad
Version: 4.0.1-stable release build
wxWidgets: Version 3.0.2 (debug,wchar_t,compiler with C++ ABI 1009,GCC 5.3.0,wx containers,compatible with 2.8)
Platform: Linux 4.2.5-1-ARCH i686, 32 bit, Little endian, wxGTK
Boost version: 1.59.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=OFF
         KICAD_SCRIPTING_MODULES=OFF
         KICAD_SCRIPTING_WXPYTHON=OFF
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON

Revision history for this message
Nick Østergaard (nickoe) wrote :

I noticed that you are on Archlinux, maybe you could try to install aur/xf86-video-intel-git 2.99.917.392.g8090a65-1 and then retest.

Revision history for this message
Tom Hand (th6045) wrote :

I came here to submit this exact bug. Every time I move the 3d model it crashes...

Im running Linux Mint 17.3 with the 4.2.0-25 kernel. Also using Intel HD 3000 gfx chipset - i915 driver.

Example of dmesg

[ 5437.098930] [drm] stuck on render ring
[ 5437.099770] [drm] GPU HANG: ecode 6:0:0x84ffebff, in pcbnew [9090], reason: Ring hung, action: reset
[ 5437.101926] drm/i915: Resetting chip after gpu hang
[ 6002.536651] perf interrupt took too long (2502 > 2500), lowering kernel.perf_event_max_sample_rate to 50000
[ 8170.204726] [drm] stuck on render ring
[ 8170.205443] [drm] GPU HANG: ecode 6:0:0x85fffff8, in pcbnew [652], reason: Ring hung, action: reset
[ 8170.207619] drm/i915: Resetting chip after gpu hang
[ 8176.190714] [drm] stuck on render ring
[ 8176.191398] [drm] GPU HANG: ecode 6:0:0x85fffff8, in pcbnew [652], reason: Ring hung, action: reset
[ 8176.193566] drm/i915: Resetting chip after gpu hang
[ 8187.026815] pcbnew[652]: segfault at 7ffebd04fff8 ip 00007f181287ad72 sp 00007ffebd050000 error 6 in libwx_baseu-3.0.so.0.2.0[7f1812758000+26c000]

Revision history for this message
firewalker (firew4lker) wrote :

I filled an upstream bug reports few days ago.

https://bugs.freedesktop.org/show_bug.cgi?id=93664

Revision history for this message
Mario Luzeiro (mrluzeiro) wrote :

Would it be possible to test this bug in the new 3d-viewer that me (Mario) and Cirilo are developing?
https://code.launchpad.net/~mrluzeiro/kicad/kicad_new3d-viewer

Revision history for this message
firewalker (firew4lker) wrote :

I will.

Revision history for this message
firewalker (firew4lker) wrote :

I tested it today with r5840.

I could NOT make it crash or freeze. The rendering is really very fast without any issues.

With 4.0.1 or with r6507 the movement of the 3D model is really sluggish, and will create a

[drm:intel_pipe_update_end [i915]] *ERROR* Atomic update failure on pipe A (start=335091 end=335092)

http://i.imgur.com/QVR9DcD.png

Revision history for this message
Tom Hand (th6045) wrote :

Just tried the new 3d viewer as suggested. Works well, no spluttering or crashes! No complaining in dmesg or GPU hangs so far. Will keep you updated.

Obviously still some work to do but when can we expect this to be rolled out?

Revision history for this message
Mario Luzeiro (mrluzeiro) wrote :

Thanks for testing!
I happy that you feel the improvements.

However, the new render technology is not at this moment so different from the old render. It is developed based on the same openGL target version in mind.

Did you tried different options in the (stable kicad) render? Ex: try to disable all options like texxtures, shadows... thickness.. remove holes.. etc.. ?

The only difference I am thinking at moment is the triangle count (the new render use less triangles) and the new one is still not using (much) textures.

Revision history for this message
firewalker (firew4lker) wrote :

Yes, I tried with several options Enabled/Disabled.

Will keep testing.

Revision history for this message
Mario Luzeiro (mrluzeiro) wrote :

Hi Tom,
Cool that it works for you too!

There are no main plans to integrated yet this on the main kicad trunk.
There are some small steps to start integrating some parts (Cirilo branch related with model paths search).

If you build it from my branch, I am keeping it almost daily updated with the main kicad trunk.
So if you are happy with my branch and would like to help testing our development it would be much appreciated!

Cheers,
Mario Luzeiro

Revision history for this message
Tom Hand (th6045) wrote :

It was all going so well and then another crash today. Seems to happen when zooming in and out.

Version 5840 with the new 3d viewer.

Dmesg output:

[ 8503.963941] [drm] stuck on render ring
[ 8503.964470] [drm] GPU HANG: ecode 6:0:0x87f7fff8, in pcbnew [3207], reason: Ring hung, action: reset
[ 8503.966715] drm/i915: Resetting chip after gpu hang
[ 8511.949257] [drm] stuck on render ring
[ 8511.949758] [drm] GPU HANG: ecode 6:0:0x87f7fff8, in pcbnew [3207], reason: Ring hung, action: reset
[ 8511.951871] drm/i915: Resetting chip after gpu hang
[ 8511.962755] pcbnew[3207]: segfault at 7ffcf7c9ffd0 ip 00007fc9761d9d92 sp 00007ffcf7c9ffa0 error 6 in libwx_baseu-3.0.so.0.2.0[7fc9760b7000+26c000]

Revision history for this message
Mario Luzeiro (mrluzeiro) wrote :

Looks there are lots of related issues with that "keywords" and the intel board... so it must be something related with drivers.

Is the 3d-viewer the only app you have issues? Are you using Chrome with hardware acceleration?

There should be no differences in panning or zooming or whatever, it is the same function that will render the board :/

Do you feel it in a specific board? I mean.. could it be related on the complexity of the board? + triangles?

Revision history for this message
Tom Hand (th6045) wrote :

Seems to only be kicad renderer, Chrome runs 3d modelling just fine.

e.g.
http://3dbrdviewer.cytec.bg/

Ive noticed it tends to only be certain boards, though not related to size of the project. bigger projects can be modelled just fine. It also appears it is no longer happening every time I load Kicad 3d viewer, sometimes it is perfectly fine with the same boards that previously crashed it. Very weird... I managed to go all day yesterday with no crashes.

Revision history for this message
firewalker (firew4lker) wrote :

Since the transition to the new 3d-viwer I had no more errors and segfaults.

Jeff Young (jeyjey)
Changed in kicad:
status: New → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.