Geoviewer tab-Segmentation fault

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 flair.py
  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
Continuing.
[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 ?? ()
(gdb)

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/tkFlair.py”, line 1278, in call**
** return self.func(args)*
** File “/usr/local/flair/flair.py”, line 1920, in preferences_fluka**
** def preferences_fluka(self): self.preferences(page=“Fluka”)**
** File “/usr/local/flair/flair.py”, line 1915, in preferences**
** if tkFlair.preferences(self, page):**
** File “/usr/local/flair/tkFlair.py”, line 1475, in preferences**
** if cd.show(page):**
** File “/usr/local/flair/ConfigDialog.py”, line 216, in show**
** self.grab_set()**
** File “/usr/lib/python3.8/tkinter/init.py”, line 902, in grab_set**
** self.tk.call(‘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}/flair.py "@"

Cheers,
Robert
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 engine.cc:361
361 engine.cc: 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 engine.cc:314
#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 d3layer.cc:556
#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=…)
at d3layer.cc:1097
#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-

Hi,

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.

Cheers
Chris

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 d3layer.cc 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.

Cheers
Chris

A post was merged into an existing topic: Geometry tab-error

Thanks a lot Chris. Today I have tried it and now it is working like charm. Thank you once again for your timely help in this matter.
With regards,
Sujoy Chatterjee