Geoviewer tab-Segmentation fault

Dear all,
Recently I have switched to UBUNTU 20.04 LTS. After installation of the most recent version of FLAIR, whenever I click on the geometry tab, I get segmentation fault. I have used the 20.04 debian version of FLAIR for installation. Rest of the tabs seems to be running, as I could run the file, post process it and even plot the results. I have removed and reinstalled the same. But the problem remains.
Thanks for your kind help in this regard.

Hi @sujoy
does it create a core file?
If yes open the core with the debugger and like
$ gdb /usr/bin/python3 core
and issue the command
to see where it fails.

If you don’t have a coredump maybe you can try the command
ulimit -c unlimited
before launching flair to generate it

Dear Vasilis,
Thank you for the reply. No core dump file was generated. But I could locate a python crash report. As the file is huge, I am sending you first few lines towards the beginning and end of the file.
Towards the beginning:
ProblemType: Crash
Architecture: amd64
CrashCounter: 1
CurrentDesktop: ubuntu:GNOME
Date: Mon Jul 13 22:34:54 2020
DistroRelease: Ubuntu 20.04
ExecutablePath: /usr/bin/python3.8
ExecutableTimestamp: 1588002814
ProcCmdline: python3 -O -W ignore /usr/local/flair/
ProcCwd: /home/sujoy/fluka_work/example
PATH=(custom, user)
00400000-00423000 r–p 00000000 08:05 93591328 /usr/bin/python3.8
00423000-006b0000 r-xp 00023000 08:05 93591328 /usr/bin/python3.8
006b0000-008ed000 r–p 002b0000 08:05 93591328 /usr/bin/python3.8
008ed000-008ee000 r–p 004ec000 08:05 93591328 /usr/bin/python3.8
008ee000-00935000 rw-p 004ed000 08:05 93591328 /usr/bin/python3.8
00935000-00958000 rw-p 00000000 00:00 0
016fb000-03c98000 rw-p 00000000 00:00 0 [heap]
7f76bdffc000-7f76bdffd000 —p 00000000 00:00 0
7f76bdffd000-7f76be7fd000 rw-p 00000000 00:00 0
7f76be7fd000-7f76be7fe000 —p 00000000 00:00 0
7f76be7fe000-7f76beffe000 rw-p 00000000 00:00 0
7f76beffe000-7f76befff000 —p 00000000 00:00 0
7f76befff000-7f76bf7ff000 rw-p 00000000 00:00 0
7f76bf7ff000-7f76bf800000 —p 00000000 00:00 0
7f76bf800000-7f76c0000000 rw-p 00000000 00:00 0
7f76c0000000-7f76c255f000 rw-p 00000000 00:00 0
7f76c255f000-7f76c4000000 —p 00000000 00:00 0
7f76c4000000-7f76c40ff000 rw-p 00000000 00:00 0
7f76c40ff000-7f76c8000000 —p 00000000 00:00 0
7f76c8000000-7f76c80ff000 rw-p 00000000 00:00 0
7f76c80ff000-7f76cc000000 —p 00000000 00:00 0
7f76cc7f9000-7f76cc7fa000 —p 00000000 00:00 0
7f76cc7fa000-7f76ccffa000 rw-p 00000000 00:00 0
7f76ccffa000-7f76ccffb000 —p 00000000 00:00 0
7f76ccffb000-7f76cd7fb000 rw-p 00000000 00:00 0
7f76cd7fb000-7f76cd7fc000 —p 00000000 00:00 0
7f76cd7fc000-7f76cdffc000 rw-p 00000000 00:00 0
7f76cdffc000-7f76cdffd000 —p 00000000 00:00 0
7f76cdffd000-7f76ce7fd000 rw-p 00000000 00:00 0
7f76ce7fd000-7f76ce7fe000 —p 00000000 00:00 0
7f76ce7fe000-7f76ceffe000 rw-p 00000000 00:00 0
7f76ceffe000-7f76cefff000 —p 00000000 00:00 0
7f76cefff000-7f76cf7ff000 rw-p 00000000 00:00 0
7f76cf7ff000-7f76cf800000 —p 00000000 00:00 0
7f76cf800000-7f76d0000000 rw-p 00000000 00:00 0
7f76d0000000-7f76d0203000 rw-p 00000000 00:00 0
7f76d0203000-7f76d4000000 —p 00000000 00:00 0
7f76d477b000-7f76d477c000 —p 00000000 00:00 0
7f76d477c000-7f76d50bc000 rw-p 00000000 00:00 0
7f76d50bc000-7f76d50bd000 —p 00000000 00:00 0
7f76d50bd000-7f76d58bd000 rw-p 00000000 00:00 0
7f76d58bd000-7f76d58be000 —p 00000000 00:00 0

Towards the end:
Name: python3
Umask: 0002
State: D (disk sleep)
Tgid: 13334
Ngid: 0
Pid: 13334
PPid: 13332
TracerPid: 0
Uid: 1000 1000 1000 1000
Gid: 1000 1000 1000 1000
FDSize: 64
Groups: 4 24 27 30 46 120 131 132 1000
NStgid: 13334
NSpid: 13334
NSpgid: 13331
NSsid: 8508
VmPeak: 631956 kB
VmSize: 631956 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM: 184108 kB
VmRSS: 184108 kB
RssAnon: 152488 kB
RssFile: 31620 kB
RssShmem: 0 kB
VmData: 328052 kB
VmStk: 132 kB
VmExe: 2752 kB
VmLib: 38620 kB
VmPTE: 576 kB
VmSwap: 0 kB
HugetlbPages: 0 kB
CoreDumping: 1
THP_enabled: 1
Threads: 13
SigQ: 0/15467
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000001001000
SigCgt: 0000000180000002
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
CapBnd: 0000003fffffffff
CapAmb: 0000000000000000
NoNewPrivs: 0
Seccomp: 0
Speculation_Store_Bypass: vulnerable
Cpus_allowed: f
Cpus_allowed_list: 0-3
Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001
Mems_allowed_list: 0
voluntary_ctxt_switches: 5052
nonvoluntary_ctxt_switches: 3832
Signal: 11
Uname: Linux 5.4.0-40-generic x86_64
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
CoreDump: base64

Unfortunately I cannot understand from this file the cause.
You could try the following

  1. start flair
  2. find the process number (PID) with the command
    ps ax | grep
  3. run the debugger with that process
    gdb /usr/bin/python PID
  4. enter c in the debugger to continue running
  5. click on the geometry editor tab in flair, and when it crashes the debugger should show the problematic line
  6. You can issue a command bt in the debugger to show the backtrace (stack of calls)

Dear Vasilis,
The following I get on the prompt after issuing the commands which you have sent.

Attaching to program: /usr/bin/python, process 17335
[New LWP 17337]
0x00007fd9e8aaa376 in ?? ()
(gdb) c
[New LWP 17347]
[New LWP 17348]
[New LWP 17349]
[New LWP 17350]
[New LWP 17351]
[New LWP 17352]
[New LWP 17353]
[New LWP 17354]
[New LWP 17355]
[LWP 17355 exited]
[New LWP 17356]
[LWP 17356 exited]
[New LWP 17357]
[LWP 17357 exited]
[New LWP 17358]
[LWP 17358 exited]
[New LWP 17359]
[New LWP 17360]
[New LWP 17361]
[New LWP 17362]
[LWP 17359 exited]
[LWP 17361 exited]
[LWP 17362 exited]
[New LWP 17363]
[New LWP 17364]
[LWP 17363 exited]
[LWP 17364 exited]
[New LWP 17365]
[New LWP 17366]
–Type for more, q to quit, c to continue without paging–

Thread 21 “python3” received signal SIGSEGV, Segmentation fault.
[Switching to LWP 17365]
0x00007fd9e1ecdcb7 in ?? ()
(gdb) bt
#0 0x00007fd9e1ecdcb7 in ?? ()
#1 0x0000000000000000 in ?? ()

Thanks @sujoy
also that didn’t provide much information.
I would suggest if you could download the .tgz packages of both flair and geoviewer and make a local installation, compiling yourself the geoviewer code with DEBUG information enabled so maybe we can get something more.

The instructions are written on the download page of flair on how to compile manually.

Thanks Vasilis,
I did the same. I have downloaded the .tgz file. Installation was smooth. But while running, I am getting the same error. Should I do the compilation again of flair-geoviewer with DEBUG information enabled. How do I do it ?
I have put make** and ** make install command for compiling the flair-geoviewer.

To enable debug information for geoviewer do the following
make -B -j 8 DEBUG=yes
followed by
make install

Dear Vailis,
Today I have again tried the deb version. I could get the most recent trace back of the fault.
Traceback (most recent call last):
** File “/usr/local/flair/”, line 1278, in call**
** return self.func(args)*
** File “/usr/local/flair/”, line 1920, in preferences_fluka**
** def preferences_fluka(self): self.preferences(page=“Fluka”)**
** File “/usr/local/flair/”, line 1915, in preferences**
** if tkFlair.preferences(self, page):**
** File “/usr/local/flair/”, line 1475, in preferences**
** if**
** File “/usr/local/flair/”, line 216, in show**
** self.grab_set()**
** File “/usr/lib/python3.8/tkinter/”, line 902, in grab_set**
**‘grab’, ‘set’, self._w)**
_tkinter.TclError: grab failed: window not viewable
Segmentation fault (core dumped)
Pl let me know if it helps. If not, I will again try the .tgz installation with the commands given by you.
With regards,
Sujoy Chatterjee

Hi Sujoy,

this traceback is something different from the coredump you have. Please try with my instructions

Dear @vasilis
I have done the compilation with your instructions. The installation was smooth, although the problem persists. Pl let me know which file is required and its location for debugging purpose.
With Regards,
Sujoy Chatterjee

Did it generate any file named core?
If yes then you can open it with the gdb as I mentioned before
gdb /usr/bin/python core
and give the command bt
to show the location of the problem

Dear @vasilis,
This time also, no core file was generated, although flair stopped with Segmentation fault (core dumped). I have followed all the commands you have written earlier while compiling. I do not know how to proceed further.

