Skip to content

IDE crashes at .anf file creation #891

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
schmittlauch opened this issue Sep 10, 2021 · 10 comments
Closed

IDE crashes at .anf file creation #891

schmittlauch opened this issue Sep 10, 2021 · 10 comments
Milestone

Comments

@schmittlauch
Copy link

Platform

  • OMNeT++ version: 5.6.2
  • OS: NixOS 21.05
  • JDK: OpenJDK 11.0.10+9

Describe the bug
When trying to analyse simulation results, the omnetpp IDE crashes: After double clicking the result .vec file and creating an .anf file, the IDE crashes with the following error:

# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f77b5db1c0d, pid=528712, tid=528713
#
# JRE version: OpenJDK Runtime Environment (11.0.12) (build 11.0.12+0-adhoc..source)
# Java VM: OpenJDK 64-Bit Server VM (11.0.12+0-adhoc..source, mixed mode, tiered, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# C  [libgobject-2.0.so.0+0x35c0d]  g_type_check_instance_is_fundamentally_a+0xd
#
# Core dump will be written. Default location: Core dumps may be processed with "/nix/store/3jm3hhqf6kavkqvyy7kmcd5hxqvgdq3i-systemd-247.6/lib/systemd/systemd-coredump %P %u %g %s %t %c %h"

The error report file: hs_err_pid528712.log

The backtrace from the coredump file isn't really helpful:

#0  0x00007f77b66a633a in raise () from /nix/store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib/libc.so.6
#1  0x00007f77b6690523 in abort () from /nix/store/jsp3h3wpzc842j0rz61m5ly71ak6qgdn-glibc-2.32-54/lib/libc.so.6
#2  0x00007f77b10d5495 in os::abort(bool, void*, void const*) [clone .cold] () from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#3  0x00007f77b1c48648 in VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) ()
   from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#4  0x00007f77b1c48fab in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) ()
   from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#5  0x00007f77b1c48fde in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) ()
   from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#6  0x00007f77b1c49271 in crash_handler(int, siginfo_t*, void*) () from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#7  <signal handler called>
#8  0x00007f77b1a2dad0 in oopDesc::print_on(outputStream*) const () from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#9  0x00007f77b1a4d122 in os::print_register_info(outputStream*, void const*) () from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#10 0x00007f77b1c479f8 in VMError::report(outputStream*, bool) () from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#11 0x00007f77b1c4852a in VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long) ()
   from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#12 0x00007f77b1c48fab in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*, char const*, ...) ()
   from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#13 0x00007f77b1c48fde in VMError::report_and_die(Thread*, unsigned int, unsigned char*, void*, void*) ()
   from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#14 0x00007f77b1a4c39a in JVM_handle_linux_signal () from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#15 0x00007f77b1a3f0a8 in signalHandler(int, siginfo_t*, void*) () from /nix/store/y875dvdpb7mklqhfgmwvqsdh8xmb77vr-openjdk-11.0.12+7/lib/openjdk/lib/server/libjvm.so
#16 <signal handler called>
#17 0x00007f77b5db1c0d in g_type_check_instance_is_fundamentally_a () from /nix/store/rqraylqxaa52sm55pqpgb6zvbxasa5c1-glib-2.68.2/lib/libgobject-2.0.so.0
#18 0x00007f77b5d9980c in g_object_set () from /nix/store/rqraylqxaa52sm55pqpgb6zvbxasa5c1-glib-2.68.2/lib/libgobject-2.0.so.0
#19 0x00007f770a750807 in Java_org_eclipse_swt_internal_gtk_OS__1g_1object_1set__J_3BJJ ()
   from /home/spiollinux/.eclipse/1714211786_linux_gtk_x86_64/configuration/org.eclipse.osgi/320/0/.cp/libswt-pi3-gtk-4930r7.so
#20 0x00007f779b970d30 in ?? ()
#21 0x0000000746b3d630 in ?? ()
#22 0x0000000746b3c0a8 in ?? ()
#23 0x0000000746b3d630 in ?? ()
#24 0x00007f770a7505f1 in Java_org_eclipse_swt_internal_gtk_OS__1g_1object_1get_1qdata ()
   from /home/spiollinux/.eclipse/1714211786_linux_gtk_x86_64/configuration/org.eclipse.osgi/320/0/.cp/libswt-pi3-gtk-4930r7.so
#25 0x0000000746b3b1c0 in ?? ()
#26 0x0000000746b3bb38 in ?? ()
#27 0x00007f77b0e57e28 in ?? ()
#28 0x00007f77b0e58190 in ?? ()
#29 0x00007f7795b9f224 in ?? ()
#30 0x0000000746b3d630 in ?? ()
#31 0x00007f77b0d0a000 in ?? ()
#32 0x0000000000000003 in ?? ()
#33 0x0000000000000000 in ?? ()

I still need to figure out how to compile all necessary packages with debug symbols.

To Reproduce

These are the problematic simulation data files (please remove the .txt suffix):
spi.anf.txt
spi-graph=graphs#2fspi.txt.edges-#0.sca.txt
spi-graph=graphs#2fspi.txt.edges-#0.vec.txt

omnetpp is being built reproducibly using Nix, the exact build definitions are available on request (I assume none of you is familiar with Nix anyways). The problem appears when creating a new .anf file from the .vec file in the omnetpp IDE.
Before finally crashing, such a .anf file is indeed generated. When opening the IDE again and trying to open that file, omnetpp reproducibly crashes again.

@schmittlauch schmittlauch added the new New issue that has not been yet acknowledged label Sep 10, 2021
@torokati44
Copy link
Member

The analysis tool was reimplemented in 6.0, so this no longer applies.

We do have plans to look at Nix in the near future though.

@schmittlauch
Copy link
Author

In case you're interested how I had used omnetpp-5.6.2 with Nix, this is the derivation used: https://gitlab.com/schmittlauch/omnetpp-nix/-/tree/a296e4f5501e6fd835a07f62858f515c92117511

For building omnetpp-6.x this needs further enhancement, though.

@torokati44
Copy link
Member

Yes, it should be an excellent starting point, thank you for sharing!

@konivik
Copy link

konivik commented Jun 10, 2023

I experience the same issue as described here with OMNeT++ Version 6.0.1 using Arch Linux.
Different version, different OS but same issue.
Did you found any fix for your issue?

I include the error message and file below:

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007f6887f97425, pid=6949, tid=6950
#
# JRE version: OpenJDK Runtime Environment Temurin-17.0.4+8 (17.0.4+8) (build 17.0.4+8)
# Java VM: OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (17.0.4+8, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# C  [libgobject-2.0.so.0+0x3f425]  g_value_init+0x25
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/konivik/toolbox/omnet/omnetpp-6.0.1/core.6949)

hs_err_pid6949.log

@torokati44
Copy link
Member

We have since identified multiple upstream issues causing crashes:
eclipse-platform/eclipse.platform.swt#678
eclipse-platform/eclipse.platform.swt#697

@torokati44 torokati44 reopened this Jun 10, 2023
@torokati44
Copy link
Member

See a possible workaround to the current crash here: eclipse-platform/eclipse.platform.swt#697 (comment)
As in, try starting the IDE as GTK_THEME=HighContrast omnetpp. It won't look as nice, but hopefully it will be more stable.

@konivik
Copy link

konivik commented Jun 12, 2023

Hi,
thanks for your response.
Starting OMNeT in high contrast alone did not work for me.
However, changing the theme in the eclipse preferences in addition to the start parameter, seems to do the job.
My default theme is "Adwaita-dark".

@torokati44 torokati44 added this to the 6.0.2 milestone Aug 30, 2023
@rhornig
Copy link
Contributor

rhornig commented Sep 13, 2023

A workaround for the crash was implemented in the 5.7.x, 6.0.x and master branch.

@rhornig rhornig closed this as completed Sep 13, 2023
@avarga avarga removed the new New issue that has not been yet acknowledged label Oct 24, 2023
@Mailaender
Copy link

Can you point me to your workaround?

@torokati44
Copy link
Member

It was just Display.asyncExec for now, as noted in eclipse-platform/eclipse.platform.swt#678 (comment):
e271dae
3bd6056

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

No branches or pull requests

6 participants