Skip to content

[Bug]: Seg faults inside HWM #153

Closed
Closed

Description

@mattzett

What happened?

There is some kind of uninitialized memory issue that appears in 48ec33f; segfault before time stepping begins. Commits before this work fine with HWM enabled, I've been using this test problem: https://github.com/gemini3d/gemini-examples/tree/main/init/CI-staging/varHWM/Eq.

Relevant log output

[zettergms-MacBook-Pro:59798] Signal: Segmentation fault: 11 (11)
[zettergms-MacBook-Pro:59798] Signal code: Invalid permissions (2)
[zettergms-MacBook-Pro:59798] Failing at address: 0x0
[zettergms-MacBook-Pro:59798] [ 0] 0   libsystem_platform.dylib            0x00000001820dd744 _sigtramp + 56
[zettergms-MacBook-Pro:59798] [ 1] 0   libgfortran.5.dylib                 0x0000000103b927c8 _gfortrani_fc_strdup + 40
[zettergms-MacBook-Pro:59798] [ 2] 0   libgfortran.5.dylib                 0x0000000103b927c8 _gfortrani_fc_strdup + 40
[zettergms-MacBook-Pro:59798] [ 3] 0   libgfortran.5.dylib                 0x0000000103cb7558 _gfortrani_open_external + 56
[zettergms-MacBook-Pro:59798] [ 4] 0   libgfortran.5.dylib                 0x0000000103cac748 _gfortrani_new_unit + 360
[zettergms-MacBook-Pro:59798] [ 5] 0   libgfortran.5.dylib                 0x0000000103cacfbc _gfortran_st_open + 460
[zettergms-MacBook-Pro:59798] [ 6] 0   gemini.bin                          0x000000010296c770 findandopen_ + 336
[zettergms-MacBook-Pro:59798] [ 7] 0   gemini.bin                          0x000000010296ee0c initqwm_ + 300
[zettergms-MacBook-Pro:59798] [ 8] 0   gemini.bin                          0x0000000102970c50 inithwm_ + 68
[zettergms-MacBook-Pro:59798] [ 9] 0   gemini.bin                          0x000000010297120c hwm14_ + 168
[zettergms-MacBook-Pro:59798] [10] 0   gemini.bin                          0x0000000102957e58 __hwm_interface_MOD_hwm_14_r64 + 120
[zettergms-MacBook-Pro:59798] [11] 0   gemini.bin                          0x0000000102844fd0 __neutral_background_MOD_neutral_winds + 1712
[zettergms-MacBook-Pro:59798] [12] 0   gemini.bin                          0x00000001028cd964 __gemini3d_mpi_MOD_init_inputdata_in + 120
[zettergms-MacBook-Pro:59798] [13] 0   gemini.bin                          0x00000001027d2494 MAIN__ + 3828
[zettergms-MacBook-Pro:59798] [14] 0   gemini.bin                          0x0000000102b9c7e0 main + 32
[zettergms-MacBook-Pro:59798] [15] 0   dyld                                0x0000000181d084e4 start + 6992

Activity

  1. mattzett commented on Oct 6, 2026

    @mattzett
    MemberAuthor

    As a quick test I reverted the offending commit in @sdch10 's fork branch debug-periodic: https://github.com/sdch10/gemini3d/tree/debug-periodic. It no longer fails in the manner above and seems to run fine.

  2. mattzett commented on Oct 6, 2026

    @mattzett
    MemberAuthor

    @sdch10 - can you check if your debug-periodic branch (from your fork, with the revert commit I did) works on the EPB problem now? I've been using some other simpler test problem.

  3. guygrubbs commented on Oct 6, 2026

    @guygrubbs
    Collaborator

    @mattzett Can you try my branch or the prior iteration? One of the major issues I found was stale build artifacts for CI/CD during my updates on my fork. I had to revert my changes and then have the warnings again for my latest updates to my branch because I was keeping my fork up to date with your main branch. That's going to get difficult with more and more testing without looking at my fork.

    #148

  4. mattzett commented on Oct 7, 2026

    @mattzett
    MemberAuthor

    @guygrubbs sorry for being so slow to look into that; the past few weeks have been full of administrative stuff that is taking up all my time :/

  5. scivision commented on Oct 7, 2026

    @scivision
    Member

    I created this script to build/run in isolation with known configuration (Release) and am running it on a macbook.

    I immediately see the crash you noted.

    scripts/debug_example.sh ../gemini-examples/init/CI-staging/varHWM/eq/config.nml $TMPDIR/varHWM -Dgemini3d_hwm14=true
  6. scivision commented on Oct 8, 2026

    @scivision
    Member

    This was fixed by 79cdc7b

  7. mattzett commented on Oct 9, 2026

    @mattzett
    MemberAuthor

    Thanks @scivision!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions