Skip to content
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

Floating point exception #1949

Open
vai-terokinnunen opened this issue Nov 27, 2024 · 0 comments
Open

Floating point exception #1949

vai-terokinnunen opened this issue Nov 27, 2024 · 0 comments

Comments

@vai-terokinnunen
Copy link

Describe the bug
Floating point exception core dump with nng_req0_open with main branch. This is also reproducible with demo/raw and demo/async apps.
Bisected the commit to 713b80f ("refactor initialization/finalization")

Expected behavior
Raw server started.

Actual Behavior

$ ./raw tcp://127.0.0.1:55995 -s
Floating point exception (core dumped)
$

To Reproduce

  • Build demo/raw app.
  • Start ./raw tcp://127.0.0.1:55995 -s

Environment Details

  • NNG version: main branch c3620e6 ("sockfd: inline aio structs")
  • Operating system and version: Fedora 40
  • Compiler and language used: gcc 14.2.1
  • Shared or static library

Additional context

Core dump details:

$ coredumpctl debug
           PID: 349527 (raw)
           UID: 1000 (tero)
           GID: 1000 (tero)
        Signal: 8 (FPE)
     Timestamp: Wed 2024-11-27 10:52:39 EET (13min ago)
  Command Line: ./raw tcp://127.0.0.1:55995 -s
    Executable: /home/tero/work/nng/build-raw/raw
 Control Group: /user.slice/user-1000.slice/[email protected]/app.slice/app-org.gnome.Terminal.slice/vte-spawn-90bf9612-9cd4-4b4f-895b-3c6db604d91a.scope
          Unit: [email protected]
     User Unit: vte-spawn-90bf9612-9cd4-4b4f-895b-3c6db604d91a.scope
         Slice: user-1000.slice
     Owner UID: 1000 (tero)
       Boot ID: 4e592ff17e094950a051295ba32ed48c
    Machine ID: 8b88de00be60453b9851b40e6cc52131
      Hostname: fedora
       Storage: /var/lib/systemd/coredump/core.raw.1000.4e592ff17e094950a051295ba32ed48c.349527.1732697559000000.zst (present)
  Size on Disk: 26.4K
       Message: Process 349527 (raw) of user 1000 dumped core.
                
                Stack trace of thread 349527:
                #0  0x0000000000414eb9 n/a (/home/tero/work/nng/build-raw/raw + 0x14eb9)
                #1  0x00000000004290d3 n/a (/home/tero/work/nng/build-raw/raw + 0x290d3)
                #2  0x000000000041e62c n/a (/home/tero/work/nng/build-raw/raw + 0x1e62c)
                #3  0x000000000041e73f n/a (/home/tero/work/nng/build-raw/raw + 0x1e73f)
                #4  0x0000000000429afb n/a (/home/tero/work/nng/build-raw/raw + 0x29afb)
                #5  0x0000000000429ad6 n/a (/home/tero/work/nng/build-raw/raw + 0x29ad6)
                #6  0x0000000000410b55 n/a (/home/tero/work/nng/build-raw/raw + 0x10b55)
                #7  0x0000000000410de4 n/a (/home/tero/work/nng/build-raw/raw + 0x10de4)
                #8  0x00007fde89e4e088 __libc_start_call_main (libc.so.6 + 0x2a088)
                #9  0x00007fde89e4e14b __libc_start_main@@GLIBC_2.34 (libc.so.6 + 0x2a14b)
                #10 0x00000000004107d5 n/a (/home/tero/work/nng/build-raw/raw + 0x107d5)
                ELF object binary architecture: AMD x86-64

GNU gdb (Fedora Linux) 15.2-3.fc40
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/tero/work/nng/build-raw/raw...

This GDB supports auto-downloading debuginfo from the following URLs:
  <https://debuginfod.fedoraproject.org/>
Enable debuginfod for this session? (y or [n]) yes
Debuginfod has been enabled.
To make this setting permanent, add 'set debuginfod enabled on' to .gdbinit.
(No debugging symbols found in /home/tero/work/nng/build-raw/raw)
[New LWP 349527]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Core was generated by `./raw tcp://127.0.0.1:55995 -s'.
Program terminated with signal SIGFPE, Arithmetic exception.
#0  0x0000000000414eb9 in nni_aio_init ()
(gdb) bt
#0  0x0000000000414eb9 in nni_aio_init ()
#1  0x00000000004290d3 in xrep0_sock_init ()
#2  0x000000000041e62c in nni_sock_create ()
#3  0x000000000041e73f in nni_sock_open ()
#4  0x0000000000429afb in nni_proto_open ()
#5  0x0000000000429ad6 in nng_rep0_open_raw ()
#6  0x0000000000410b55 in server ()
#7  0x0000000000410de4 in main ()
(gdb)

nni_aio_expire_q_cnt in https://github.com/nanomsg/nng/blob/main/src/core/aio.c#L89 is zero.

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

1 participant