With regards,
Sujoy Chatterjee

Dear Vasilis and Sujoy,

I could reproduce the problem (on the RP cluster). I only appears if a 3D panel is open on the screen.

Attached you find the text file with the gbd output. No core dump file in the given directory (somewhere else?) is produced although the program quits with
[froeschl@pcscrpd3 SHiP_mu] /cluster/temp/Software/FLAIR/default_cluster_flair/flair: line 14: 7782 Segmentation fault (core dumped) {PYTHON} -O -W ignore {DIR}/ "@"

geoviewer_debug.txt (32.5 KB)

@froeschl the problem you have is with the implementation of std::async functionality, I believe linked with the g++ version.
You can try to disable it by compiling with the option SLOWAA=yes as
make clean; make SLOWAA=yes
I don’t know if it is related with the problem of @sujoy

Dear @vasilis
I changed my OS to Ubuntu 18.04 LTS. Unfortunately I am getting same error with geoviewer tab. With debugger , I recently got the following lines. I do not know, whether they are pointing towards the problem or not.

Thread 21 “python3” received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7f1db2ffd700 (LWP 4108)]
GeometryEngine::fillIRURegionAccel (this=this@entry=0x1cbcc68,
ray=ray@entry=0x7f1db2ffcae0) at
361 No such file or directory.

With regards,
Sujoy Chatterjee

further to bt command following are the output:
(gdb) bt
#0 0x00007fb43f125e4e in GeometryEngine::whereRay (this=0x1467dc8,
x=-2.5204261724202199, y=-2.8217033541586969, z=-0.051172923850019814,
dx=0.49999999999999994, dy=-0.4330127018922193, dz=-0.75000000000000011,
t=1e-10, zone=0x0, body=0x0) at
#1 0x00007fb43f0c9a2c in GeometryEngine::whereRay (this=0x1467dc8, p=…,
d=…, t=1e-10, zone=0x0, body=0x0) at …/geometry/engine.h:212
#2 0x00007fb43f0cf157 in D3Layer::shootRay (this=0x2f8ac18,
u=-2.185324873504054, v=-3.0889369975561385, pixelRay=…,
pEngine=0x1467dc8, pZone=0x0, step=1) at
#3 0x00007fb43f0d177a in D3Layer::<lambda(D3Layer&, double, double, Ray, GeometryEngine&, VZone&)>::operator()(D3Layer &, double, double, Ray, GeometryEngine &, VZone &) const (__closure=0x7fb43102c9d8, d3=…, curU=-2.185324873504054,
curV=-3.0889369975561385, curRay=…, geoEngine=…, curZone=…)
#4 0x00007fb43f0d28d4 in std::__invoke_impl<unsigned int, D3Layer::superSamplePixel(int, int, ZBuffer&, int)::<lambda(D3Layer&, double, double, Ray, GeometryEngine&, VZone&)>, std::reference_wrapper, double, double, Ray, std::reference_wrapper, std::reference_wrapper >(std::__invoke_other, D3Layer::<lambda(D3Layer&, double, double, Ray, GeometryEngine&, VZone&)> &&) (__f=…) at /usr/include/c++/7/bits/invoke.h:60
#5 0x00007fb43f0d2212 in std::__invoke<D3Layer::superSamplePixel(int, int, ZBuffer&, int)::<lambda(D3Layer&, double, double, Ray, GeometryEngine&, VZone&)>, std::reference_wrapper, double, double, Ray, std::reference_wrapper<Geome—Type to continue, or q —Type to continue, or q to quit-


does this happen with a specific geometry or with all input files, including the example ones?

The back trace shows that the ray tracer has a problem localizing a position in the geometry. To ensure that this could not be due to a tricky error in the your geometry definition it would be good to know if this is a specific or a general issue.

In addition some other infos would be of interest:

  • Do you run Ubuntu in a virtual machine or is it a native installation?
  • Which version of g++ do you use?

I would also suggest rebuild your geoeditor with the following command
make SLOWAA=yes

and check if the issue persists. It might be that there is an issue in the multithreading implementation of your compiler that could cause this crash.


Dear Chris

The problem is happening with all input file, even with the sample input file. I am using native Ubuntu installation. I have tried with command SLOWAA=yes, but the problem persists. What I have found is that my PC being old one is having Core2 duo processor and the “geoviewer” crashes with any version of linux. I have tried with fedora32, ubuntu 18.04 and Ubuntu 20.04. In new machines starting from i3 processors, the problem goes away. This is my personal view, may be I am wrong.

With regards,

Sujoy Chatterjee

Hi Sujoy,

I think I have identified the issue which is bound to show up only with certain CPUs under specific circumstances as well as some types of virtual machines.

Could you please try to replace the file in the sub-directory “viewer” of geoviewer with the following version and recompile it.

In my test setup this resolved the issue but I cannot guarantee because it was very tricky to reproduce the issue you were encountering. Therefore, it would be great if you could try the patch.

@fferrull could you please try as well? In your environment the patch is already installed. So you would just need to start flair and try the 3D view.